[3/N] HiSparse: host-resident sparse-MLA decode hot-buffering (#53781)

Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Signed-off-by: Lucas Wilkinson <lwilkinson@neuralmagic.com>
Signed-off-by: Matthew Bonanni <matthew@neuralmagic.com>
Signed-off-by: Nicolò Lucchesi <nicolo.lucchesi@mistral.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: Lucas Wilkinson <lwilkinson@neuralmagic.com>
Co-authored-by: Nicolò Lucchesi <nicolo.lucchesi@mistral.ai>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com>
This commit is contained in:
Matthew Bonanni
2026-09-12 00:36:47 -04:00
committed by GitHub
co-authored by OpenAI Codex Lucas Wilkinson Lucas Wilkinson Nicolò Lucchesi OpenAI Codex Claude Opus 5 Lucas Wilkinson
parent 120ec4ebd2
commit d43bb2f37f
124 changed files with 14262 additions and 906 deletions
+51
View File
@@ -666,6 +666,14 @@ class VllmConfig:
@property
def use_v2_model_runner(self) -> bool:
if self.attention_config.hisparse_config is not None:
if envs.VLLM_USE_V2_MODEL_RUNNER is False:
raise ValueError(
"HiSparse requires Model Runner V2; remove "
"VLLM_USE_V2_MODEL_RUNNER=0."
)
return True
if getattr(self, "watermark_config", None) is not None:
if envs.VLLM_USE_V2_MODEL_RUNNER is False:
logger.info_once(
@@ -1559,6 +1567,39 @@ class VllmConfig:
self._maybe_disable_dynamic_sd_for_data_parallel()
self._maybe_override_dynamic_sd_cudagraph_mode()
if self.attention_config.hisparse_config is not None:
if not current_platform.is_cuda():
raise ValueError("HiSparse currently requires NVIDIA CUDA.")
if self.parallel_config.pipeline_parallel_size > 1:
raise ValueError("HiSparse does not support pipeline parallelism.")
if self.parallel_config.decode_context_parallel_size > 1:
raise ValueError(
"HiSparse does not support decode context parallelism."
)
if self.model_config is not None and not hasattr(
self.model_config.hf_config, "index_topk"
):
raise ValueError(
"HiSparse is only supported for DSA models with index_topk."
)
if self.kv_transfer_config is not None and (
self.kv_transfer_config.kv_connector
not in (
None,
"NixlConnector",
"MooncakeStoreConnector",
"MultiConnector",
)
):
logger.warning(
"HiSparse host-resident KV is configured with connector "
"%s. NixlConnector (GPU-staged host imports) and "
"MooncakeStoreConnector (shared-store offload) are the "
"validated paths; other connectors are treated as "
"debug/fallback paths.",
self.kv_transfer_config.kv_connector,
)
self._normalize_piecewise_cudagraph_mode(
breakable_cudagraph_enabled=breakable_cudagraph_enabled
)
@@ -1937,6 +1978,16 @@ class VllmConfig:
# Default to enable HMA if not explicitly disabled by user or logic above.
self.scheduler_config.disable_hybrid_kv_cache_manager = False
if (
self.attention_config.hisparse_config is not None
and self.scheduler_config.disable_hybrid_kv_cache_manager
):
raise ValueError(
"HiSparse requires the hybrid KV cache manager; remove "
"--disable-hybrid-kv-cache-manager or use connectors that "
"support HMA."
)
if self.compilation_config.debug_dump_path:
self.compilation_config.debug_dump_path = (
self.compilation_config.debug_dump_path.absolute().expanduser()