Fix MTP with Deepseek R1 Fp4 (#7376)

This commit is contained in:
Charles Chen
2025-06-23 21:38:07 -07:00
committed by GitHub
parent d04163b3fa
commit 15f3401343
3 changed files with 20 additions and 1 deletions
@@ -44,6 +44,12 @@ class DeepseekModelNextN(nn.Module):
prefix: str = "",
) -> None:
super().__init__()
if quant_config is not None and quant_config.get_name() == "modelopt_fp4":
logger.warning(
"Overriding DeepseekV3ForCausalLMNextN quant config for modelopt_fp4 Deepseek model."
)
quant_config = None
self.vocab_size = config.vocab_size
self.embed_tokens = VocabParallelEmbedding(