Skip to content

Commit ba42e05

Browse files
jeejeeleelulmer
authored andcommitted
[VLM] Merged multi-modal processor for GLM4V (vllm-project#12449)
Signed-off-by: Jee Jee Li <[email protected]> Signed-off-by: Louis Ulmer <[email protected]>
1 parent 59392a8 commit ba42e05

File tree

4 files changed

+222
-167
lines changed

4 files changed

+222
-167
lines changed

docs/source/models/supported_models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ See [this page](#generative-models) for more information on how to use generativ
719719
* `THUDM/glm-4v-9b` etc.
720720
* ✅︎
721721
* ✅︎
722-
*
722+
* ✅︎
723723
- * `H2OVLChatModel`
724724
* H2OVL
725725
* T + I<sup>E+</sup>

examples/offline_inference/vision_language.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ def run_glm4v(question: str, modality: str):
106106
trust_remote_code=True,
107107
enforce_eager=True,
108108
disable_mm_preprocessor_cache=args.disable_mm_preprocessor_cache)
109-
prompt = question
109+
prompt = f"<|user|>\n<|begin_of_image|><|endoftext|><|end_of_image|>\
110+
{question}<|assistant|>"
111+
110112
stop_token_ids = [151329, 151336, 151338]
111113
return llm, prompt, stop_token_ids
112114

tests/models/multimodal/processing/test_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def _test_processing_correctness(
147147
"facebook/chameleon-7b",
148148
"deepseek-ai/deepseek-vl2-tiny",
149149
"adept/fuyu-8b",
150+
"THUDM/glm-4v-9b",
150151
"h2oai/h2ovl-mississippi-800m",
151152
"OpenGVLab/InternVL2-1B",
152153
"HuggingFaceM4/Idefics3-8B-Llama3",

0 commit comments

Comments
 (0)