[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116981":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":20,"updatedAt":21,"readmeContent":22,"aiSummary":8,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},116981,"unified-training","yudasong\u002Funified-training","yudasong",null,"Python",51,7,1,0,39.71,"Apache License 2.0",false,"release",true,[],"2026-10-30 05:09:51","2026-11-19 16:27:25","# Training Foundation Models with a Single Algorithm\n\nCode for the paper. One trainer fits static data (pretraining, midtraining, SFT) and RL generations with a single\nweighted likelihood loss; a generator appends RL rounds to a shared buffer while the trainer samples the data mixture.\n\n## Install\n\nNeeds [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) (pip has no `--override`) and an NVIDIA driver >= 580: the pinned\ntorch 2.11.0 wheel is built for CUDA 13.0.\n\n```bash\n# trainer + vLLM generator (Python 3.12); overrides.txt keeps the paper's numpy 2.5.2, which numba's metadata excludes\nuv venv --python 3.12 && source .venv\u002Fbin\u002Factivate\nuv pip install -e \".[generator,controlled,test]\" --override overrides.txt   # + pretrain to tokenize pretraining data\n\n# benchmark harness and real-world data preparation: separate environment (Python 3.13, vLLM 0.17.1, lm-eval 0.4.9)\nbash scripts\u002Fsetup_evals_env.sh && source .venv-evals\u002Fbin\u002Factivate\n\n# NeMo-RL runs (staged math RL and coding RL of the real-world setting): a third environment (Python 3.13,\n# torch 2.10.0, vLLM 0.17.1, ray 2.57.0) with NeMo-RL fetched at the pinned commit and patched\nbash scripts\u002Fsetup_nemo_rl_env.sh\n```\n\n`uv pip check` lists numba and mistral-common (numpy pins) in the training environment and the repository's own\ntorch\u002Fnumpy\u002Fpyarrow pins in the benchmark environment (installed with `--no-deps`), and decord in the NeMo-RL\nenvironment (its only wheel is tagged for CPython 3.6; it imports fine); none of these affects the code here.\n\nOn clusters, keep caches (`HF_HOME`, `TRITON_CACHE_DIR`, `VLLM_CACHE_ROOT`, `TMPDIR`) on node-local disk. Triton needs\nGCC (`CC=gcc CXX=g++` where `cc` is another compiler, e.g. Cray). If the puzzle evaluator fails to build vLLM's\nFlashInfer sampler, set `VLLM_USE_FLASHINFER_SAMPLER=0`. Use whole GPUs: vLLM has hung on A100 MIG slices.\n\n## Checkpoints and data\n\nStarting models are on Hugging Face in [`sfanm\u002Funified-training`](https:\u002F\u002Fhuggingface.co\u002Fsfanm\u002Funified-training)\n(`controlled\u002F*` for Section 5.1, `realworld\u002F*` for Section 5.2); midtraining corpora and held-out sets are in the dataset\n[`sfanm\u002Funified-training`](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsfanm\u002Funified-training). The experiment scripts download what they need.\n\n## Training\n\n```bash\nRUN_DIR=runs\u002Fmy-run bash scripts\u002Ftrain_unified.sh common.env my-run.env\n```\n\nRuns are configured with `UNIFIED_*` environment variables ([docs\u002Fconfiguration.md](docs\u002Fconfiguration.md)). The launcher\nruns on one node (generator and trainer on separate or shared GPUs) or on several nodes from a `HOSTFILE`.\n\n## Reproducing the paper\n\n| Setting | Folder |\n|---|---|\n| Section 5.1, Appendices A-C: reasoning puzzles, 124M model | [experiments\u002Fcontrolled](experiments\u002Fcontrolled) |\n| Section 5.2, Appendices D-E: real-world midtraining data, 0.76B model | [experiments\u002Frealworld](experiments\u002Frealworld) |\n\nEach folder's README describes its training stages, run configs and evaluation. The staged math RL and the\nfollow-up coding RL of Section 5.2 use NeMo-RL (`scripts\u002Fsetup_nemo_rl_env.sh` builds its environment and applies\nour patch to a pinned commit).\n\n## Layout\n\n```\nsrc\u002Funified_training\u002F   trainer, generator, rewards, data tools (tools\u002F), benchmark harness (evals\u002F)\nsrc\u002Fnl_tower\u002F           reasoning-puzzle environment, data builders, pass@k evaluator\nexperiments\u002F            configs and scripts per paper setting\nthird_party\u002Fnemo-rl\u002F    pinned NeMo-RL + patch\ntests\u002F                  CPU tests (pytest tests)\n```\n\n## Citation\n\n```bibtex\n@misc{song2026trainingfoundationmodelssingle,\n      title={Training Foundation Models with a Single Algorithm},\n      author={Yuda Song and Alvin Zhang and Fahim Tajwar and Daman Arora and Jeff Schneider and Daniel Khashabi and Ruslan Salakhutdinov and J. Andrew Bagnell and Aarti Singh and Andrea Zanette},\n      year={2026},\n      eprint={2610.40564},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.40564},\n}\n```\n\n## License\n\nCode: Apache-2.0; third-party code and data licences are listed in [NOTICE](NOTICE).\n",2,"2026-11-25 05:00:16","CREATED_QUERY"]