Skip to content

Commit

Permalink
Add Qwen coder example
Browse files Browse the repository at this point in the history
  • Loading branch information
lewtun committed Feb 21, 2025
1 parent e89a987 commit 2b4c4cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lighteval/models/vllm/vllm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ def _generate(
generate: bool = True,
) -> list[GenerativeResponse]:
"""Contains the actual logic of the generation."""
print(f"{self.sampling_params.clone()=}")
sampling_params = self.sampling_params.clone() or SamplingParams()
if generate:
sampling_params.n = num_samples
Expand All @@ -343,6 +344,7 @@ def _generate(
# as VLLM complains about no GPUs available.
@ray.remote(num_gpus=1 if self.tensor_parallel_size == 1 else None)
def run_inference_one_model(model_args: dict, sampling_params: SamplingParams, requests):
print(f"Sampling params: {sampling_params}")
llm = LLM(**model_args)
return llm.generate(prompt_token_ids=requests, sampling_params=sampling_params)

Expand Down

0 comments on commit 2b4c4cf

Please sign in to comment.