Skip to content

Commit

Permalink
[VLM] Merged multi-modal processor for GLM4V (vllm-project#12449)
Browse files Browse the repository at this point in the history
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
  • Loading branch information
jeejeelee authored Feb 8, 2025
1 parent fe743b7 commit 86222a3
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 167 deletions.
2 changes: 1 addition & 1 deletion docs/source/models/supported_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ See [this page](#generative-models) for more information on how to use generativ
* `THUDM/glm-4v-9b` etc.
* ✅︎
* ✅︎
*
* ✅︎
- * `H2OVLChatModel`
* H2OVL
* T + I<sup>E+</sup>
Expand Down
4 changes: 3 additions & 1 deletion examples/offline_inference/vision_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ def run_glm4v(question: str, modality: str):
trust_remote_code=True,
enforce_eager=True,
disable_mm_preprocessor_cache=args.disable_mm_preprocessor_cache)
prompt = question
prompt = f"<|user|>\n<|begin_of_image|><|endoftext|><|end_of_image|>\
{question}<|assistant|>"

stop_token_ids = [151329, 151336, 151338]
return llm, prompt, stop_token_ids

Expand Down
1 change: 1 addition & 0 deletions tests/models/multimodal/processing/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def _test_processing_correctness(
"facebook/chameleon-7b",
"deepseek-ai/deepseek-vl2-tiny",
"adept/fuyu-8b",
"THUDM/glm-4v-9b",
"h2oai/h2ovl-mississippi-800m",
"OpenGVLab/InternVL2-1B",
"HuggingFaceM4/Idefics3-8B-Llama3",
Expand Down
Loading

0 comments on commit 86222a3

Please sign in to comment.