Merge remote-tracking branch 'upstream/main' into patches

This commit is contained in:
2026-10-05 08:52:31 +07:00
85 changed files with 3146 additions and 769 deletions
+5
View File
@@ -111,6 +111,8 @@ LayerBlockType = Literal["attention", "linear_attention", "mamba"]
_ATTENTION_LAYER_TYPES = frozenset(
{
"full_attention",
"indexed_attention",
# TODO: Delete below once Transformers 5.18.0 is the minimum required version.
"deepseek_sparse_attention",
"qwen_sparse_attention",
}
@@ -376,6 +378,9 @@ class ModelConfig:
(default) uses the built-in ``CuMemAllocator`` and is behavior-compatible
with prior releases. Additional backends (CUDA checkpoint, CRIU, durable
snapshot) may be registered in-tree or by plugins (RFC #34303)."""
sleep_mode_offload_cudagraph: bool = False
"""Back up CUDA graph memory to CPU during sleep, restored in place on wake.
Takes effect with enable_sleep_mode, the cumem backend and CUDA graphs."""
enable_nccl_comm_suspend: bool = False
"""Enable releasing NCCL communicator memory during sleep mode
(``ncclCommSuspend``/``ncclCommResume``). Experimental; when disabled
+1 -1
View File
@@ -960,7 +960,7 @@ class SpeculativeConfig:
"architectures": [architecture],
}
)
if hf_config.model_type in ("longcat_flash", "longcat_flash_ngram"):
if hf_config.model_type == "longcat_flash":
hf_config.model_type = "longcat_flash_mtp"
n_predict = getattr(hf_config, "num_nextn_predict_layers", 1)
hf_config.update(
+23
View File
@@ -704,6 +704,21 @@ class VllmConfig:
"""
return 1 + self.num_speculative_tokens
@property
def use_cumem_cudagraph_pool(self) -> bool:
"""Whether CUDA graphs go to the cuMem pool that sleep offloads."""
from vllm.platforms import current_platform
model_config = self.model_config
return (
model_config is not None
and model_config.sleep_mode_offload_cudagraph
and model_config.enable_sleep_mode
and model_config.sleep_mode_backend == "cumem"
and self.compilation_config.cudagraph_mode != CUDAGraphMode.NONE
and current_platform.is_cuda()
)
@property
def use_v2_model_runner(self) -> bool:
if self.attention_config.hisparse_config is not None:
@@ -2328,6 +2343,14 @@ class VllmConfig:
custom_ops.append("+quant_fp8")
self._verify_kv_transfer_compat()
if self.use_cumem_cudagraph_pool:
# NCCL graph registration pins the offloaded pool; workers inherit this.
value = os.environ.setdefault("NCCL_GRAPH_REGISTER", "0")
if value != "0":
logger.warning(
"NCCL_GRAPH_REGISTER=%s pins the CUDA graph pool during sleep.",
value,
)
# Log the custom passes that are enabled
self.compilation_config.pass_config.log_enabled_passes()