From 48ebd6f2f164057043edb8301771a17dcaebd61d Mon Sep 17 00:00:00 2001 From: "achyuthan.s" <113010327+Achyuthan-S@users.noreply.github.com> Date: Sun, 26 Jul 2026 06:24:27 +0400 Subject: [PATCH] [Bugfix][KVConnector] Disable cross-layer KV blocks for per-token-head quant (#49226) Signed-off-by: Achyuthan Sivasankar Co-authored-by: Or Ozeri --- vllm/v1/worker/kv_connector_model_runner_mixin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm/v1/worker/kv_connector_model_runner_mixin.py b/vllm/v1/worker/kv_connector_model_runner_mixin.py index c2c54e647d..7a640b875f 100644 --- a/vllm/v1/worker/kv_connector_model_runner_mixin.py +++ b/vllm/v1/worker/kv_connector_model_runner_mixin.py @@ -155,6 +155,10 @@ class KVConnectorModelRunnerMixin: kv_cache_spec = attn_group.kv_cache_spec if not isinstance(kv_cache_spec, AttentionSpec): return False + # Per-token-head quant carves inline-scale views that assume per-layer + # contiguous KV buffers; the cross-layer layout breaks this and corrupts KV. + if kv_cache_spec.kv_quant_mode.is_per_token_head: + return False return kv_cache_spec.indexes_kv_by_block_stride @staticmethod