Skip to content

Commit 3ef41f7

Browse files
Isotr0pypaulpak58
authored andcommitted
[Bugfix] Fix OOM tests in initialization test (vllm-project#21921)
Signed-off-by: Isotr0py <[email protected]> Signed-off-by: Paul Pak <[email protected]>
1 parent aa64e97 commit 3ef41f7

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

tests/models/test_initialization.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
3333
model_info.check_available_online(on_fail="skip")
3434
model_info.check_transformers_version(on_fail="skip")
3535

36-
# FIXME: Possible memory leak in the previous tests?
37-
if model_arch in ("Glm4vForConditionalGeneration",
38-
"GraniteSpeechForConditionalGeneration",
39-
"KimiVLForConditionalGeneration"):
40-
pytest.skip("Avoid OOM")
41-
4236
if model_arch in ("Llama4ForCausalLM", "EagleLlama4ForCausalLM"):
4337
from vllm.model_executor.models.llama4 import Llama4ForCausalLM
4438
from vllm.model_executor.models.registry import ModelRegistry
@@ -87,6 +81,14 @@ def hf_overrides(hf_config: PretrainedConfig) -> PretrainedConfig:
8781
"num_hidden_layers": 1,
8882
})
8983

84+
# e.g.: Qwen/Qwen2-Audio-7B-Instruct
85+
if hasattr(hf_config, "audio_config"):
86+
hf_config.audio_config.update({
87+
"num_layers": 1,
88+
"num_hidden_layers": 1,
89+
"encoder_layers": 1,
90+
})
91+
9092
return hf_config
9193

9294
# Avoid calling model.forward()

vllm/model_executor/models/glm4_1v.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
12751275
vllm_config=vllm_config,
12761276
prefix=maybe_prefix(prefix, ""),
12771277
architectures=["Glm4ForCausalLM"],
1278+
hf_config=self.config.get_text_config(),
12781279
)
12791280

12801281
self.make_empty_intermediate_tensors = (

0 commit comments

Comments
 (0)