A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 22:35 UTC
[Bugfix] Fix OOM tests in initialization test (#21921)
Signed-off-by: Isotr0py <2037008807@qq.com>
Isotr0py committed
Jul 30, 2025 at 22:35 UTC
6e599eebe8655dab75462a8a165f6d811d0d845f
2 files changed
+9
-6
tests/models/test_initialization.py
+8
-6
@@ -33,12 +33,6 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
33
model_info.check_available_online(on_fail="skip")
34
model_info.check_transformers_version(on_fail="skip")
35
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
-
36
if model_arch in ("Llama4ForCausalLM", "EagleLlama4ForCausalLM"):
37
from vllm.model_executor.models.llama4 import Llama4ForCausalLM
38
from vllm.model_executor.models.registry import ModelRegistry
@@ -87,6 +81,14 @@ def can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch,
81
"num_hidden_layers": 1,
82
})
83
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
+
92
return hf_config
93
94
# Avoid calling model.forward()
vllm/model_executor/models/glm4_1v.py
+1
@@ -1275,6 +1275,7 @@ class Glm4vForConditionalGeneration(nn.Module, SupportsMultiModal,
1275
vllm_config=vllm_config,
1276
prefix=maybe_prefix(prefix, ""),
1277
architectures=["Glm4ForCausalLM"],
1278
+ hf_config=self.config.get_text_config(),
1279
)
1280
1281
self.make_empty_intermediate_tensors = (