summaryrefslogtreecommitdiff
path: root/ep_run/casc_eq_train.py
diff options
context:
space:
mode:
authorYuren Hao <yurenh2@illinois.edu>2026-07-20 07:10:41 -0500
committerYuren Hao <yurenh2@illinois.edu>2026-07-20 07:10:41 -0500
commitc700768be62191a038137faec49b1016c7cdb09f (patch)
tree5fef2c3772ae15e1636769ca0b169754c15152ed /ep_run/casc_eq_train.py
parent6db80927045e6c8ca91df9dd505f07463cc3d73d (diff)
棘轮模式(用户设计07-20): beta_simple 1.0=只降不升(越界折半持久,上探×1.0自然无操作,5处>=比较符补丁全断言); 阶梯从上方跟随下沉上界,无形状知识无标定可迁移; fw72m_ratchet王冠排GPU0与bsign并行,两个1.0×候选赛跑
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FAPDWQ49M5Ye3NpTndTpn
Diffstat (limited to 'ep_run/casc_eq_train.py')
-rw-r--r--ep_run/casc_eq_train.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ep_run/casc_eq_train.py b/ep_run/casc_eq_train.py
index 86a8e06..09a0132 100644
--- a/ep_run/casc_eq_train.py
+++ b/ep_run/casc_eq_train.py
@@ -497,7 +497,7 @@ 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.beta_simple > 1.0:
+ 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)
if args.bsign_rand and torch.rand((), generator=BGEN).item() < 0.5: beta_t = -beta_t
@@ -590,7 +590,7 @@ def ep_step(x, y):
ok_retry = True
if args.beta_ride > 1.0: # the failed trial IS the ceiling measurement
GOV['cap'] = max(GOV.get('cap', 1.0) * 0.5 ** (_h + 1), args.cap_floor)
- if args.beta_simple > 1.0: # PERSIST the halvings (the ceiling just measured)
+ if args.beta_simple >= 1.0: # PERSIST the halvings (the ceiling just measured)
GOV['bsimp'] = GOV.get('bsimp', 1.0) * 0.5 ** (_h + 1)
break
if ok_retry:
@@ -604,7 +604,7 @@ def ep_step(x, y):
drift = _drift(zp, zs_free)
gdrift = ddp_max_scalar(drift)
ok_retry = _legal(gdrift)
- if ok_retry and args.beta_simple > 1.0:
+ if ok_retry and args.beta_simple >= 1.0:
# CODEX FIX: K=8 rescue ran at beta/2^beta_sync — persist those halvings too,
# else the next step jumps straight back to the failed beta (upward bias)
GOV['bsimp'] = GOV.get('bsimp', 1.0) * 0.5 ** args.beta_sync
@@ -618,7 +618,7 @@ def ep_step(x, y):
GOV['drift'] = gdrift
if args.drift_adapt > 0:
GOV['drift_ema'] = 0.95 * GOV.get('drift_ema', gdrift) + 0.05 * gdrift
- if args.beta_cap_rho > 0 and GOV.get('rho') is not None and args.beta_simple <= 1.0:
+ if args.beta_cap_rho > 0 and GOV.get('rho') is not None and args.beta_simple < 1.0:
rho_g = ddp_bcast_scalar(GOV['rho']) # rank0's meter rules (identical control on all ranks)
res_g = ddp_bcast_scalar(GOV.get('res', 0.0))
# v2: ABSOLUTE-SCALE GATE — rho is only meaningful when the residual is above the noise
@@ -718,7 +718,7 @@ def ep_step(x, y):
return free_ce, beta_t, GOV.get('kuse', GOV['K']), False
for p, g in zip(all_params, gs):
p.grad = g
- if args.beta_simple > 1.0 and _ok0:
+ if args.beta_simple >= 1.0 and _ok0:
# CODEX FIX: probe upward only on steps that actually COMMIT (after the second-pass
# drift and gn-EMA guards) — the old placement raised beta even on later-rejected steps
GOV['bsimp'] = GOV.get('bsimp', 1.0) * args.beta_simple