mirror of
https://github.com/InternLM/InternBootcamp.git
synced 2026-04-19 12:58:04 +00:00
- Add quick start guide for InternBootcamp in both English and Chinese - Update README and README_zh to include new quick start links - Create detailed documentation for using Xtuner with Bootcamp data
2.4 KiB
2.4 KiB
快速开始
InternBootcamp提供了数据生成、模型训练、模型评测等功能,可参考如下指南快速入门。 为确保后续操作成功执行,请确保您已经安装了InternBootcamp,并将项目根目录设为工作目录。
数据生成
运行run_pipeline.sh即可根据默认配置生成对应的测试与训练数据。若有自定义配置等需求可参考Pipeline Usage进行个性化配置。
source examples/pipelines/run_pipeline.sh
生成的数据保存于bootcamp_generator_outputs目录,数据批次以时间戳命名,具体目录结构如下
examples/
├── ...
└──bootcamp_generator_outputs/
├── ...
└── 2025-xx-xx-xx:xx:xx/
├── test/
│ ├── bootcamp_0.jsonl
│ ├── ...
│ └── bootcamp_n.jsonl
└── train/
├── bootcamp_0.jsonl
├── ...
└── bootcamp_n.jsonl
模型训练
我们提供了两种训练框架(Xpuyu,Verl)的支持体系。
Xpuyu
可参考Xpuyu说明文档快速进行高效训练。
Verl
要在Verl框架下加入Bootcamp任务进行训练,需要参考说明文档将bootcamp奖励计算方法嵌入verl框架,具体参考Verl说明文档进行。
模型评测
我们针对bootcamp任务,提供了个性化的评测服务,在使用FastChat、Ollama等框架部署好待测模型并获取对应API Url 与API Key后,使用如下命令可快速评测已部署的模型在InternBootcamp_eval评测集上的性能:
cd InternBootcamp
python examples/unittests/run_eval.py \
--url http://127.0.0.1:8000/v1 \
--api_key EMPTY \
--model_name r1_32B \
--api_mode completion \
--template r1 \
--max_tokens 32768 \
--temperature 0 \
--test_dir examples/data/InternBootcamp_eval \
--max_concurrent_requests 128 \
--timeout 6000 \
--max_retries 16 \
--max_retrying_delay 60
注意当api_mode指定为completion时,需正确设置对应的template(支持r1、qwen、internthinker、chatml(with no system prompt))。更详细的内容参考评测手册。