From e8cf0d238779d3fec07e770a2bc6b555fdb8aba6 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Mon, 31 Aug 2026 18:44:29 -0500 Subject: zero-token collaborator flow: deploy-key quickstart + auto results push (PUSH_RESULTS) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01GkgLsACEF6CCP7EUfA5fZe --- README.md | 13 +++++++++++++ scripts/run_ladder.sh | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b4f7a3..240b6f2 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,19 @@ Analysis (anywhere): `python scripts/plot_ladder.py --results results/h200node1` curves, and the gap-vs-scale figure (the paper's part-2 headline). If a specific checkpoint is needed for the estimator audits, scp just that `runs//ckpt.pt`. +## Collaborator quickstart (zero tokens on the node) +You receive ONE file: the deploy key `zbp_scaling_deploy` (scoped to this repo only, revocable). Then: +``` +install -m 600 zbp_scaling_deploy ~/.ssh/zbp_scaling_deploy +git clone -c core.sshCommand="ssh -i ~/.ssh/zbp_scaling_deploy -o IdentitiesOnly=yes" \ + git@github.com:YurenHao0426/zbp-scaling.git +cd zbp-scaling && ./scripts/run_ladder.sh # env check -> data prep -> ladder -> results auto-pushed back +``` +The `-c` persists `core.sshCommand` inside the clone, so the auto-push at the end works with no env setup +(nohup-safe; set `PUSH_RESULTS=0` to disable). No GitHub account, no HF token on the node: results JSONL +flow back through the deploy key; checkpoints stay on the node (scp on request) and HF uploads happen on +the maintainer's machine. + ## HF upload & security (shared nodes) Results (and optionally checkpoints) can go to a **private** HF repo: `HF_UPLOAD=1 [HF_CKPT=1] ./scripts/run_ladder.sh` or manually `python scripts/upload_hf.py --results results/ [--with-ckpt runs]` (default repo diff --git a/scripts/run_ladder.sh b/scripts/run_ladder.sh index 1d412a0..7402111 100755 --- a/scripts/run_ladder.sh +++ b/scripts/run_ladder.sh @@ -12,6 +12,8 @@ # MICRO_BS=8 per-GPU micro batch [8] # SET="k=v k2=v2" extra --set overrides for every run (e.g. vocab=8192 seq_len=256) # DRY=1 print the plan and exit +# PUSH_RESULTS=0 skip the auto collect + git-push of results JSONL [on] +# HF_UPLOAD=1 [HF_CKPT=1] also upload to a private HF repo (needs HF_TOKEN; see README) # # Runs are sequential (each takes the whole node), resume-safe: a finished run leaves OUT//DONE # and is skipped on re-invocation, so the script can be re-run after interruptions. @@ -66,8 +68,19 @@ for size in $SIZES; do touch "$dir/DONE" done done +TAG=${HF_TAG:-$(hostname)-$(date +%Y%m%d)} +if [ "${PUSH_RESULTS:-1}" = 1 ] && [ "${DRY:-0}" != 1 ]; then + # zero-token default: collect the small JSONL results and push them back over this clone's git auth + if python scripts/collect.py --runs "$OUT" --out "results/$TAG"; then + git add results + git -c user.email=ladder@zbp -c user.name=ladder commit -m "results: $TAG" || true # nothing new is fine + git push || echo "!! git push failed — push manually later or send results/$TAG" + else + echo "!! collect found no finished runs — skipping push" + fi +fi if [ "${HF_UPLOAD:-0}" = 1 ]; then - TAG=${HF_TAG:-$(hostname)-$(date +%Y%m%d)} + # optional direct-to-HF (needs HF_TOKEN in the environment; see README Security) python scripts/collect.py --runs "$OUT" --out "results/$TAG" python scripts/upload_hf.py --results "results/$TAG" ${HF_REPO:+--repo "$HF_REPO"} ${HF_CKPT:+--with-ckpt "$OUT"} fi -- cgit v1.2.3