fix: L1 gate/up split — intermediate_size is per-projection, not fused

intermediate_size=3072 is the size of gate OR up, not gate+up.
Split L1 output at intermediate_size, not intermediate_size//2.
gate = l1_out[:, :3072], up = l1_out[:, 3072:]
This commit is contained in:
2026-05-16 04:04:40 +00:00
parent 37aa0cbeab
commit 6d17988b51

View File

@@ -165,9 +165,8 @@ class CuTeDSLMoERunner:
# ════════════════════════════════════════════════════════════
# SiLU(gate) * up (BF16)
# ════════════════════════════════════════════════════════════
half = self.intermediate_size // 2
gate = l1_out[:, :half]
up = l1_out[:, half:]
gate = l1_out[:, :self.intermediate_size]
up = l1_out[:, self.intermediate_size:]
activated = torch.nn.functional.silu(gate) * up
# ════════════════════════════════════════════════════════════