Bc-AI commited on
Commit
eb7c19d
Β·
verified Β·
1 Parent(s): ace89be

Update main-training.py

Browse files
Files changed (1) hide show
  1. main-training.py +10 -10
main-training.py CHANGED
@@ -390,7 +390,7 @@ class CascadeConfig:
390
  beta2: float = 0.95
391
  grad_clip: float = 1.0
392
  warmup_steps: int = 2000
393
- total_steps: int = 80000
394
 
395
  micro_batch: int = 4
396
  grad_accum: int = 8
@@ -1661,15 +1661,15 @@ def train():
1661
 
1662
  # ── checkpoint resume (uncomment to resume within session 3) ─────────────
1663
  start_step, start_epoch, best_val = 0, 0, float("inf")
1664
- # latest = find_latest_checkpoint()
1665
- # if latest:
1666
- # try:
1667
- # start_step, start_epoch, best_val = load_ckpt(
1668
- # latest, model, muon_opt, adamw_opt, device, cfg
1669
- # )
1670
- # except Exception as e:
1671
- # log.error(f"[ckpt] resume failed ({e}) β€” fresh start")
1672
- # start_step = start_epoch = 0
1673
 
1674
  model.train()
1675
  model.set_step(start_step)
 
390
  beta2: float = 0.95
391
  grad_clip: float = 1.0
392
  warmup_steps: int = 2000
393
+ total_steps: int = 750000
394
 
395
  micro_batch: int = 4
396
  grad_accum: int = 8
 
1661
 
1662
  # ── checkpoint resume (uncomment to resume within session 3) ─────────────
1663
  start_step, start_epoch, best_val = 0, 0, float("inf")
1664
+ latest = find_latest_checkpoint()
1665
+ if latest:
1666
+ try:
1667
+ start_step, start_epoch, best_val = load_ckpt(
1668
+ latest, model, muon_opt, adamw_opt, device, cfg
1669
+ )
1670
+ except Exception as e:
1671
+ log.error(f"[ckpt] resume failed ({e}) β€” fresh start")
1672
+ start_step = start_epoch = 0
1673
 
1674
  model.train()
1675
  model.set_step(start_step)