summaryrefslogtreecommitdiff
path: root/ep_run/lt_ep_train.py
diff options
context:
space:
mode:
Diffstat (limited to 'ep_run/lt_ep_train.py')
-rw-r--r--ep_run/lt_ep_train.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ep_run/lt_ep_train.py b/ep_run/lt_ep_train.py
index 1307702..2807be3 100644
--- a/ep_run/lt_ep_train.py
+++ b/ep_run/lt_ep_train.py
@@ -192,7 +192,10 @@ def ep_step(blk, idx, y, T1, T2, eps, beta, jacreg=0.0, holo=0, hr=0.02, t1max=0
acc = None
for _ in range(K):
if getattr(blk, 'track', False): # common-mode-tracking AEP (loose-tolerant)
- _tr = holo_a_track_fast if getattr(blk, 'holofast', False) else holo_a_track
+ if getattr(blk, 'holoavg', False): # trend-aware stop + plateau averaging (semi-convergence fix)
+ from holo_ep import holo_a_track_avg as _tr
+ else:
+ _tr = holo_a_track_fast if getattr(blk, 'holofast', False) else holo_a_track
ai, _ = _tr(blk, zs, xin0, y, hr, t2sel, eps) # fast = exact halved-jvp mirror (1.55x)
else:
ai, _ = holo_a_select2(blk, zs, xin0, y, hr, t2sel, eps, li=getattr(blk, 'li_avg', 0))
@@ -429,6 +432,7 @@ def main():
ap.add_argument('--track', action='store_true') # common-mode-tracking AEP correction
ap.add_argument('--holofast', action='store_true') # exact halved-jvp track (1.55x nudged phase; parity = FD noise floor)
ap.add_argument('--sdpa', action='store_true') # fused flash attention in the no_grad relax loop
+ ap.add_argument('--holoavg', action='store_true') # trend-aware stop + plateau-avg track (gate: 0.913->0.936 @t2sel160)
ap.add_argument('--rt_final', type=float, default=0.0) # anneal res_target to this (0=off), 25%-75% of run
ap.add_argument('--nudge_brake', type=float, default=0.0) # kappa: anchor spring during nudge (Tikhonov adjoint)
ap.add_argument('--init_ckpt', type=str, default='') # warm-start weights from a saved ckpt
@@ -505,6 +509,7 @@ def main():
blk.track = cfg.track
blk.holofast = cfg.holofast
blk.sdpa = cfg.sdpa
+ blk.holoavg = cfg.holoavg
blk.nbrake = cfg.nudge_brake
blk.qknorm = cfg.qknorm
if cfg.resinit != 1.0: # near-identity block at init (contractive) -> stable big-width start