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
6e599eeb
Unverified
Commit
6e599eeb
authored
Jul 30, 2025
by
Isotr0py
Committed by
GitHub
Jul 30, 2025
Browse files
[Bugfix] Fix OOM tests in initialization test (#21921)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
88edf599
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
tests/models/test_initialization.py
tests/models/test_initialization.py
+8
-6
vllm/model_executor/models/glm4_1v.py
vllm/model_executor/models/glm4_1v.py
+1
-0
No files found.
tests/models/test_initialization.py
View file @
6e599eeb
...
@@ -33,12 +33,6 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
...
@@ -33,12 +33,6 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
model_info
.
check_available_online
(
on_fail
=
"skip"
)
model_info
.
check_available_online
(
on_fail
=
"skip"
)
model_info
.
check_transformers_version
(
on_fail
=
"skip"
)
model_info
.
check_transformers_version
(
on_fail
=
"skip"
)
# FIXME: Possible memory leak in the previous tests?
if
model_arch
in
(
"Glm4vForConditionalGeneration"
,
"GraniteSpeechForConditionalGeneration"
,
"KimiVLForConditionalGeneration"
):
pytest
.
skip
(
"Avoid OOM"
)
if
model_arch
in
(
"Llama4ForCausalLM"
,
"EagleLlama4ForCausalLM"
):
if
model_arch
in
(
"Llama4ForCausalLM"
,
"EagleLlama4ForCausalLM"
):
from
vllm.model_executor.models.llama4
import
Llama4ForCausalLM
from
vllm.model_executor.models.llama4
import
Llama4ForCausalLM
from
vllm.model_executor.models.registry
import
ModelRegistry
from
vllm.model_executor.models.registry
import
ModelRegistry
...
@@ -87,6 +81,14 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
...
@@ -87,6 +81,14 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
"num_hidden_layers"
:
1
,
"num_hidden_layers"
:
1
,
})
})
# e.g.: Qwen/Qwen2-Audio-7B-Instruct
if
hasattr
(
hf_config
,
"audio_config"
):
hf_config
.
audio_config
.
update
({
"num_layers"
:
1
,
"num_hidden_layers"
:
1
,
"encoder_layers"
:
1
,
})
return
hf_config
return
hf_config
# Avoid calling model.forward()
# Avoid calling model.forward()
...
...
vllm/model_executor/models/glm4_1v.py
View file @
6e599eeb
...
@@ -1275,6 +1275,7 @@ class Glm4vForConditionalGeneration(nn.Module, SupportsMultiModal,
...
@@ -1275,6 +1275,7 @@ class Glm4vForConditionalGeneration(nn.Module, SupportsMultiModal,
vllm_config
=
vllm_config
,
vllm_config
=
vllm_config
,
prefix
=
maybe_prefix
(
prefix
,
""
),
prefix
=
maybe_prefix
(
prefix
,
""
),
architectures
=
[
"Glm4ForCausalLM"
],
architectures
=
[
"Glm4ForCausalLM"
],
hf_config
=
self
.
config
.
get_text_config
(),
)
)
self
.
make_empty_intermediate_tensors
=
(
self
.
make_empty_intermediate_tensors
=
(
...
...
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