From e903c185c471d7149650e3b337669d7b6355e564 Mon Sep 17 00:00:00 2001 From: Yuren Hao Date: Wed, 22 Jul 2026 01:51:55 -0500 Subject: =?UTF-8?q?resume=20NameError=E4=BF=AE=E5=A4=8D:=20bsimp=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E5=86=99=E5=9C=A8GOV=E5=AE=9A=E4=B9=89=E4=B9=8B?= =?UTF-8?q?=E5=89=8D(=E4=BB=85=E6=96=B0ckpt=E5=90=ABbsimp=E9=94=AE?= =?UTF-8?q?=E6=97=B6=E8=A7=A6=E5=8F=91,135M=20DDP3=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E4=B8=89rank=E9=BD=90=E7=82=B8=3D=E5=BC=80=E7=81=AB=E8=AF=81?= =?UTF-8?q?=E4=B9=A6log:656-666);=20=E7=BC=93=E5=86=B2=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E4=B8=A4=E8=A1=8C=E4=BF=AE=E5=A4=8D,GOV=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=90=8E=E5=BA=94=E7=94=A8?= 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ep_run/casc_eq_train.py b/ep_run/casc_eq_train.py index 09a0132..74aab93 100644 --- a/ep_run/casc_eq_train.py +++ b/ep_run/casc_eq_train.py @@ -295,7 +295,7 @@ if args.resume: with torch.no_grad(): W_out.copy_(_ck['wout'].to(dev)) if _ck.get('lnf') is not None and not isinstance(ln_f, nn.Identity): ln_f.load_state_dict(_ck['lnf']) start_step = int(_ck.get('step', 0)) - if _ck.get('bsimp') is not None: GOV['bsimp'] = float(_ck['bsimp']) + _bsimp_resume = _ck.get('bsimp') # applied after GOV exists (NameError fix: GOV defined below) print(f'[resume] loaded {args.resume} at step {start_step}', flush=True) if args.bf16: for _m in (tok, pos, blocks): @@ -458,6 +458,8 @@ def dFdtheta(zs, x, y, beta): SIG0 = None BGEN = torch.Generator().manual_seed(args.seed + 990) # separate RNG: sign flips must not shift the data stream GOV = {'K': None, 'bscale': 1.0, 'gema': None, 'drift': 0.0, 'gn': 0.0, 'sig': 0.0} +if args.resume and '_bsimp_resume' in dir() and _bsimp_resume is not None: + GOV['bsimp'] = float(_bsimp_resume) WSNAP = {'p': None, 'o': None} def _clone_state(sd): if torch.is_tensor(sd): return sd.clone() -- cgit v1.2.3