The Open-R1 project was initiated by Hugging Face with the goal of reproducing the complete DeepSeek-R1 pipeline in a fully open manner, enabling anyone to reproduce and extend it on this basis. Currently, this repository is no longer maintained, and newly submitted issues and PRs will no longer be reviewed, but the datasets, models, and textual documentation already released by the project can still be obtained through the open-r1 collection and blog updates. For GRPO, SFT, and distillation training, the official recommendation is to migrate to TRL for continued use, and the training-related capabilities have been continued in TRL.
In terms of purpose, Open-R1 aims to complete the missing links in the R1 pipeline, enabling external researchers to reproduce and build new work based on the R1 process. The project is divided into three main stages according to the DeepSeek-R1 technical report: first, reproduce the R1-Distill series models by distilling high-quality corpora from DeepSeek-R1; second, reproduce the pure reinforcement learning pipeline used by DeepSeek to create R1-Zero, which usually requires organizing large-scale new datasets in the fields of mathematics, reasoning, and code; third, demonstrate the effect of reaching RL tuning from a base model through multi-stage training.
The main capabilities include training and evaluation. On the training side, two types of tasks are provided: SFT (supervised fine-tuning) and GRPO (group relative policy optimization). The scripts are located in the src/open_r1 directory, and the core files include grpo.py (training a model with GRPO on a given dataset), sft.py (performing simple SFT on a dataset), and generate.py (using Distilabel to generate synthetic data from a model). The Makefile provides convenient commands for each step of the R1 pipeline. For evaluation, lighteval is used, supporting evaluation methods such as single GPU, data parallelism, and tensor parallelism, and it can reproduce the results reported by DeepSeek on benchmarks such as AIME 2024, MATH-500, GPQA Diamond, and LiveCodeBench.
In terms of usage, the project is based on CUDA 12.4. It is recommended to use uv to create a Python virtual environment, run make install to install development libraries, then install vLLM and FlashAttention, and install the dependencies for the corresponding mode via pip install -e .[LIST OF MODES]. Before use, you need to log in to Hugging Face and Weights and Biases accounts, and install Git LFS in order to push models and datasets. The training commands are by default aimed at nodes with 8 H100 (80GB) GPUs, supporting DDP or DeepSpeed (ZeRO-2 and ZeRO-3); different hardware requires adjusting the batch size and gradient accumulation steps. The repository also provides a Slurm cluster training script slurm/train.slurm, as well as examples of separating multi-node vLLM serving and training. The data generation section provides a process for generating data from a smaller distilled R1 model or the full DeepSeek-R1; the latter uses a Slurm configuration with 2 nodes and 8 H100 GPUs per node, and the Ray dashboard can be accessed through an SSH tunnel. In addition, a data decontamination script scripts/decontaminate.py based on 8-grams is provided.
The applicable scenarios are mainly for research and engineering teams to reproduce the distillation and reinforcement learning process of R1, build reasoning training on verifiable tasks, and use public datasets to train and evaluate reasoning models. The project also provides code reward functions (such as for IOI and CodeForces tasks), supporting sandbox execution environments such as E2B, Morph, and Piston, for safely executing generated code during training.
In terms of limitations, this repository has stopped being maintained and will no longer review new issues and PRs; on the training side, it is recommended to use TRL. The project depends on CUDA 12.4 and specific versions of PyTorch and vLLM, and the hardware threshold is relatively high (the examples are mainly based on 8×H100). Some benchmark evaluations require sampling multiple responses to control variance. The repository does not provide specific fees, prices, or commercialization plans, and the relevant facts are not yet available.