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
c5bc0e7f
Unverified
Commit
c5bc0e7f
authored
Apr 12, 2025
by
Cyrus Leung
Committed by
GitHub
Apr 12, 2025
Browse files
[Misc] Update chat utils tests (#16520)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
4a3a5187
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
tests/entrypoints/test_chat_utils.py
tests/entrypoints/test_chat_utils.py
+7
-0
No files found.
tests/entrypoints/test_chat_utils.py
View file @
c5bc0e7f
...
@@ -25,6 +25,7 @@ EXAMPLES_DIR = VLLM_PATH / "examples"
...
@@ -25,6 +25,7 @@ EXAMPLES_DIR = VLLM_PATH / "examples"
PHI3V_MODEL_ID
=
"microsoft/Phi-3.5-vision-instruct"
PHI3V_MODEL_ID
=
"microsoft/Phi-3.5-vision-instruct"
ULTRAVOX_MODEL_ID
=
"fixie-ai/ultravox-v0_5-llama-3_2-1b"
ULTRAVOX_MODEL_ID
=
"fixie-ai/ultravox-v0_5-llama-3_2-1b"
QWEN2AUDIO_MODEL_ID
=
"Qwen/Qwen2-Audio-7B-Instruct"
QWEN2VL_MODEL_ID
=
"Qwen/Qwen2-VL-2B-Instruct"
QWEN2VL_MODEL_ID
=
"Qwen/Qwen2-VL-2B-Instruct"
QWEN25VL_MODEL_ID
=
"Qwen/Qwen2.5-VL-3B-Instruct"
QWEN25VL_MODEL_ID
=
"Qwen/Qwen2.5-VL-3B-Instruct"
MLLAMA_MODEL_ID
=
"meta-llama/Llama-3.2-11B-Vision-Instruct"
MLLAMA_MODEL_ID
=
"meta-llama/Llama-3.2-11B-Vision-Instruct"
...
@@ -841,6 +842,8 @@ def test_resolve_hf_chat_template(sample_json_schema, model, use_tools):
...
@@ -841,6 +842,8 @@ def test_resolve_hf_chat_template(sample_json_schema, model, use_tools):
assert
isinstance
(
chat_template
,
str
)
assert
isinstance
(
chat_template
,
str
)
# NOTE: Qwen2-Audio default chat template is specially defined inside
# processor class instead of using `tokenizer_config.json`
# yapf: disable
# yapf: disable
@
pytest
.
mark
.
parametrize
(
@
pytest
.
mark
.
parametrize
(
(
"model"
,
"expected_format"
),
(
"model"
,
"expected_format"
),
...
@@ -848,6 +851,7 @@ def test_resolve_hf_chat_template(sample_json_schema, model, use_tools):
...
@@ -848,6 +851,7 @@ def test_resolve_hf_chat_template(sample_json_schema, model, use_tools):
(
QWEN2VL_MODEL_ID
,
"openai"
),
(
QWEN2VL_MODEL_ID
,
"openai"
),
(
QWEN25VL_MODEL_ID
,
"openai"
),
(
QWEN25VL_MODEL_ID
,
"openai"
),
(
ULTRAVOX_MODEL_ID
,
"string"
),
(
ULTRAVOX_MODEL_ID
,
"string"
),
(
QWEN2AUDIO_MODEL_ID
,
"openai"
),
(
MLLAMA_MODEL_ID
,
"openai"
),
(
MLLAMA_MODEL_ID
,
"openai"
),
(
LLAMA_GUARD_MODEL_ID
,
"openai"
)],
(
LLAMA_GUARD_MODEL_ID
,
"openai"
)],
)
)
...
@@ -900,10 +904,13 @@ def test_resolve_content_format_hf_defined(model, expected_format):
...
@@ -900,10 +904,13 @@ def test_resolve_content_format_hf_defined(model, expected_format):
(
"template_chatglm2.jinja"
,
"string"
),
(
"template_chatglm2.jinja"
,
"string"
),
(
"template_chatml.jinja"
,
"string"
),
(
"template_chatml.jinja"
,
"string"
),
(
"template_deepseek_vl2.jinja"
,
"string"
),
(
"template_deepseek_vl2.jinja"
,
"string"
),
(
"template_dse_qwen2_vl.jinja"
,
"openai"
),
(
"template_falcon_180b.jinja"
,
"string"
),
(
"template_falcon_180b.jinja"
,
"string"
),
(
"template_falcon.jinja"
,
"string"
),
(
"template_falcon.jinja"
,
"string"
),
(
"template_florence2.jinja"
,
"string"
),
(
"template_inkbot.jinja"
,
"string"
),
(
"template_inkbot.jinja"
,
"string"
),
(
"template_llava.jinja"
,
"string"
),
(
"template_llava.jinja"
,
"string"
),
(
"template_teleflm.jinja"
,
"string"
),
(
"template_vlm2vec.jinja"
,
"openai"
),
(
"template_vlm2vec.jinja"
,
"openai"
),
(
"tool_chat_template_granite_20b_fc.jinja"
,
"string"
),
(
"tool_chat_template_granite_20b_fc.jinja"
,
"string"
),
(
"tool_chat_template_hermes.jinja"
,
"string"
),
(
"tool_chat_template_hermes.jinja"
,
"string"
),
...
...
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