InternBootcamp/examples/get_started_zh.md
chenyongkang 3ef66a2038 docs(README): add quick start guide and update related documentation
- 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
2025-06-12 21:26:49 +08:00

2.4 KiB
Raw Blame History

快速开始

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、chatmlwith no system prompt。更详细的内容参考评测手册