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 24, 2024
1 parent 64332bc commit cee8edb
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 cee8edb

Please sign in to comment.