DeepSeek R1 Explained
1. Overview
What is DeepSeek R1?
DeepSeek R1 is a reasoning-enhanced large language model released by DeepSeek. Through innovative post-training techniques, it achieves reasoning capability comparable to OpenAI o1 while being completely free and open source.
Core breakthroughs
| Breakthrough | Description | |------|------| | R1-Zero | First to show that reasoning ability can emerge from pure reinforcement learning, without supervised learning | | New training paradigm | RL-based post-training built on the GRPO algorithm, significantly improving reasoning | | Distillation innovation | Distills large-model capability into smaller models, bringing reasoning to more scenarios |
Key achievements
- ≈ o1 level: reasoning capability on par with OpenAI o1
- Completely free: a strong reasoning model available to everyone
- Open source: technical approach and methods publicly released
- Higher compute efficiency: removing the Value Model greatly reduces memory and compute overhead
- Better for open-ended problems: no reliance on a value model's judgment, better suited to complex reasoning tasks
- Competitive optimization: candidates compete against each other, continuously improving model performance
- Demonstrated the feasibility of pure reinforcement learning for reasoning
- Novel application of the GRPO algorithm
- Established a low-cost post-training paradigm
- Performance parity between open-source and closed-source models
---
2. The GRPO Algorithm
GRPO vs PPO
PPO (traditional) pipeline: 1. Input problem → 2. Generate output → 3. Reward evaluation → 4. Value prediction → 5. Compute advantage → 6. Update policy
GRPO (used in R1) pipeline: 1. Input problem → 2. Generate multiple candidates in parallel → 3. Compare rewards → 4. Select the best → 5. Optimize directly
Performance comparison
| Metric | PPO | GRPO | |------|-----|------| | Algorithm complexity | 85% | 45% | | Training efficiency | 60% | 90% | | Final performance | 70% | 85% |
Key advantages of GRPO
---
3. Training Pipeline
Two-stage training strategy
Stage 1: Reasoning capability training
| Step | Content | Data | |------|------|------| | 1 | SFT on a small set of high-quality data | Thousands of chain-of-thought samples | | 2 | RL on reasoning-intensive tasks | Coding, math, science, and logic task sets |
Stage 2: Overall capability optimization
| Step | Content | Data | |------|------|------| | 1 | SFT on multi-domain data | 600K reasoning samples + 200K general samples | | 2 | RL for safety & general capability | Comprehensive evaluation system |
---
4. Benchmark Performance
Benchmark comparison
| Benchmark | GPT-4 | OpenAI o1 | DeepSeek R1 | |----------|-------|-----------|-------------| | AIME 2024 | 83.3 | 93.0 | 94.2 | | Codeforces | 11 | 213 | 251 | | MATH-500 | 42.5 | 85.5 | 90.8 |
Capability comparison
| Capability | DeepSeek R1 | OpenAI o1 | GPT-4 | |------|-------------|-----------|-------| | Math reasoning | 95 | 90 | 70 | | Coding | 92 | 88 | 75 | | Chinese understanding | 96 | 82 | 78 |
---
5. Technical Impact
Source: Easy AI tutorial series