DEBUG: print l1_out shape before gate/up split

This commit is contained in:
2026-06-04 01:49:12 +00:00
parent 8546ed725f
commit 0890e578f4

View File

@@ -433,6 +433,7 @@ class Nvfp4SharedExpert:
intermediate = self._run_l1_fused(hidden_states)
else:
l1_out = self._run_l1(hidden_states)
print(f" SE L1 out: shape={tuple(l1_out.shape)} |max|={l1_out.abs().max().item() if l1_out.numel() > 0 else 'EMPTY'} nan={torch.isnan(l1_out).any().item() if l1_out.numel() > 0 else 'N/A'}", flush=True)
if l1_out.shape[1] < 2 * self.intermediate_size:
print(f" WARNING: l1_out shape {l1_out.shape} < expected (N, {2*self.intermediate_size})", flush=True)