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
fde0b611
Unverified
Commit
fde0b611
authored
Aug 13, 2025
by
Jee Jee Li
Committed by
GitHub
Aug 12, 2025
Browse files
[Model] Decouple glm4v (#22751)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
d0a63015
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
docs/models/supported_models.md
docs/models/supported_models.md
+1
-1
vllm/model_executor/models/glm4_1v.py
vllm/model_executor/models/glm4_1v.py
+21
-5
vllm/model_executor/models/registry.py
vllm/model_executor/models/registry.py
+1
-1
No files found.
docs/models/supported_models.md
View file @
fde0b611
...
...
@@ -615,7 +615,7 @@ These models primarily accept the [`LLM.generate`](./generative_models.md#llmgen
|
`Gemma3nForConditionalGeneration`
| Gemma 3n | T + I + A |
`google/gemma-3n-E2B-it`
,
`google/gemma-3n-E4B-it`
, etc. | | | ✅︎ |
|
`GLM4VForCausalLM`
<sup>
^
</sup>
| GLM-4V | T + I |
`zai-org/glm-4v-9b`
,
`zai-org/cogagent-9b-20241220`
, etc. | ✅︎ | ✅︎ | ✅︎ |
|
`Glm4vForConditionalGeneration`
| GLM-4.1V-Thinking | T + I
<sup>
E+
</sup>
+ V
<sup>
E+
</sup>
|
`zai-org/GLM-4.1V-9B-Thinking`
, etc. | ✅︎ | ✅︎ | ✅︎ |
|
`Glm4vMoeForConditionalGeneration`
| GLM-4.5V | T + I
<sup>
E+
</sup>
+ V
<sup>
E+
</sup>
|
`zai-org/GLM-4.5V`
, etc. |
✅︎
| ✅︎ | ✅︎ |
|
`Glm4vMoeForConditionalGeneration`
| GLM-4.5V | T + I
<sup>
E+
</sup>
+ V
<sup>
E+
</sup>
|
`zai-org/GLM-4.5V`
, etc. | | ✅︎ | ✅︎ |
|
`GraniteSpeechForConditionalGeneration`
| Granite Speech | T + A |
`ibm-granite/granite-speech-3.3-8b`
| ✅︎ | ✅︎ | ✅︎ |
|
`H2OVLChatModel`
| H2OVL | T + I
<sup>
E+
</sup>
|
`h2oai/h2ovl-mississippi-800m`
,
`h2oai/h2ovl-mississippi-2b`
, etc. | | ✅︎ | ✅︎ |
|
`Idefics3ForConditionalGeneration`
| Idefics3 | T + I |
`HuggingFaceM4/Idefics3-8B-Llama3`
, etc. | ✅︎ | | ✅︎ |
...
...
vllm/model_executor/models/glm4_1v.py
View file @
fde0b611
...
...
@@ -1227,10 +1227,7 @@ class Glm4vForConditionalGeneration(nn.Module, SupportsMultiModal,
"k_proj"
,
"v_proj"
,
],
"gate_up_proj"
:
[
"gate_proj"
,
"up_proj"
,
],
"gate_up_proj"
:
[
"gate_up_proj"
]
}
# To ensure correct weight loading and mapping.
...
...
@@ -1567,7 +1564,26 @@ class Glm4vForConditionalGeneration(nn.Module, SupportsMultiModal,
Get the module prefix in multimodal models
"""
return
MultiModelKeys
.
from_string_field
(
language_model
=
"language_model"
,
language_model
=
"language_model
.model
"
,
connector
=
"visual.merger."
,
tower_model
=
"visual."
,
)
@
MULTIMODAL_REGISTRY
.
register_processor
(
Glm4vMultiModalProcessor
,
info
=
Glm4vProcessingInfo
,
dummy_inputs
=
Glm4vDummyInputsBuilder
,
)
class
Glm4vMoeForConditionalGeneration
(
Glm4vForConditionalGeneration
):
packed_modules_mapping
=
{
"qkv_proj"
:
[
"q_proj"
,
"k_proj"
,
"v_proj"
,
],
"gate_up_proj"
:
[
"gate_proj"
,
"up_proj"
,
],
}
vllm/model_executor/models/registry.py
View file @
fde0b611
...
...
@@ -208,7 +208,7 @@ _MULTIMODAL_MODELS = {
"Gemma3nForConditionalGeneration"
:
(
"gemma3n_mm"
,
"Gemma3nForConditionalGeneration"
),
# noqa: E501
"GLM4VForCausalLM"
:
(
"glm4v"
,
"GLM4VForCausalLM"
),
"Glm4vForConditionalGeneration"
:
(
"glm4_1v"
,
"Glm4vForConditionalGeneration"
),
# noqa: E501
"Glm4vMoeForConditionalGeneration"
:
(
"glm4_1v"
,
"Glm4vForConditionalGeneration"
),
# noqa: E501
"Glm4vMoeForConditionalGeneration"
:
(
"glm4_1v"
,
"Glm4v
Moe
ForConditionalGeneration"
),
# noqa: E501
"GraniteSpeechForConditionalGeneration"
:
(
"granite_speech"
,
"GraniteSpeechForConditionalGeneration"
),
# noqa: E501
"H2OVLChatModel"
:
(
"h2ovl"
,
"H2OVLChatModel"
),
"InternVLChatModel"
:
(
"internvl"
,
"InternVLChatModel"
),
...
...
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