project6
c17c490e06
fix(GDN): remove pre-cumsum clamp — match xllm reference, fix 99.98% NaN
ROOT CAUSE: g.clamp(-5,2) before cumsum corrupted gate values.
The GDN algorithm computes decay_mask = exp(g_i - g_j) which is
numerically stable via subtraction cancelling cumsum growth.
Pre-clamping g distorts these differences → wrong decay rates → NaN.
xllm reference: qwen3_gated_delta_net_base.cpp lines 170-238
- cumsum first (no pre-clamp)
- difference form: (g_i_last - g[:, i]).exp() for state update
- k_cumdecay uses g.exp() directly (not clamped)
Removed: g.clamp(-5,2), g.clamp(-20,20), g_exp_cache, g_clamped
Added: xllm-style g_i_last/g_exp_term/k_g_exp state update
2026-08-10 07:44:03 +00:00
..
2026-08-10 04:44:05 +00:00
2026-07-30 16:06:20 +00:00
2026-07-30 16:06:20 +00:00
2026-08-07 07:55:04 +00:00
2026-08-10 07:41:53 +00:00
2026-08-08 07:01:37 +00:00
2026-08-05 08:24:43 +00:00
2026-08-07 07:05:40 +00:00
2026-07-30 16:06:20 +00:00
2026-08-05 08:24:43 +00:00
2026-08-08 10:48:01 +00:00
2026-08-07 08:56:36 +00:00
2026-08-07 04:37:44 +00:00
2026-08-08 10:48:01 +00:00
2026-08-08 10:48:01 +00:00
2026-08-07 09:58:35 +00:00
2026-08-10 07:41:53 +00:00
2026-08-07 10:02:09 +00:00
2026-08-08 10:48:01 +00:00
2026-08-08 10:48:01 +00:00
2026-08-08 10:48:01 +00:00
2026-08-08 10:48:01 +00:00
2026-08-08 10:48:01 +00:00
2026-08-10 01:08:38 +00:00
2026-08-07 02:46:46 +00:00
2026-08-08 11:21:43 +00:00
2026-08-08 07:36:31 +00:00
2026-08-08 08:10:55 +00:00
2026-08-10 07:44:03 +00:00
2026-08-08 07:02:22 +00:00
2026-08-05 08:36:52 +00:00
2026-08-06 02:55:51 +00:00
2026-07-30 16:06:20 +00:00
2026-07-30 16:06:20 +00:00
2026-08-10 00:15:06 +00:00
2026-08-05 08:36:52 +00:00
2026-08-07 06:36:12 +00:00
2026-08-07 01:54:52 +00:00