[QSA] Tag every raw-key ring row and validate it before pooling
The fused pre-indexer could read a stale or uncommitted raw-key ring row and pass its int64 tail to RoPE as a position (illegal address). The writer now tags each row with logical_position + 1; the reader checks the tag of every source row and, on a mismatch, masks the pooled load, the RoPE-tail read and the compressed-slot store. New guard site 11 (always fatal under warn). The KV pool size is unchanged. Co-Authored-By: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -119,6 +119,15 @@ class QSAIndexer(nn.Module):
|
||||
eps=float(getattr(config, "rms_norm_eps", 1e-6)),
|
||||
)
|
||||
|
||||
# QSAKeyStateCache rows now carry
|
||||
# a tag word the NVIDIA pre-indexer writes and validates; this path
|
||||
# neither writes nor checks it, so it would run the widened layout
|
||||
# with no ring validation at all. Refuse it rather than share it.
|
||||
raise NotImplementedError(
|
||||
"Qwen4Exp QSA on the AMD path is not supported on this fork: the "
|
||||
"ring-row tag contract is implemented for the NVIDIA "
|
||||
"pre-indexer only (vllm/models/qwen4_exp/nvidia/ops/qsa_pre_indexer.py)."
|
||||
)
|
||||
cache_config = vllm_config.cache_config
|
||||
cache_prefix = f"{prefix}." if prefix else ""
|
||||
self.raw_key_cache = QSAKeyStateCache(
|
||||
|
||||
Reference in New Issue
Block a user