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:
@@ -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
|
||||
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user