diff options
| author | Yuren Hao <yurenh2@illinois.edu> | 2026-07-17 08:40:25 -0500 |
|---|---|---|
| committer | Yuren Hao <yurenh2@illinois.edu> | 2026-07-17 08:40:25 -0500 |
| commit | da17b9ee54373dd6b715094c00f515931fe90f48 (patch) | |
| tree | c013225d2caf3591f76435653cf480b3874ebe5f /ep_run | |
| parent | 0ceeeb95316e170e1bbb8bfdbe7e8695da651273 (diff) | |
ride-v2 (b)/(c) flag-gated (--ride_ema/--ride_cool, default off); isolation probe design: control|a|a+b|a+c|a+d|full at 72M mid-stage
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FAPDWQ49M5Ye3NpTndTpn
Diffstat (limited to 'ep_run')
| -rw-r--r-- | ep_run/casc_eq_train.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ep_run/casc_eq_train.py b/ep_run/casc_eq_train.py index 8e3ec67..10e3515 100644 --- a/ep_run/casc_eq_train.py +++ b/ep_run/casc_eq_train.py @@ -54,6 +54,8 @@ ap.add_argument('--ddp_grad_test', action='store_true') # one-step grad equival ap.add_argument('--beta_ride', type=float, default=1.0) # cap ceiling: >1 lets the governor RAISE beta # above the schedule, up to ride x schedule ap.add_argument('--beta_ride_up', type=float, default=1.02) # per-step climb rate in the calm branch +ap.add_argument('--ride_ema', type=int, default=0) # ride-v2(b): rho-EMA before governor decisions +ap.add_argument('--ride_cool', type=int, default=0) # ride-v2(c): post-attack climb cooldown (steps) ap.add_argument('--drift_adapt', type=float, default=0.0) # >0: adaptive drift ceiling = this x trailing # accepted-drift EMA (floor 0.05, cap 0.5); # blocks beta-scaled garbage accepts (ride-v2d) @@ -495,12 +497,14 @@ def ep_step(x, y): 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 # floor; at tiny residuals rho ~ noise/noise ~ 1 and v1 starved beta to the cap floor. - rho_e = GOV['rho_ema'] = 0.9 * GOV.get('rho_ema', rho_g) + 0.1 * rho_g # ride-v2(b): smooth the meter + rho_use = rho_g + if args.ride_ema > 0: # ride-v2(b), opt-in: smooth the meter before decisions + rho_use = GOV['rho_ema'] = 0.9 * GOV.get('rho_ema', rho_g) + 0.1 * rho_g GOV['cool'] = max(GOV.get('cool', 0) - 1, 0) - if res_g > 0.02 and rho_e > args.beta_cap_rho: + if res_g > 0.02 and rho_use > args.beta_cap_rho: GOV['cap'] = max(GOV.get('cap', 1.0) * 0.85, 0.05) # attack (gentler than v1) - GOV['cool'] = 200 # ride-v2(c): no re-climb for 200 steps - elif (res_g < 0.01 or rho_e < 0.5 * args.beta_cap_rho) and GOV['cool'] == 0: + if args.ride_cool > 0: GOV['cool'] = args.ride_cool # ride-v2(c), opt-in + elif (res_g < 0.01 or rho_use < 0.5 * args.beta_cap_rho) and GOV['cool'] == 0: # recover; with beta_ride > 1 the governor CLIMBS past the schedule — beta finds # its own ceiling and hovers there (ride-the-ceiling; 1.0 = legacy defensive cap) GOV['cap'] = min(GOV.get('cap', 1.0) * args.beta_ride_up, args.beta_ride) |
