Remove extra contiguous (#5953)

This commit is contained in:
Ke Bao
2025-05-02 00:28:46 +08:00
committed by GitHub
parent 67b7d5b1df
commit de2faef97e

View File

@@ -752,7 +752,7 @@ class DeepseekV2AttentionMLA(nn.Module):
q_nope_out = q_nope_out.transpose(0, 1)
k_nope = latent_cache[..., : self.kv_lora_rank]
k_nope = self.kv_a_layernorm(k_nope.contiguous()).unsqueeze(1)
k_nope = self.kv_a_layernorm(k_nope).unsqueeze(1)
k_pe = latent_cache[..., self.kv_lora_rank :].unsqueeze(1)
q_pe, k_pe = self.rotary_emb(positions, q_pe, k_pe)