[DCP] Default query replication for GLM sparse attention (#50382)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lucas Wilkinson
2026-08-21 09:07:05 -07:00
committed by GitHub
co-authored by OpenAI Codex Claude Opus 5
parent cd7b7c265a
commit 72aedcc426
6 changed files with 62 additions and 20 deletions
+7 -1
View File
@@ -1041,8 +1041,14 @@ class DeepseekV2MLAAttention(nn.Module):
prefix=f"{prefix}.kv_a_proj_with_mqa",
)
qrep_enabled = (
# The env var predates the config field and still wins if set explicitly.
qrep_requested = (
envs.VLLM_DCP_Q_REPLICATE
if envs.is_set("VLLM_DCP_Q_REPLICATE")
else bool(vllm_config.parallel_config.dcp_q_replicate)
)
qrep_enabled = (
qrep_requested
and vllm_config.parallel_config.decode_context_parallel_size > 1
and vllm_config.parallel_config.prefill_context_parallel_size <= 1
)