# 版本基线（Version Anchor）

> 本目录下的 15 本中文 tutorial 的全部章节内容，均以下表所列的 commit 为准。
> 这些项目都在快速迭代，**如果你读到的代码和书里说的对不上，多半是上游已经动过**——欢迎给本目录提 PR 更新。

## 快照时间

- 克隆时间：2026-05-26 至 2026-05-27
- 克隆方式：`git clone --depth=1 <URL>`（浅克隆，无完整提交历史）
- 因此各书"距最近 tag"列显示为浅克隆限制；如需精确版本，请在对应 `repos/<name>` 下 `git fetch --tags --unshallow` 后再 `git describe --tags`。

## 表格

| # | 项目 | 仓库 | 默认分支 | HEAD commit | 提交日期 |
|---|---|---|---|---|---|
| 01 | Megatron-LM     | NVIDIA/Megatron-LM         | `main`   | `432d76b2b8bf` | 2026-05-26 |
| 02 | DeepSpeed       | deepspeedai/DeepSpeed      | `master` | `510ebe58e4e4` | 2026-05-25 |
| 03 | ColossalAI      | hpcaitech/ColossalAI       | `main`   | `4f9953be335e` | 2026-04-09 |
| 04 | TorchTitan      | pytorch/torchtitan         | `main`   | `af33f763848b` | 2026-05-25 |
| 05 | nanotron        | huggingface/nanotron       | `main`   | `2411b022a75f` | 2026-04-07 |
| 06 | NeMo            | NVIDIA/NeMo                | `main`   | `2ea3e0f05b24` | 2026-05-26 |
| 07 | LLaMA-Factory   | hiyouga/LLaMA-Factory      | `main`   | `01398eb18dd4` | 2026-05-26 |
| 08 | ms-swift        | modelscope/ms-swift        | `main`   | `b58b1bd117e2` | 2026-05-26 |
| 09 | Axolotl         | axolotl-ai-cloud/axolotl   | `main`   | `ab1a0d81dc9f` | 2026-05-26 |
| 10 | Unsloth         | unslothai/unsloth          | `main`   | `1cf145c070ea` | 2026-05-26 |
| 11 | XTuner          | InternLM/xtuner            | `main`   | `964f70e2da61` | 2026-05-26 |
| 12 | TRL             | huggingface/trl            | `main`   | `8221a9fcb791` | 2026-05-26 |
| 13 | OpenRLHF        | OpenRLHF/OpenRLHF          | `main`   | `6c6056daa522` | 2026-05-26 |
| 14 | verl            | volcengine/verl            | `main`   | `9c38b8bb1876` | 2026-05-26 |
| 15 | PEFT            | huggingface/peft           | `main`   | `a106ff4c7061` | 2026-05-22 |

## 怎么验证你本地仓库还是这个 commit

```bash
cd /Users/zjw/Documents/LLM/train/repos/<name>
git rev-parse --short=12 HEAD
```

如果不一致，说明仓库已经被你 / 我 / 自动脚本更新过。本书里所有"在 xxx 文件第 yyy 行"这种行号引用，**只在 HEAD 等于上表 commit 时**精确成立。

## 推荐的"重现书中环境"流程

1. `cd /Users/zjw/Documents/LLM/train/repos/<name>`
2. `git fetch --depth=1 origin <table-commit>` 把书里那个 commit 拉下来
3. `git checkout <table-commit>` 切到那个状态
4. 这样接下来照书操作就能 1:1 对得上

> 注意：浅克隆默认只有 HEAD 一个 commit；上面这个 fetch 把书里 commit 单独补拉一份。
