A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 14:45 UTC
[Misc] Update chat utils tests (#16520)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Apr 12, 2025 at 14:48 UTC
c5bc0e7fcce38c4a1aa4fae827a222d4014f6294
1 file changed
+7
tests/entrypoints/test_chat_utils.py
+7
@@ -25,6 +25,7 @@ EXAMPLES_DIR = VLLM_PATH / "examples"
25
26
PHI3V_MODEL_ID = "microsoft/Phi-3.5-vision-instruct"
27
ULTRAVOX_MODEL_ID = "fixie-ai/ultravox-v0_5-llama-3_2-1b"
28
+QWEN2AUDIO_MODEL_ID = "Qwen/Qwen2-Audio-7B-Instruct"
29
QWEN2VL_MODEL_ID = "Qwen/Qwen2-VL-2B-Instruct"
30
QWEN25VL_MODEL_ID = "Qwen/Qwen2.5-VL-3B-Instruct"
31
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):
842
assert isinstance(chat_template, str)
843
844
845
+# NOTE: Qwen2-Audio default chat template is specially defined inside
846
+# processor class instead of using `tokenizer_config.json`
847
# yapf: disable
848
@pytest.mark.parametrize(
849
("model", "expected_format"),
@@ -848,6 +851,7 @@ def test_resolve_hf_chat_template(sample_json_schema, model, use_tools):
851
(QWEN2VL_MODEL_ID, "openai"),
852
(QWEN25VL_MODEL_ID, "openai"),
853
(ULTRAVOX_MODEL_ID, "string"),
854
+ (QWEN2AUDIO_MODEL_ID, "openai"),
855
(MLLAMA_MODEL_ID, "openai"),
856
(LLAMA_GUARD_MODEL_ID, "openai")],
857
)
@@ -900,10 +904,13 @@ def test_resolve_content_format_hf_defined(model, expected_format):
904
("template_chatglm2.jinja", "string"),
905
("template_chatml.jinja", "string"),
906
("template_deepseek_vl2.jinja", "string"),
907
+ ("template_dse_qwen2_vl.jinja", "openai"),
908
("template_falcon_180b.jinja", "string"),
909
("template_falcon.jinja", "string"),
910
+ ("template_florence2.jinja", "string"),
911
("template_inkbot.jinja", "string"),
912
("template_llava.jinja", "string"),
913
+ ("template_teleflm.jinja", "string"),
914
("template_vlm2vec.jinja", "openai"),
915
("tool_chat_template_granite_20b_fc.jinja", "string"),
916
("tool_chat_template_hermes.jinja", "string"),