From 7000762309b6ee50d6de42e61747a2d1e9ab5a36 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Mon, 1 Jun 2026 03:09:11 +0000 Subject: [PATCH] diag: fix SE weight attribute name --- single_shot_inference.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/single_shot_inference.py b/single_shot_inference.py index e0854e32..427769a1 100644 --- a/single_shot_inference.py +++ b/single_shot_inference.py @@ -429,9 +429,9 @@ def moe_forward(x, li, moe_runner, se_runner, router, token_id): print(f" L{li} SE CUDA ERROR: {e}", flush=True) print(f" L{li} MoE shared: |out|={shared_out.abs().max().item():.4f} has_nan={torch.isnan(shared_out).any().item()} cuda_ok={cuda_ok}", flush=True) # Check SE weight integrity - if hasattr(se_runner, 'l1_mat_b') and se_runner.l1_mat_b is not None: - w = se_runner.l1_mat_b - print(f" L{li} SE l1_mat_b: |max|={w.abs().max().item():.4f} has_nan={torch.isnan(w.view(torch.float16)).any().item()} shape={w.shape}", flush=True) + if hasattr(se_runner, '_l1_mat_b') and se_runner._l1_mat_b is not None: + w = se_runner._l1_mat_b + print(f" L{li} SE _l1_mat_b: |max|={w.abs().max().item():.4f} has_nan={torch.isnan(w.view(torch.float16)).any().item()} shape={w.shape}", flush=True) print(f" L{li} SE gsa: l1={se_runner._l1_activation_global_scale:.6f} l2={se_runner._l2_activation_global_scale:.6f} gsb: l1={se_runner._l1_gsb[0].item():.6f} l2={se_runner._l2_gsb[0].item():.6f}", flush=True) return routed_out + shared_out