lm_polygraph.model_adapters.whitebox_model_vllm module
- class lm_polygraph.model_adapters.whitebox_model_vllm.WhiteboxModelvLLM(model, sampling_params, generation_parameters: GenerationParameters = GenerationParameters(temperature=1.0, top_k=50, top_p=1.0, do_sample=False, num_beams=1, presence_penalty=0.0, repetition_penalty=1.0, stop_strings=None, allow_newlines=True, max_new_tokens=100), device: str = 'cuda', instruct: bool = False)[source]
Bases:
ModelBasic whitebox model adapter for using vLLM in stat calculators and uncertainty estimators.
- generate(*args, **kwargs)[source]
Abstract method. Generates the model output with scores from batch formed by HF Tokenizer. Not implemented for black-box models.