merge VRAM eviction + split args
Browse files484 unmodified lines48548648748848949049148 unmodified lines54054154254354454554634 unmodified lines58158258358458558646 unmodified lines633634635636637638639484 unmodified lines# ---------------------------------------------------------------------------def run_aligntune(workdir: Path, bench_repo: str, telemetry: Telemetry, timer: Timer, max_seconds: int) -> dict:timer.check("aligntune", need=420)t0 = time.time()train_path = workdir / "aligntune_train.jsonl"48 unmodified linescmd = [align_python,str(smoke_script),str(workdir / "rmu_ckpt"),str(train_path),str(out_dir),]34 unmodified linesparser.add_argument("--circuitkit-examples", type=int, default=4)parser.add_argument("--circuitkit-ig-steps", type=int, default=2)parser.add_argument("--circuitkit-scope", default="both", choices=["heads", "mlp", "both"])args = parser.parse_args(argv)workdir = Path("/tmp/zw_smoke")46 unmodified linestry:if "aligntune" not in args.skip:summary["phases"]["aligntune"] = run_aligntune(workdir, args.bench_repo, telemetry, timer, args.max_seconds)except Exception as exc: # noqa: BLE001summary["errors"].append({"phase": "aligntune", "error": f"{type(exc).__name__}: {exc}", "traceback": traceback.format_exc()[-3000:]})print(f"[aligntune] ERROR: {exc}", file=sys.stderr, flush=True)484 unmodified lines48548648748848949049149249349449549649749848 unmodified lines54754854955055155255334 unmodified lines58858959059159259359459559659759846 unmodified lines645646647648649650651652653654655656657658484 unmodified lines# ---------------------------------------------------------------------------def run_aligntune(workdir: Path,bench_repo: str,telemetry: Telemetry,timer: Timer,max_seconds: int,model_override: str | None = None,) -> dict:timer.check("aligntune", need=420)t0 = time.time()train_path = workdir / "aligntune_train.jsonl"48 unmodified linescmd = [align_python,str(smoke_script),model_override or str(workdir / "rmu_ckpt"),str(train_path),str(out_dir),]34 unmodified linesparser.add_argument("--circuitkit-examples", type=int, default=4)parser.add_argument("--circuitkit-ig-steps", type=int, default=2)parser.add_argument("--circuitkit-scope", default="both", choices=["heads", "mlp", "both"])parser.add_argument("--aligntune-model",default="rmu",help="'rmu' (checkpoint from the RMU phase), 'base' (fresh model), or an explicit path",)args = parser.parse_args(argv)workdir = Path("/tmp/zw_smoke")46 unmodified linestry:if "aligntune" not in args.skip:align_model = args.aligntune_modelif align_model == "base":align_model = args.modelelif align_model == "rmu":align_model = Nonesummary["phases"]["aligntune"] = run_aligntune(workdir, args.bench_repo, telemetry, timer, args.max_seconds, model_override=align_model)except Exception as exc: # noqa: BLE001summary["errors"].append({"phase": "aligntune", "error": f"{type(exc).__name__}: {exc}", "traceback": traceback.format_exc()[-3000:]})print(f"[aligntune] ERROR: {exc}", file=sys.stderr, flush=True)
scripts/smoke_l4.py+22-3