Skip to content

feat: add minimal smoke tutorial for training pipeline - #466

Open
1367965777-wq wants to merge 1 commit into
inclusionAI:mainfrom
1367965777-wq:feat/add-smoke-tutorial
Open

feat: add minimal smoke tutorial for training pipeline#466
1367965777-wq wants to merge 1 commit into
inclusionAI:mainfrom
1367965777-wq:feat/add-smoke-tutorial

Conversation

@1367965777-wq

Copy link
Copy Markdown

概述

添加了一个最小化的训练烟雾教程,用于快速验证 AReno 的训练管道是否正常工作。

新增文件

文件 说明
examples/smoke_tutorial/dataset_loader.py 数据加载器,支持 JSONL、question/answer、纯文本格式
examples/smoke_tutorial/reward.py 启发式奖励函数(基于长度和推理标记)
examples/smoke_tutorial/sample_data.jsonl 5条示例数据
examples/smoke_tutorial/README.md 教程使用说明
tests/test_smoke_tutorial_cpu.py 8个 CPU 测试用例

测试

pytest tests/test_smoke_tutorial_cpu.py -v

所有测试通过 ✅

使用方法

areno train \
  --ckpt Qwen/Qwen3-0.6B \
  --dataset-path examples/smoke_tutorial/sample_data.jsonl \
  --dataset-loader-fn examples/smoke_tutorial/dataset_loader.py \
  --reward-fn-path examples/smoke_tutorial/reward.py \
  --algo gspo \
  --tp-size 1 --world-size 1 --batch-size 1

特点

- ✅ 无外部依赖(不依赖 math-verify 等库)
- ✅ 支持多种数据格式
- ✅ 奖励函数简单易懂
- ✅ 包含完整测试
- ✅ 详细的文档说明

测试环境

- Windows 11, Python 3.12.3
- CPU 测试全部通过
- 实际训练需要 Linux + NVIDIA GPU 环境

---

### 标签建议

添加标签:`enhancement`, `documentation`, `examples`

---

- Add dataset_loader.py supporting JSONL, question/answer, and plain text formats
- Add reward.py with heuristic-based scoring (length + reasoning markers)
- Add sample_data.jsonl with 5 example prompts
- Add README.md with usage instructions and quick start guide
- Add 8 CPU tests covering loader and reward functions
- All tests pass on Windows without GPU
@1367965777-wq

Copy link
Copy Markdown
Author

#41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant