File size: 4,286 Bytes
575b0ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | # Restoring TD-PRM on a new server
This HF dataset repo holds everything needed to bring the project back except what can be downloaded again or
is too large to keep: **no model weights, no model checkpoints, no environment, no dataset text.**
| in this repo | what it is |
|---|---|
| `code/v1/tdprm`, `code/v2/tdprm`, `code/v3/tdprm` | the three code versions (v3 = current; mirrored every sync) |
| `tdprm_results.tar` | all of `$TDPRM_HOME` minus weights/envs/dataset text: `runs/` (metrics, logs, traces, configs), `evals/` (every final test incl. samples), `states/` (fitted spectral / OpenJev / JevK5 calibration states), `rollouts/` (base samples, token ids only), `queue/` (plans, queue state, job scripts, logs), `report/` (gates, probes, `services.sh`), `prmbench/` (features, results), `runs_aborted/`, `data/manifest/` and filter summaries, `env.sh`; plus the status pages, the step-credit report and the session notes at the archive root |
| `README.md` | the live status page (math / ProverQA) |
| code | version | adds |
|---|---|---|
| v1 | original pipeline | sampling, spectral/JEV states, latent credit arms, PRM baselines, GRPO (TRL + vLLM), gpuq queue, live reports, HF sync |
| v2 | data pipeline v2 | `credit/v2.py`, `rl/pool.py` (skip-solved, hard retest slots), `report/pilot_v2.py` |
| v3 | current | `credit/v3.py`, `rl/provider_v3.py`, `states/reader.py` (HC count-back over a transition table), step-credit evaluation (`prmbench/`), Biology/MedQA, Countdown/K&K and commonsense domains, zero-sum process reward, checkpoints |
Job scripts pin their code version (`TDPRM_REPO`): v1 at `/home/colligo/tdprm`, v2 at `/home/colligo/tdprm_v2_repo`,
v3 at `/home/colligo/tdprm_v3_repo`.
## One-shot restore
Requirements: Linux, 8x A100 80 GB (any NVIDIA GPU with driver >= 580 for the CUDA 13 wheels), ~250 GB free for
models + data + results (checkpoints of new runs need ~3 GB (Qwen) / 6.4 GB (Llama) each), an HF account that has
accepted the Llama-3.2 licence.
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH="$HOME/.local/bin:$PATH"
uvx --from huggingface_hub hf auth login
uvx --from huggingface_hub hf download JoshuaW1997/tdprm-results code/v3/tdprm/scripts/restore_from_hf.sh \
--repo-type dataset --local-dir /tmp/tdprm_restore
bash /tmp/tdprm_restore/code/v3/tdprm/scripts/restore_from_hf.sh
```
Defaults: `TDPRM_HOME=/mnt/localssd/tdprm`, code under `CODE_ROOT=/home/colligo` (other locations work: the script
rewrites the absolute paths in `env.sh` and the job scripts). Steps it runs:
1. downloads this repo; copies the three code trees into place;
2. extracts the results archive into `$TDPRM_HOME`, un-gzips the files the sync compressed (`SYNC_GZIPPED.txt`),
puts the status pages / reports / session notes in `$CODE_ROOT`;
3. creates the exact environment with uv from `code/v3/tdprm/requirements.lock.txt` (Python 3.12, torch 2.13 cu130,
vLLM 0.29, TRL 1.15, transformers 5.17);
4. downloads all models (`scripts/download_models.sh`: Qwen2.5-1.5B-Instruct, Llama-3.2-3B-Instruct, Qwen2.5-Math-PRM-7B,
Qwen2.5-Math-7B-PRM800K, VersaPRM, Qwen3-4B (v3 reader), JevK5, OpenJev);
5. re-prepares every dataset from its public source (`tdprm.data.prepare`) and rebuilds the base-model pass-rate
training pools (`data/train/*.parquet`, which cannot be re-sampled identically) from `data/manifest/` -- ordered
ids and per-record content hashes. `data_manifest restore` must end with `N/N data files match the manifest`;
a mismatch means an upstream dataset changed (the listed files show which);
6. downloads ProcessBench / PRMBench (`tdprm.prmbench.data`).
Then start the services listed in `$TDPRM_HOME/report/services.sh` (queue schedulers, status pages, this HF sync),
each in its own detached session. Queue jobs that were running when the project was paused show as `running`: use
`python -m tdprm.queue.gpuq --plan <plan> retry <job>` to re-run them.
## Not restored (by design)
- `runs/*/checkpoints/` (best / final policies): re-evaluating a finished run on a new test set needs a retrain.
- Model weights and the Python environment (downloaded / rebuilt above), dataset text (re-prepared above).
- Prompts and gold answers inside traces and rollouts (every record keeps its prompt id).
|