From 469d6ce606a2a00dd6695ce2bd7c7851c0088799 Mon Sep 17 00:00:00 2001 From: Yuren Hao Date: Wed, 29 Jul 2026 12:16:02 -0500 Subject: =?UTF-8?q?RESULT=2072:=20=E5=89=82=E9=87=8F=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=E9=80=9A=E9=A1=B6=20=E2=80=94=20dg128=E5=85=B3=E9=97=AD97%(?= =?UTF-8?q?=E8=B7=9Dall-BP=E6=9D=860.0015),=E7=89=A9=E7=90=86=E6=B3=84?= =?UTF-8?q?=E6=BC=8F=E5=AE=8C=E5=85=A8=E5=8F=AF=E8=B5=8E=E5=9B=9E;=20?= =?UTF-8?q?=E5=AF=B9=E6=95=B0=E5=BE=8B=E5=85=A8=E7=A8=8B=E6=88=90=E7=AB=8B?= =?UTF-8?q?34=E2=86=9297%;=20dgrand=E8=B4=A5=E4=BA=8E=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E6=A1=A3;=20=E6=BB=A1=E5=89=82=E9=87=8F=E9=AA=8C=E8=AF=81fw135?= =?UTF-8?q?m=5Fdg128=E4=B8=89=E5=8D=A1=E5=8F=91=E5=B0=84(~22h,=E5=88=A4?= =?UTF-8?q?=E6=8D=AE=3D=E7=BB=88=E7=82=B9=E5=9B=9E72M=20gap=E5=B8=A6);=20?= =?UTF-8?q?=E9=81=97=E7=95=99=E9=97=AE=E9=A2=98=3D=E5=89=82=E9=87=8F-?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E6=A0=87=E5=BA=A6(270M=E7=AD=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014FAPDWQ49M5Ye3NpTndTpn --- ep_run/casc_eq_train.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ep_run/casc_eq_train.py') diff --git a/ep_run/casc_eq_train.py b/ep_run/casc_eq_train.py index d7cfdf7..0e357c8 100644 --- a/ep_run/casc_eq_train.py +++ b/ep_run/casc_eq_train.py @@ -49,6 +49,9 @@ ap.add_argument('--bsign_rand', action='store_true') # random-sign beta per ste ap.add_argument('--bf16', action='store_true') # cast model to bf16 (E-accumulation + tok_sigma stay fp32) — the x0.5 cost lever, GATE before production ap.add_argument('--amp', action='store_true') # PROPER mixed precision: autocast(bf16) matmuls, fp32 params/states/d/E — amp_gate.py PASSED 2026-07-12 (cos 0.9682 vs fp32 0.9687); --bf16 naive-cast stays DEAD (state quantization, RESULT 11) ap.add_argument('--dtop_every', type=int, default=1) # 1 = exact (DEFAULT, BP-parity); 2 = fast mode (~20% cheaper, ~4% CE tax at high lr) +ap.add_argument('--dgain_rand', type=float, default=0.0) # >1: per-STEP log-uniform dgain_top in + # [1, this] (spread-spectrum probing of the + # decade-spread threshold distribution) ap.add_argument('--dgain_top', type=float, default=1.0) # amplify d in STATE FORMATION for blocks # >= L/2 (read cotangents stay true-d: 1st- # order exact; unlocks 2nd-order response of @@ -419,7 +422,7 @@ def relax(z0, zs, ins, outs, y, beta, K, x, bmask=None): else: i = prev.detach().requires_grad_(True) o = blocks[l](i, mask) - _dg = args.dgain_all * (args.dgain_top if l >= args.L // 2 else 1.0) + _dg = args.dgain_all * ((GOV.get('dgcur') or args.dgain_top) if l >= args.L // 2 else 1.0) znew = o.detach().float() + (_dg * d[l] if _dg != 1.0 else d[l]) # damped (under-relaxed) mixing: geta<1 restores contraction on stiff operators # (wall-2 toolkit); fixed point unchanged (z = z + geta*(o+d-z) <=> z = o+d) @@ -521,6 +524,8 @@ def ep_step(x, y): GOV['prev_floor'] = fl beta_t = beta_t * GOV.get('cap', 1.0) # wall-2 loop-gain cap OVERRIDES the floor (the ceiling # can sit below the floor near the wall; survival first) + if args.dgain_rand > 1.0: + GOV['dgcur'] = float(torch.exp(torch.rand((), generator=BGEN) * math.log(args.dgain_rand))) if args.beta_simple >= 1.0: # FULL ownership: no sigma-scaling, no floor/bf_late, no cap — beta = start * measured multiplier beta_t = args.beta * GOV.get('bsimp', 1.0) @@ -925,7 +930,7 @@ for step in range(start_step, args.steps + 1): with torch.no_grad(): GOV['w_rms'] = float(sum(p.float().pow(2).mean().sqrt() for p in all_params) / len(all_params)) _aux = {'gn': GOV.get('gn'), 'drift': GOV.get('drift'), 'sig': GOV.get('sig'), - 'res': GOV.get('res'), 'rho': GOV.get('rho'), + 'res': GOV.get('res'), 'rho': GOV.get('rho'), 'dgcur': GOV.get('dgcur'), 'clip_norm': GOV.get('clip_norm'), 'clip_fired': (None if GOV.get('clip_norm') is None else float(GOV['clip_norm'] > 1.0))} for k in ('act_rms', 'w_rms', 'mag_ep', 'mag_bp'): if GOV.get(k) is not None: _aux[k] = GOV[k] -- cgit v1.2.3