Revert "Fix nightly test failures: NSA indexer dtype and CPP radix cache init" (#14015)

This commit is contained in:
Baizhou Zhang
2025-11-26 10:45:23 -08:00
committed by GitHub
parent 7e964b5198
commit 8a9b8b8457
2 changed files with 4 additions and 5 deletions
@@ -169,10 +169,9 @@ class Indexer(CustomOp):
@torch.compile(dynamic=True)
def _get_logits_head_gate(self, x: torch.Tensor, q_scale: torch.Tensor):
# Keep x in original dtype (bfloat16) for projection, then convert to float32
weights, _ = self.weights_proj(x)
weights = weights.float() * self.n_heads**-0.5
weights = weights.unsqueeze(-1) * q_scale.float() * self.softmax_scale
weights, _ = self.weights_proj(x.float())
weights = weights * self.n_heads**-0.5
weights = weights.unsqueeze(-1) * q_scale * self.softmax_scale
return weights
def _get_q_k_bf16(