open-r1 logo

open-r1

huggingface/open-r1

Fully open reproduction of DeepSeek-R1

GraphCanon updated today · GitHub synced today

26k
Stars
2.4k
Forks
340
Open issues
281
Watchers
3mo
Last push
Python Apache-2.0Created Jan 24, 2025

Trust & integrity

Full report
Maintenance
Slowing (99d since push)
As of today · Source: github_public_v1
Provenance
Not a fork · Organization account
As of today · Source: github_public_v1
Security (OSV)
No lockfile
As of today · Source: none

Public GitHub metadata and optional OSV dependency scans. Signals, not a guarantee. Trust methodology.

Backing

Company and funding context for Hugging Face. Display-only - not part of trust score or organic ranking.

Company
Hugging Face·GitHub org profile·today
Employees
160·Wikidata (P1128 employees)·today
Funding
$235,000,000 (2023-08)·GraphCanon curated seed (public press)·today
Commercial model
OSS + managed cloud·GraphCanon curated seed·today

Overview

Open-source project aiming to replicate the DeepSeek-R1 models and its training pipelines. Involves model distillation, RL pipeline replication, and multi-stage training.

Capability facts

Languages
python

Source: github.language · Jul 11, 2026

Categories

Graph entities

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Jul 11, 2026)

To run the code in this project, first, create a Python virtual environment using e.g. `uv`.
Source link

Tags

README

Plan of attack

We will use the DeepSeek-R1 tech report as a guide, which can roughly be broken down into three main steps:

  • Step 1: replicate the R1-Distill models by distilling a high-quality corpus from DeepSeek-R1.
  • Step 2: replicate the pure RL pipeline that DeepSeek used to create R1-Zero. This will likely involve curating new, large-scale datasets for math, reasoning, and code.
  • Step 3: show we can go from base model to RL-tuned via multi-stage training.

Installation

[!CAUTION] Libraries rely on CUDA 12.4. If you see errors related to segmentation faults, double check the version your system is running with nvcc --version.

To run the code in this project, first, create a Python virtual environment using e.g. uv. To install uv, follow the UV Installation Guide.

[!NOTE] As a shortcut, run make install to setup development libraries (spelled out below). Afterwards, if everything is setup correctly you can try out the Open-R1 models.

uv venv openr1 --python 3.11 && source openr1/bin/activate && uv pip install --upgrade pip

[!TIP] For Hugging Face cluster users, add export UV_LINK_MODE=copy to your .bashrc to suppress cache warnings from uv

Next, install vLLM and FlashAttention:

uv pip install vllm==0.8.5.post1
uv pip install setuptools && uv pip install flash-attn --no-build-isolation

This will also install PyTorch v2.6.0 and it is very important to use this version since the vLLM binaries are compiled for it. You can then install the remaining dependencies for your specific use case via pip install -e .[LIST OF MODES]. For most contributors, we recommend:

GIT_LFS_SKIP_SMUDGE=1 uv pip install -e ".[dev]"

Next, log into your Hugging Face and Weights and Biases accounts as follows:

huggingface-cli login
wandb login

Finally, check whether your system has Git LFS installed so that you can load and push models/datasets to the Hugging Face Hub:

git-lfs --version

If it isn't installed, run:

sudo apt-get install git-lfs