Compare commits

...
Author SHA1 Message Date
Nick Hill f794285566 test memory adjustment
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-19 09:03:38 +01:00
Nick Hill 9630ab9a43 Merge remote-tracking branch 'refs/remotes/origin/main' into wentao-mrv2-enable-all-moe 2026-07-19 08:44:37 +01:00
Nick Hill 480c9dc7e7 Merge remote-tracking branch 'refs/remotes/origin/main' into wentao-mrv2-enable-all-moe
# Conflicts:
#	vllm/config/vllm.py

Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-16 11:45:19 +01:00
Nick Hill eed1d68a7b Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>

# Conflicts:
#	vllm/config/vllm.py
2026-07-10 16:24:09 +01:00
Nick Hill af00af61c1 test memory adjustments
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-10 16:23:22 +01:00
Nick Hill f821d37ce6 Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-09 22:49:56 +01:00
Nick Hill 73e0fce52f Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-09 20:41:36 +01:00
Nick Hill 75f27d79e3 Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>

# Conflicts:
#	tests/v1/e2e/general/test_mamba_prefix_cache.py
2026-07-08 14:42:35 +01:00
Nick Hill 848c6b5347 clear cudagraph_manager ref on shutdown
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-03 19:15:47 +01:00
Nick Hill b3aef19fd6 adjust model loading log message to match test expectation
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-03 18:58:46 +01:00
Nick Hill 93c6b216dd Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-03 11:43:02 +01:00
Nick Hill bf96fe96e6 use mrv1 for mrv1-specific test
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-02 22:00:37 +01:00
Nick Hill b0aa5e815f Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-02 18:43:58 +01:00
Nick Hill 9dabdfb88c also use MambaHybridModelState for attention-free models
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-02 18:17:55 +01:00
Nick Hill 064cd5aefe Fix test_config.py
Signed-off-by: Nick Hill <nickhill123@gmail.com>
2026-07-02 17:19:01 +01:00
Nick Hill d98288d6c9 Merge remote-tracking branch 'origin/main' into wentao-mrv2-enable-all-moe
Signed-off-by: Nick Hill <nickhill123@gmail.com>

