Skip to content

Commit

Permalink
[Bugfix] Fix sampling_params passed incorrectly in Phi3v example (vll…
Browse files Browse the repository at this point in the history
  • Loading branch information
Isotr0py authored and jimpang committed Jul 8, 2024
1 parent eee7993 commit 44f9b94
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/phi3v_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def run_phi3v():
llm = LLM(
model=model_path,
trust_remote_code=True,
max_model_len=4096,
image_input_type="pixel_values",
image_token_id=32044,
image_input_shape="1,3,1008,1344",
Expand All @@ -28,11 +27,12 @@ def run_phi3v():

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

outputs = llm.generate({
"prompt": prompt,
"sampling_params": sampling_params,
"multi_modal_data": ImagePixelData(image),
})
outputs = llm.generate(
{
"prompt": prompt,
"multi_modal_data": ImagePixelData(image),
},
sampling_params=sampling_params)
for o in outputs:
generated_text = o.outputs[0].text
print(generated_text)
Expand Down

0 comments on commit 44f9b94

Please sign in to comment.