DEBUG: check intermediate magnitude before SE L2
This commit is contained in:
@@ -443,6 +443,8 @@ class Nvfp4SharedExpert:
|
||||
gate = gate.clamp(max=self.swiglu_limit)
|
||||
up = up.clamp(min=-self.swiglu_limit, max=self.swiglu_limit)
|
||||
intermediate = torch.nn.functional.silu(gate) * up
|
||||
# DEBUG: check intermediate before L2
|
||||
print(f" SE intermediate: shape={tuple(intermediate.shape)} |max|={intermediate.abs().max().item():.6f} nan={torch.isnan(intermediate).any().item()}", flush=True)
|
||||
|
||||
output = self._run_l2(intermediate)
|
||||
return output
|
||||
|
||||
Reference in New Issue
Block a user