Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何使用Verifiers进行模型训练?需要哪些准备工作?

2025-08-28 45

训练准备工作

hardware requirement

  • 2-16个GPU(推荐使用支持NVLink的A100/H100)
  • 充足的显存资源(1.7B模型约需40GB显存)

software installation

首先需要通过uv包管理工具安装Verifiers:

uv add 'verifiers[all]' && uv pip install flash-attn --no-build-isolation

两种主要训练方式

使用内置GRPOTrainer

  1. 启动vLLM推理服务器(使用7个GPU进行数据并行)
  2. 在剩余GPU上启动训练脚本

使用prime-rl框架

这是官方推荐的扩展性更强的方案,通过FSDP实现更好的性能:

uv run rl --trainer @ configs/your_exp/train.toml 
--orchestrator @ configs/your_exp/orch.toml 
--inference @ configs/your_exp/infer.toml

caveat

训练过程中如遇到NCCL通信问题,可尝试设置以下环境变量:NCCL_P2P_DISABLE=1或NCCL_CUMEM_ENABLE=1。

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish