Sync g0050 training and inference tooling

This commit is contained in:
yi_lu
2026-07-09 08:02:25 +08:00
parent 0e8c2a554d
commit 2b0588ad17
29 changed files with 1726 additions and 18 deletions

View File

@@ -7,7 +7,9 @@
- `dataset/`: 预训练数据和验证集的构建、manifest、数据落盘位置。
- `model/`: 2B MoE 架构定义,优先用 NeMo/Megatron 配置表达。
- `training/`: 训练 recipe、评估 recipe、并行和优化超参。
- `scripts/`: 在 g0033 上同步数据、拉起训练的 shell 入口。
- `scripts/`: 数据下载、tokenization、训练恢复、Megatron 推理服务和 HF 导出 smoke 的 shell 入口。
- `tools/`: checkpoint 检查、Megatron DCP 探测、Megatron-to-HF 导出和 HF custom model 推理工具。
- `docs/`: 训练/导出过程中沉淀的问题记录。
## 当前数据计划
@@ -34,7 +36,35 @@
/mnt/beegfs/yi/laoyao_2b_moe/tokenizer/glm5.2/tokenizer.json
```
该 tokenizer 从 ModelScope zai-org/GLM-5.2 下载,当前解析出的 vocab size 为 154,820tokenizer.json sha256 为 19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d。后续训练数据应按这个 tokenizer 重新统计/切分 token budget。
该 tokenizer 从 ModelScope zai-org/GLM-5.2 下载,当前训练配置使用的 vocab size 为 154,856tokenizer.json sha256 为 19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d。后续训练数据应按这个 tokenizer 重新统计/切分 token budget。
## g0050 训练状态入口
g0050 上的实际训练 repo 路径:
```bash
/ssd/workspace/yi/laoyao_2b_moe
```
当前主训练入口为:
```bash
bash scripts/resume_pretrain_8192_8gpu_mbs14.sh
```
该入口默认从 `runs/pretrain_8192_8gpu_dp8_mbs14_full_recompute_weighted_heldoutval_resume10000/checkpoints` 恢复,使用:
- `seq_length=8192`
- `micro_batch_size=14`
- `global_batch_size=112`
- `tensor/pipeline/expert/context parallel = 1/1/1/1`
- `distributed optimizer + overlap grad reduce + overlap param gather`
- `full recompute, uniform, recompute_num_layers=1`
- `save_interval=2500`
- `eval_interval=15000`
- heldout validation prefix: `dataset/val/megatron_8192_glm52/heldout_2p8k_text_document`
Megatron indexed validation 数据是本地派生产物,被 `.gitignore` 忽略;需要在目标机器上从 `dataset/val/data/heldout_2p8k_packed_text.jsonl` 重新生成或从训练机器同步。
## g0033 路径约定