Skip to content

Commit 7d46c8d

Browse files
authored
[Bugfix] Fix sampling_params passed incorrectly in Phi3v example (#5684)
1 parent da971ec commit 7d46c8d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/phi3v_example.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def run_phi3v():
1212
llm = LLM(
1313
model=model_path,
1414
trust_remote_code=True,
15-
max_model_len=4096,
1615
image_input_type="pixel_values",
1716
image_token_id=32044,
1817
image_input_shape="1,3,1008,1344",
@@ -28,11 +27,12 @@ def run_phi3v():
2827

2928
sampling_params = SamplingParams(temperature=0, max_tokens=64)
3029

31-
outputs = llm.generate({
32-
"prompt": prompt,
33-
"sampling_params": sampling_params,
34-
"multi_modal_data": ImagePixelData(image),
35-
})
30+
outputs = llm.generate(
31+
{
32+
"prompt": prompt,
33+
"multi_modal_data": ImagePixelData(image),
34+
},
35+
sampling_params=sampling_params)
3636
for o in outputs:
3737
generated_text = o.outputs[0].text
3838
print(generated_text)

0 commit comments

Comments
 (0)