Don't fuse wk+weight_proj for nextn (#12863)
This commit is contained in:
@@ -3593,8 +3593,10 @@ class DeepseekV2ForCausalLM(nn.Module):
|
||||
self.config.q_lora_rank is not None
|
||||
)
|
||||
cached_a_proj = {} if fuse_qkv_a_proj else None
|
||||
fuse_wk_and_weights_proj = is_nsa_indexer_wk_and_weights_proj_fused(
|
||||
self.config, self.quant_config
|
||||
# Fuse wk and weights_proj when NSA Indexer is enabled and quant_config is FP4. For nextn, fp4 is disabled so we cannot fuse.
|
||||
fuse_wk_and_weights_proj = (
|
||||
is_nsa_indexer_wk_and_weights_proj_fused(self.config, self.quant_config)
|
||||
and not is_nextn
|
||||
)
|
||||
cached_wk_and_weights_proj = {} if fuse_wk_and_weights_proj else None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user