Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
7d46c8d3
Unverified
Commit
7d46c8d3
authored
Jun 19, 2024
by
Isotr0py
Committed by
GitHub
Jun 19, 2024
Browse files
[Bugfix] Fix sampling_params passed incorrectly in Phi3v example (#5684)
parent
da971ec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
examples/phi3v_example.py
examples/phi3v_example.py
+6
-6
No files found.
examples/phi3v_example.py
View file @
7d46c8d3
...
@@ -12,7 +12,6 @@ def run_phi3v():
...
@@ -12,7 +12,6 @@ def run_phi3v():
llm
=
LLM
(
llm
=
LLM
(
model
=
model_path
,
model
=
model_path
,
trust_remote_code
=
True
,
trust_remote_code
=
True
,
max_model_len
=
4096
,
image_input_type
=
"pixel_values"
,
image_input_type
=
"pixel_values"
,
image_token_id
=
32044
,
image_token_id
=
32044
,
image_input_shape
=
"1,3,1008,1344"
,
image_input_shape
=
"1,3,1008,1344"
,
...
@@ -28,11 +27,12 @@ def run_phi3v():
...
@@ -28,11 +27,12 @@ def run_phi3v():
sampling_params
=
SamplingParams
(
temperature
=
0
,
max_tokens
=
64
)
sampling_params
=
SamplingParams
(
temperature
=
0
,
max_tokens
=
64
)
outputs
=
llm
.
generate
({
outputs
=
llm
.
generate
(
"prompt"
:
prompt
,
{
"sampling_params"
:
sampling_params
,
"prompt"
:
prompt
,
"multi_modal_data"
:
ImagePixelData
(
image
),
"multi_modal_data"
:
ImagePixelData
(
image
),
})
},
sampling_params
=
sampling_params
)
for
o
in
outputs
:
for
o
in
outputs
:
generated_text
=
o
.
outputs
[
0
].
text
generated_text
=
o
.
outputs
[
0
].
text
print
(
generated_text
)
print
(
generated_text
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment