Increase max_epochs=300, max_steps=200k, and save murli_v15_best.pt on val_cfm
Browse files85 unmodified lines868788899091929385 unmodified linesbatch_size: int = 16grad_accum_steps: int = 2num_workers: int = 4max_epochs: int = 60max_steps: int = 120_000lr: float = 2.5e-4min_lr: float = 1e-5warmup_steps: int = 200085 unmodified lines868788899091929385 unmodified linesbatch_size: int = 16grad_accum_steps: int = 2num_workers: int = 4max_epochs: int = 300max_steps: int = 200_000lr: float = 2.5e-4min_lr: float = 1e-5warmup_steps: int = 2000
93 unmodified lines94959697989956 unmodified lines15615715815916016116293 unmodified linesscaler = torch.amp.GradScaler("cuda", enabled=(device.type == "cuda" and cfg.train.use_amp and not use_bf16))step = 0if args.resume and os.path.exists(args.resume):ckpt = torch.load(args.resume, map_location=device, weights_only=False)model.load_state_dict(ckpt["model"])56 unmodified linesvb = {k: v.to(device) for k, v in vb.items()}vout = model(**vb)val_cfm.append(vout["cfm_loss"].item())print(f"[Val step={step}] mean_cfm={sum(val_cfm) / max(len(val_cfm), 1):.4f}")model.train()step += 193 unmodified lines94959697989910056 unmodified lines15715815916016116216316416516616716816993 unmodified linesscaler = torch.amp.GradScaler("cuda", enabled=(device.type == "cuda" and cfg.train.use_amp and not use_bf16))step = 0best_val_cfm = float("inf")if args.resume and os.path.exists(args.resume):ckpt = torch.load(args.resume, map_location=device, weights_only=False)model.load_state_dict(ckpt["model"])56 unmodified linesvb = {k: v.to(device) for k, v in vb.items()}vout = model(**vb)val_cfm.append(vout["cfm_loss"].item())mean_val_cfm = sum(val_cfm) / max(len(val_cfm), 1)print(f"[Val step={step}] mean_cfm={mean_val_cfm:.4f}")if mean_val_cfm < best_val_cfm:best_val_cfm = mean_val_cfmbest_path = os.path.join(cfg.train.checkpoint_dir, "murli_v15_best.pt")torch.save({"model": model.state_dict(), "step": step, "val_cfm": best_val_cfm}, best_path)print(f"[Best Saved] {best_path} (val_cfm={best_val_cfm:.4f})")model.train()step += 1
config.py+2-2
train.py+8-1