(cherry picked from commit 60d31cb0c268c4b733ab290e133e3763b65f090e)
This commit is contained in:
abing
2026-09-20 22:07:24 +08:00
committed by minke.yu
parent 21a4a16b4b
commit 8305f66fc8
+6 -3
View File
@@ -4873,10 +4873,13 @@ class DeepseekV4ForCausalLM(nn.Module):
self.wo_a_fp8 = wo_a_fp8_gemm_enabled(quant_config)
self.determine_num_fused_shared_experts()
self.vision = None
if config.model_type == "deepseek_v41" and config.vision_n_layers > 0:
if (
config.model_type == "deepseek_v41"
and config.vision_n_layers > 0
and not getattr(config, "language_model_only", False)
):
if (
get_parallel().attn_cp_size != 1
or get_parallel().pp_group.world_size != 1
get_parallel().pp_group.world_size != 1
or not get_moe_a2a_backend().is_none()
):
raise ValueError(