Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 9 min read Announcement easyNovice

Open-R1: a fully open reproduction of DeepSeek-R1

Open-R1 is a Hugging Face project to openly reconstruct DeepSeek-R1's missing training data and code, since only the model weights were released. DeepSeek-R1 builds on the 671B MoE DeepSeek-V3. R1-Zero was trained with pure reinforcement learning using GRPO and simple accuracy and format rewards, while R1 added a cold-start SFT phase followed by further RL and rejection sampling to improve readability. The plan has three steps: distill a reasoning dataset from R1 to replicate the R1-Distill models, replicate the pure-RL R1-Zero pipeline with new math, reasoning and code datasets, and demonstrate multi-stage base → SFT → RL training.

Related posts

  • Open-R1: Update #1

    Hugging Face mediumAdept

    Open-R1's first week reproduced DeepSeek's MATH-500 scores for the R1-Distill models using lighteval, mostly within a few points of the reported numbers. GRPO training landed in TRL 0.14 with DeepSpeed ZeRO and vLLM generation, though R1's very long outputs (about 6,000 tokens on average, some over 20,000) make memory a constraint. For synthetic data generation, serving R1 on 4x 8xH100 nodes instead of 2 avoided KV-cache preemption. Switching from batched to streaming async requests kept GPU utilization steady. The update closes with a roundup of industry reactions, training-cost discussions, community reproductions such as TinyZero and Mini-R1, and R1-derived reasoning datasets.

  • Mini-R1: Reproduce Deepseek R1 „aha moment“ a RL tutorial

    Hugging Face hardMaster

    Recreates DeepSeek R1's "aha moment" by training Qwen2.5-3B-Instruct with GRPO on the Countdown numbers game, using rule-based format and accuracy rewards in TRL with DeepSpeed ZeRO-3 and vLLM generation on 4x H100s. GRPO drops PPO's value model and instead normalizes rewards within a group of sampled outputs to compute advantages. The DeepSeekMath hyperparameters became unstable after about 150 steps, so the learning rate was lowered to 5e-7 and the KL beta to 0.001. The model learned the output format by step 50 and reached about 50% success by step 450 (roughly 6 hours), shifting around step 200 from verbal reasoning to programmatic trial-and-check search.

  • Open R1: Update #2

    Hugging Face hardMaster

    OpenR1-Math-220k is a math reasoning dataset built by generating 800k DeepSeek R1 traces for 400k NuminaMath 1.5 problems on 512 local H100s. Switching inference from vLLM to SGLang nearly doubled throughput, from 15 to 25 generations per hour per H100. Traces were filtered with Math-Verify plus a Llama-3.3-70B-Instruct judge, which recovered 28k rejected problems, while reward-model selection among correct answers gave no gain over random choice. Fine-tuning Qwen2.5-Math-Instruct on the 94k default split nearly matches DeepSeek-Distill-Qwen-7B, and the update also covers community GRPO results, small curated datasets (s1K, LIMO) and controlling chain-of-thought length with budget forcing and cosine rewards.

  • Open R1: Update #3

    Hugging Face hardMaster

    Hugging Face's Open R1 project reproduces the code-reasoning side of DeepSeek-R1, releasing CodeForces-CoTs (about 100k R1-distilled C++ and Python solutions), a fully verifiable IOI benchmark with subtask grading and contest-style submission selection, and OlympicCoder 7B and 32B models fine-tuned from Qwen2.5 Coder. OlympicCoder-32B beats every open-weight model tested on IOI'2024, plus Claude 3.7 Sonnet, o1-mini and R1 itself under the 50-submission limit. The SFT lessons are concrete: sample packing badly hurts training on long reasoning traces, and a higher learning rate (4e-5) gains roughly 10 LiveCodeBench points per doubling. Adding editorials to prompts does not help, and prefilling `<think>` in the chat template is needed to reliably trigger long chain of thought.

  • Open R1: Update #4

    Hugging Face mediumAdept

    DeepSeek-V3 0324 keeps the original V3 architecture, moves to an MIT license, and posts large benchmark gains: AIME rises from 39.6 to 59.4, LiveCodeBench from 39.2 to 49.2 and GPQA from 59.1 to 68.4. The likely sources are improved post-training and possibly continual pretraining, though this is speculation until DeepSeek publishes a technical report. The model can be run through Hugging Face Inference Providers, TGI, SGLang on H100 nodes, or Unsloth dynamic GGUF quants with llama.cpp. Downloading it is safe because of safetensors, explicit trust_remote_code and Hub scanning, but its outputs need caution: review generated code, sandbox agents, keep credentials away from the model and keep a human in the loop.

The quest for software engineering knowledge.

Look:
Layout: