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
360ddbd3
Unverified
Commit
360ddbd3
authored
Sep 12, 2024
by
Roger Wang
Committed by
GitHub
Sep 12, 2024
Browse files
[Misc] Update Pixtral example (#8431)
parent
a480939e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/offline_inference_pixtral.py
examples/offline_inference_pixtral.py
+3
-2
No files found.
examples/offline_inference_pixtral.py
View file @
360ddbd3
...
@@ -11,7 +11,7 @@ from vllm.sampling_params import SamplingParams
...
@@ -11,7 +11,7 @@ from vllm.sampling_params import SamplingParams
# - Server:
# - Server:
#
#
# ```bash
# ```bash
# vllm serve mistralai/Pixtral-12B-2409 --tokenizer
_
mode mistral --limit
_
mm
_
per
_
prompt 'image=4' --max
_num_batched_tok
en
s
16384
# vllm serve mistralai/Pixtral-12B-2409 --tokenizer
-
mode mistral --limit
-
mm
-
per
-
prompt 'image=4' --max
-model-l
en 16384
# ```
# ```
#
#
# - Client:
# - Client:
...
@@ -45,6 +45,7 @@ def run_simple_demo():
...
@@ -45,6 +45,7 @@ def run_simple_demo():
model_name
=
"mistralai/Pixtral-12B-2409"
model_name
=
"mistralai/Pixtral-12B-2409"
sampling_params
=
SamplingParams
(
max_tokens
=
8192
)
sampling_params
=
SamplingParams
(
max_tokens
=
8192
)
# Lower max_num_seqs or max_model_len on low-VRAM GPUs.
llm
=
LLM
(
model
=
model_name
,
tokenizer_mode
=
"mistral"
)
llm
=
LLM
(
model
=
model_name
,
tokenizer_mode
=
"mistral"
)
prompt
=
"Describe this image in one sentence."
prompt
=
"Describe this image in one sentence."
...
@@ -83,7 +84,7 @@ def run_advanced_demo():
...
@@ -83,7 +84,7 @@ def run_advanced_demo():
model
=
model_name
,
model
=
model_name
,
tokenizer_mode
=
"mistral"
,
tokenizer_mode
=
"mistral"
,
limit_mm_per_prompt
=
{
"image"
:
max_img_per_msg
},
limit_mm_per_prompt
=
{
"image"
:
max_img_per_msg
},
max_
num_batched_tok
en
s
=
max_img_per_msg
*
max_tokens_per_img
,
max_
model_l
en
=
max_img_per_msg
*
max_tokens_per_img
,
)
)
prompt
=
"Describe the following image."
prompt
=
"Describe the following image."
...
...
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