From b83947778e2c776f757a07d4719b7ce961d7ed55 Mon Sep 17 00:00:00 2001 From: Yuren Hao Date: Fri, 3 Jul 2026 05:56:50 -0500 Subject: =?UTF-8?q?Initial=20commit:=20ept=20=E2=80=94=20backprop-free=20e?= =?UTF-8?q?quilibrium=20transformer=20(EP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code (ep_run/), organized docs (docs/{method,campaign,hardware,outreach,paper}), analysis scripts (scripts/), ONBOARDING.md entry point. Large data/checkpoints git-ignored (share separately). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_014FAPDWQ49M5Ye3NpTndTpn --- ep_run/ep_fast_timing.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ep_run/ep_fast_timing.py (limited to 'ep_run/ep_fast_timing.py') diff --git a/ep_run/ep_fast_timing.py b/ep_run/ep_fast_timing.py new file mode 100644 index 0000000..942f81d --- /dev/null +++ b/ep_run/ep_fast_timing.py @@ -0,0 +1,20 @@ +import time, os, re +os.chdir("/home/yurenh2/ept/ep_run"); LOG="runs/ep_resreg_fast.log" +def step(): + try: ls=[l for l in open(LOG) if l.startswith("step")]; return int(re.search(r"step\s+(\d+)",ls[-1]).group(1)) if ls else 0 + except Exception: return 0 +def vrb(): + try: l=[x for x in open(LOG) if x.startswith("step")][-1] + except Exception: return None + v=re.search(r"val CE ([\d.]+)",l); r=re.search(r"res=([\d.eE+-]+)",l); b=re.search(r"best ([\d.]+)",l) + return (float(v.group(1)) if v else 0, float(r.group(1)) if r else 0, float(b.group(1)) if b else 0) +t0=time.time() +while step()<100 and time.time()-t0<900: time.sleep(15) # 等过编译预热 +s1=step(); t1=time.time(); time.sleep(180); s2=step(); t2=time.time() +ds=s2-s1; dt=t2-t1 +print("=== EP_RESREG_FAST compile+TF32 计时 ===") +if ds>0: + print(f"{ds} steps / {dt:.0f}s = {dt/ds:.2f} s/step = {60*ds/dt:.1f} steps/min") + print(f"对照:其他 eager run ~13.6 s/step(但那是 t2sel160;此为 t2sel40+compile+tf32)") + print(f"sanity (val,res,best): {vrb()} <- res 没爆+在降 = TF32 没破稳定") +else: print("no progress (还在编译/卡住), step", step()) -- cgit v1.2.3