# Conflicts:
#	vllm/config/vllm.py
2026-07-02 15:44:28 +01:00
Nick HillandGitHub 7192e59902 Merge branch 'main' into wentao-mrv2-enable-all-moe 2026-07-02 09:02:57 +01:00
Wentao YeandGitHub b9844b28a9 Merge branch 'main' into wentao-mrv2-enable-all-moe 2026-06-29 17:37:16 -04:00
yewentao256 3b8e39578b update
Signed-off-by: yewentao256 <zhyanwentao@126.com>
2026-06-24 18:33:47 +00:00
yewentao256 e23c692dbc enable all moe models for mrv2
Signed-off-by: yewentao256 <zhyanwentao@126.com>
2026-06-24 18:31:18 +00:00
12 changed files with 34 additions and 35 deletions
@@ -8,5 +8,6 @@ server_args: >-
--max-model-len 8192
--moe-backend humming
--linear-backend humming
--gpu-memory-utilization 0.85
env:
VLLM_HUMMING_INPUT_QUANT_CONFIG: '{"dtype":"float8e4m3"}'
@@ -8,3 +8,4 @@ server_args: >-
--max-model-len 8192
--moe-backend humming
--linear-backend humming
--gpu-memory-utilization 0.85
@@ -8,5 +8,6 @@ server_args: >-
--max-model-len 8192
--moe-backend humming
--quantization experts_int8
--gpu-memory-utilization 0.85
env:
VLLM_HUMMING_INPUT_QUANT_CONFIG: '{"dtype":"int8"}'
@@ -8,3 +8,4 @@ server_args: >-
--max-model-len 8192
--moe-backend humming
--quantization experts_int8
--gpu-memory-utilization 0.85
@@ -8,3 +8,4 @@ server_args: >-
--max-model-len 8192
--moe-backend humming
--linear-backend humming
--gpu-memory-utilization 0.85
+16 -6
View File
@@ -103,7 +103,7 @@ def test_resolve_cudagraph_mode_adjusts_spec_decode_sizes_only_for_v1(
[
(
SimpleNamespace(
model="Qwen/Qwen3-1.7B-Base",
model="Qwen/Qwen3-32B",
architectures=["Qwen3ForCausalLM"],
runner_type="generate",
is_moe=False,
@@ -113,8 +113,8 @@ def test_resolve_cudagraph_mode_adjusts_spec_decode_sizes_only_for_v1(
),
(
SimpleNamespace(
model="Qwen/Qwen3-32B",
architectures=["Qwen3ForCausalLM"],
model="Qwen/Qwen2-7B-Instruct",
architectures=["Qwen2ForCausalLM"],
runner_type="generate",
is_moe=False,
is_quantized=False,
@@ -181,6 +181,16 @@ def test_resolve_cudagraph_mode_adjusts_spec_decode_sizes_only_for_v1(
),
True,
),
(
SimpleNamespace(
model="deepseek-ai/DeepSeek-V3",
architectures=["DeepseekV3ForCausalLM"],
runner_type="generate",
is_moe=True,
is_quantized=False,
),
True,
),
(
SimpleNamespace(
model="Qwen/Qwen1.5-MoE-A2.7B",
@@ -239,7 +249,7 @@ def test_resolve_cudagraph_mode_adjusts_spec_decode_sizes_only_for_v1(
is_moe=True,
is_quantized=False,
),
False,
True,
),
(
SimpleNamespace(
@@ -260,7 +270,7 @@ def test_resolve_cudagraph_mode_adjusts_spec_decode_sizes_only_for_v1(
is_quantized=False,
is_hybrid=True,
),
False,
True,
),
(
SimpleNamespace(
@@ -271,7 +281,7 @@ def test_resolve_cudagraph_mode_adjusts_spec_decode_sizes_only_for_v1(
is_quantized=False,
is_attention_free=True,
),
False,
True,
),
(
SimpleNamespace(
@@ -840,6 +840,10 @@ def get_mamba_prefix_cache_step_configs(
def _run_mamba_prefix_cache_mrv1(
monkeypatch: pytest.MonkeyPatch, async_scheduling: bool
):
# This test patches the V1 model runner, so pin V1 explicitly: MoE/hybrid
# models like Qwen3-Next now default to the V2 runner.
monkeypatch.setenv("VLLM_USE_V2_MODEL_RUNNER", "0")
envs.disable_envs_cache()
global async_scheduling_mode
async_scheduling_mode = async_scheduling
run_ref_mamba_state_in_subprocess()
@@ -562,6 +562,7 @@ def _run_eagle_correctness(
@single_gpu_only
@large_gpu_mark(min_gb=24)
@pytest.mark.skipif(
current_platform.is_device_capability_family(100),
reason="DeepSeek head_dim=192 not supported on SM100/SM110 (Blackwell)",
@@ -79,6 +79,10 @@ def test_mtp_speculative_mixed_batch_short_prefill(
enable_chunked_prefill=True,
enable_prefix_caching=enable_prefix_caching,
mamba_cache_mode="align" if enable_prefix_caching else "none",
# MRV2 warmup materializes the worst-case spec-decode logits all-gather
# (num_reqs * (1 + num_speculative_tokens) rows), which memory profiling
# does not yet account for. Leave headroom so warmup doesn't OOM.
gpu_memory_utilization=0.85,
) as llm:
sampling_params = SamplingParams(
temperature=0.0,
+1 -27
View File
@@ -65,17 +65,6 @@ else:
logger = init_logger(__name__)
DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES = frozenset(
{
"DeepseekV2ForCausalLM",
"GraniteMoeForCausalLM",
"InklingForCausalLM",
"InklingForConditionalGeneration",
"LongcatFlashNgramForCausalLM",
"Qwen2MoeForCausalLM",
}
)
class OptimizationLevel(IntEnum):
"""Optimization level enum."""
@@ -604,22 +593,7 @@ class VllmConfig:
def _is_default_v2_model_runner_model(self) -> bool:
model_config = self.model_config
if model_config is None:
return False
if model_config.runner_type != "generate":
return False
if getattr(model_config, "is_hybrid", False):
return False
if getattr(model_config, "is_attention_free", False):
return False
architectures = getattr(model_config, "architectures", [])
return (
any(arch in DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES for arch in architectures)
or not model_config.is_moe
)
return model_config is not None and model_config.runner_type == "generate"
@property
def needs_dp_coordinator(self) -> bool:
+2 -1
View File
@@ -303,7 +303,7 @@ class GPUModelRunner(LoRAModelRunnerMixin):
self.model_memory_usage = m.consumed_memory
logger.info(
"Model loading took %s GiB and %.6f seconds",
"Model loading took %s GiB memory and %.6f seconds",
format_gib(m.consumed_memory),
time_after_load - time_before_load,
)
@@ -1590,6 +1590,7 @@ class GPUModelRunner(LoRAModelRunnerMixin):
"""Release GPU tensors (model weights, KV caches, workspace) so that
memory is reclaimable when running in the same process."""
torch.accelerator.synchronize()
self.cudagraph_manager = None
if hasattr(self, "kv_caches"):
self.kv_caches.clear()
if hasattr(self, "attn_groups"):
+1 -1
View File
@@ -27,7 +27,7 @@ def init_model_state(
return EncoderDecoderModelState(vllm_config, model, encoder_cache, device)
if vllm_config.model_config.is_hybrid:
if vllm_config.model_config.is_hybrid or vllm_config.model_config.is_attention_free:
from vllm.v1.worker.gpu.model_states.mamba_hybrid import MambaHybridModelState
return MambaHybridModelState(vllm_config, model, encoder_cache, device)