STAR-future commited on
Commit
182a703
·
verified ·
1 Parent(s): fe4ce94

H6 without train4 when absent

Browse files
Files changed (1) hide show
  1. tools/colab_k3pass.py +5 -4
tools/colab_k3pass.py CHANGED
@@ -232,9 +232,10 @@ if MODE == "sealed":
232
  if MODE == "h6":
233
  import shutil
234
  from huggingface_hub import snapshot_download
235
- for need in ("out_sealed", "out_train4"):
236
- if not (W / need / "summary.json").exists():
237
- raise SystemExit(f"H6 needs {need} on this VM (run K3P=sealed and K3P=train4 first)")
 
238
  if (W / "work_train4").exists(): # regenerable work files: free the scratch disk
239
  shutil.rmtree((W / "work_train4").resolve(), ignore_errors=True)
240
  scratch = Path("/mnt/local-scratch") if Path("/mnt/local-scratch").exists() else W
@@ -253,7 +254,7 @@ if MODE == "h6":
253
  h6 = W / "h6"
254
  if not (h6 / "full_tail_wsp.pt").exists():
255
  rc = run([sys.executable, "-u", str(W / "trinity_full_tail_wsp.py"), "train", "--cache", str(W / "out_train2"),
256
- str(W / "out_train3"), str(W / "out_train4"), "--out", str(h6), "--domains", "chips,space",
257
  "--head-rank", "256", "--head-alpha", "256", "--tail-rank", "128", "--tail-alpha", "128",
258
  "--k", "128", "--routed-rank", "16", "--routed-alpha", "16", "--lr", "1.5e-4", "--epochs", "3.0",
259
  "--kl", "6.0", "--block-size", "256"], "h6_train.log")
 
232
  if MODE == "h6":
233
  import shutil
234
  from huggingface_hub import snapshot_download
235
+ if not (W / "out_sealed" / "summary.json").exists():
236
+ raise SystemExit("H6 needs out_sealed on this VM (run K3P=sealed first)")
237
+ extra = [str(W / "out_train4")] if (W / "out_train4" / "summary.json").exists() else [] # train4 if this VM built it
238
+ print("H6 caches: train2, train3" + (", train4" if extra else ""), flush=True)
239
  if (W / "work_train4").exists(): # regenerable work files: free the scratch disk
240
  shutil.rmtree((W / "work_train4").resolve(), ignore_errors=True)
241
  scratch = Path("/mnt/local-scratch") if Path("/mnt/local-scratch").exists() else W
 
254
  h6 = W / "h6"
255
  if not (h6 / "full_tail_wsp.pt").exists():
256
  rc = run([sys.executable, "-u", str(W / "trinity_full_tail_wsp.py"), "train", "--cache", str(W / "out_train2"),
257
+ str(W / "out_train3"), *extra, "--out", str(h6), "--domains", "chips,space",
258
  "--head-rank", "256", "--head-alpha", "256", "--tail-rank", "128", "--tail-alpha", "128",
259
  "--k", "128", "--routed-rank", "16", "--routed-alpha", "16", "--lr", "1.5e-4", "--epochs", "3.0",
260
  "--kl", "6.0", "--block-size", "256"], "h6_train.log")