安装 X-R1 需分三步完成环境搭建:
- Hardware preparation:至少 1 张 NVIDIA GPU(推荐 4 张 3090),16GB 内存,支持 AVX 指令集的 CPU
- 基础依赖安装::
sudo apt update
sudo apt install git python3 python3-pip build-essential
pip install -r requirements.txt
pip install accelerate - Project Configuration::
- Cloning Warehouse:
git clone https://github.com/dhcode-cpp/X-R1.git
- 修改 recipes/zero3.yaml 中的 num_processes(GPU 数量减 1)
- pass (a bill or inspection etc)
accelerate config
Verification Environment
- Cloning Warehouse:
Key Notes:
- CUDA 版本必须与 GPU 驱动匹配
- Windows 用户需启用 WSL2
- 首次运行时建议先测试 0.5B 小模型
This answer comes from the articleX-R1: Low-cost training of 0.5B models in common devicesThe