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

How do I train a model using the Open R1 project?

2025-09-10 2.2 K

The following steps need to be followed to train a model using the Open R1 project:

  1. Environment Configuration: First create a Python virtual environment and activate the
    conda create -n openr1 python=3.11
    conda activate openr1
  2. Installation of dependencies: Install vLLM and project dependencies
    pip install vllm==0.6.6.post1
    pip install -e ".[dev]"
  3. Account Login: Login to Hugging Face and Weights and Biases accounts
    huggingface-cli login
    wandb login
  4. training model: Training using the provided scripts
    • GRPO Training:
      python src/open_r1/grpo.py --dataset <dataset_path>
    • SFT Training:
      python src/open_r1/sft.py --dataset <dataset_path>

Notably, the project supports multi-stage training, which can start with a base model and gradually transition to a reinforcement learning tuning model.

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