forked from Karylab-cklius/vllm
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f794285566 | ||
|
|
9630ab9a43 | ||
|
|
480c9dc7e7 | ||
|
|
eed1d68a7b | ||
|
|
af00af61c1 | ||
|
|
f821d37ce6 | ||
|
|
73e0fce52f | ||
|
|
75f27d79e3 | ||
|
|
848c6b5347 | ||
|
|
b3aef19fd6 | ||
|
|
93c6b216dd | ||
|
|
bf96fe96e6 | ||
|
|
b0aa5e815f | ||
|
|
9dabdfb88c | ||
|
|
064cd5aefe | ||
|
|
d98288d6c9 | ||
|
|
7192e59902 | ||
|
|
b9844b28a9 | ||
|
|
3b8e39578b | ||
|
|
e23c692dbc |
@@ -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
@@ -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
@@ -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:
|
||||
|
||||
@@ -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"):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user