Model Overview
Model Features
Model Capabilities
Use Cases
🚀 DeepSeek-R1
This is an advanced reasoning model. It uses large - scale reinforcement learning and has shown excellent performance in various benchmarks, outperforming many existing models in math, code, and reasoning tasks.
🚀 Quick Start
Instructions to run this model in llama.cpp
Or you can view more detailed instructions here: unsloth.ai/blog/deepseekr1-dynamic
- Do not forget about
<|User|>
and<|Assistant|>
tokens! - Or use a chat template formatter - Obtain the latest
llama.cpp
at https://github.com/ggerganov/llama.cpp. You can follow the build instructions below as well:
apt-get update
apt-get install build-essential cmake curl libcurl4-openssl-dev -y
git clone https://github.com/ggerganov/llama.cpp
cmake llama.cpp -B llama.cpp/build \
-DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON
cmake --build llama.cpp/build --config Release -j --clean-first --target llama-quantize llama-cli llama-gguf-split
cp llama.cpp/build/bin/llama-* llama.cpp
- It's best to use
--min-p 0.05
to counteract very rare token predictions - I found this to work well especially for the 1.58bit model. - Download the model via:
# pip install huggingface_hub hf_transfer
# import os # Optional for faster downloading
# os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
from huggingface_hub import snapshot_download
snapshot_download(
repo_id = "unsloth/DeepSeek-R1-GGUF",
local_dir = "DeepSeek-R1-GGUF",
allow_patterns = ["*UD-IQ1_S*"], # Select quant type UD-IQ1_S for 1.58bit
)
- Example with Q4_0 K quantized cache Notice -no-cnv disables auto conversation mode
./llama.cpp/llama-cli \
--model DeepSeek-R1-GGUF/DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf \
--cache-type-k q4_0 \
--threads 12 -no-cnv --prio 2 \
--temp 0.6 \
--ctx-size 8192 \
--seed 3407 \
--prompt "<|User|>Create a Flappy Bird game in Python.<|Assistant|>"
Example output:
<think>
Okay, so I need to figure out what 1 plus 1 is. Hmm, where do I even start? I remember from school that adding numbers is pretty basic, but I want to make sure I understand it properly.
Let me think, 1 plus 1. So, I have one item and I add another one. Maybe like a apple plus another apple. If I have one apple and someone gives me another, I now have two apples. So, 1 plus 1 should be 2. That makes sense.
Wait, but sometimes math can be tricky. Could it be something else? Like, in a different number system maybe? But I think the question is straightforward, using regular numbers, not like binary or hexadecimal or anything.
I also recall that in arithmetic, addition is combining quantities. So, if you have two quantities of 1, combining them gives you a total of 2. Yeah, that seems right.
Is there a scenario where 1 plus 1 wouldn't be 2? I can't think of any...
- If you have a GPU (RTX 4090 for example) with 24GB, you can offload multiple layers to the GPU for faster processing. If you have multiple GPUs, you can probably offload more layers.
./llama.cpp/llama-cli \
--model DeepSeek-R1-GGUF/DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf \
--cache-type-k q4_0 \
--threads 12 -no-cnv --prio 2 \
--n-gpu-layers 7 \
--temp 0.6 \
--ctx-size 8192 \
--seed 3407 \
--prompt "<|User|>Create a Flappy Bird game in Python.<|Assistant|>"
- If you want to merge the weights together, use this script:
./llama.cpp/llama-gguf-split --merge \
DeepSeek-R1-GGUF/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf \
merged_file.gguf
✨ Features
Model Introduction
We introduce our first - generation reasoning models, DeepSeek - R1 - Zero and DeepSeek - R1. DeepSeek - R1 - Zero, a model trained via large - scale reinforcement learning (RL) without supervised fine - tuning (SFT) as a preliminary step, demonstrated remarkable performance on reasoning. With RL, DeepSeek - R1 - Zero naturally emerged with numerous powerful and interesting reasoning behaviors. However, DeepSeek - R1 - Zero encounters challenges such as endless repetition, poor readability, and language mixing. To address these issues and further enhance reasoning performance, we introduce DeepSeek - R1, which incorporates cold - start data before RL. DeepSeek - R1 achieves performance comparable to OpenAI - o1 across math, code, and reasoning tasks. To support the research community, we have open - sourced DeepSeek - R1 - Zero, DeepSeek - R1, and six dense models distilled from DeepSeek - R1 based on Llama and Qwen. DeepSeek - R1 - Distill - Qwen - 32B outperforms OpenAI - o1 - mini across various benchmarks, achieving new state - of - the - art results for dense models.
Model Summary
- Post - Training: Large - Scale Reinforcement Learning on the Base Model
- We directly apply reinforcement learning (RL) to the base model without relying on supervised fine - tuning (SFT) as a preliminary step. This approach allows the model to explore chain - of - thought (CoT) for solving complex problems, resulting in the development of DeepSeek - R1 - Zero. DeepSeek - R1 - Zero demonstrates capabilities such as self - verification, reflection, and generating long CoTs, marking a significant milestone for the research community. Notably, it is the first open research to validate that reasoning capabilities of LLMs can be incentivized purely through RL, without the need for SFT. This breakthrough paves the way for future advancements in this area.
- We introduce our pipeline to develop DeepSeek - R1. The pipeline incorporates two RL stages aimed at discovering improved reasoning patterns and aligning with human preferences, as well as two SFT stages that serve as the seed for the model's reasoning and non - reasoning capabilities. We believe the pipeline will benefit the industry by creating better models.
- Distillation: Smaller Models Can Be Powerful Too
- We demonstrate that the reasoning patterns of larger models can be distilled into smaller models, resulting in better performance compared to the reasoning patterns discovered through RL on small models. The open source DeepSeek - R1, as well as its API, will benefit the research community to distill better smaller models in the future.
- Using the reasoning data generated by DeepSeek - R1, we fine - tuned several dense models that are widely used in the research community. The evaluation results demonstrate that the distilled smaller dense models perform exceptionally well on benchmarks. We open - source distilled 1.5B, 7B, 8B, 14B, 32B, and 70B checkpoints based on Qwen2.5 and Llama3 series to the community.
Finetune for Free
All notebooks are beginner friendly! Add your dataset, click "Run All", and you'll get a 2x faster finetuned model which can be exported to GGUF, vLLM or uploaded to Hugging Face.
Unsloth supports | Free Notebooks | Performance | Memory use |
---|---|---|---|
GRPO with Phi - 4 (14B) | ▶️ Start on Colab | 2x faster | 80% less |
Llama - 3.2 (3B) | ▶️ Start on Colab | 2.4x faster | 58% less |
Llama - 3.2 (11B vision) | ▶️ Start on Colab | 2x faster | 60% less |
Qwen2 VL (7B) | ▶️ Start on Colab | 1.8x faster | 60% less |
Qwen2.5 (7B) | ▶️ Start on Colab | 2x faster | 60% less |
Llama - 3.1 (8B) | ▶️ Start on Colab | 2.4x faster | 58% less |
Phi - 3.5 (mini) | ▶️ Start on Colab | 2x faster | 50% less |
Gemma 2 (9B) | ▶️ Start on Colab | 2.4x faster | 58% less |
Mistral (7B) | ▶️ Start on Colab | 2.2x faster | 62% less |
Special Thanks
A huge thank you to the DeepSeek team for creating and releasing these models.
📦 Installation
Model Downloads
DeepSeek - R1 Models
Model | #Total Params | #Activated Params | Context Length | Download |
---|---|---|---|---|
DeepSeek - R1 - Zero | 671B | 37B | 128K | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Zero) |
DeepSeek - R1 | 671B | 37B | 128K | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1) |
DeepSeek - R1 - Zero & DeepSeek - R1 are trained based on DeepSeek - V3 - Base. For more details regarding the model architecture, please refer to [DeepSeek - V3](https://github.com/deepseek - ai/DeepSeek - V3) repository.
DeepSeek - R1 - Distill Models
Model | Base Model | Download |
---|---|---|
DeepSeek - R1 - Distill - Qwen - 1.5B | [Qwen2.5 - Math - 1.5B](https://huggingface.co/Qwen/Qwen2.5 - Math - 1.5B) | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Distill - Qwen - 1.5B) |
DeepSeek - R1 - Distill - Qwen - 7B | [Qwen2.5 - Math - 7B](https://huggingface.co/Qwen/Qwen2.5 - Math - 7B) | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Distill - Qwen - 7B) |
DeepSeek - R1 - Distill - Llama - 8B | [Llama - 3.1 - 8B](https://huggingface.co/meta - llama/Llama - 3.1 - 8B) | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Distill - Llama - 8B) |
DeepSeek - R1 - Distill - Qwen - 14B | [Qwen2.5 - 14B](https://huggingface.co/Qwen/Qwen2.5 - 14B) | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Distill - Qwen - 14B) |
DeepSeek - R1 - Distill - Qwen - 32B | [Qwen2.5 - 32B](https://huggingface.co/Qwen/Qwen2.5 - 32B) | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Distill - Qwen - 32B) |
DeepSeek - R1 - Distill - Llama - 70B | [Llama - 3.3 - 70B - Instruct](https://huggingface.co/meta - llama/Llama - 3.3 - 70B - Instruct) | [🤗 HuggingFace](https://huggingface.co/deepseek - ai/DeepSeek - R1 - Distill - Llama - 70B) |
DeepSeek - R1 - Distill models are fine - tuned based on open - source models, using samples generated by DeepSeek - R1. We slightly change their configs and tokenizers. Please use our setting to run these models.
📚 Documentation
Evaluation Results
DeepSeek - R1 - Evaluation
For all our models, the maximum generation length is set to 32,768 tokens. For benchmarks requiring sampling, we use a temperature of $0.6$, a top - p value of $0.95$, and generate 64 responses per query to estimate pass@1.
Category | Benchmark (Metric) | Claude - 3.5 - Sonnet - 1022 | GPT - 4o 0513 | DeepSeek V3 | OpenAI o1 - mini | OpenAI o1 - 1217 | DeepSeek R1 |
---|---|---|---|---|---|---|---|
Architecture | - | - | MoE | - | - | MoE | |
# Activated Params | - | - | 37B | - | - | 37B | |
# Total Params | - | - | 671B | - | - | 671B | |
English | MMLU (Pass@1) | 88.3 | 87.2 | 88.5 | 85.2 | 91.8 | 90.8 |
MMLU - Redux (EM) | 88.9 | 88.0 | 89.1 | 86.7 | - | 92.9 | |
MMLU - Pro (EM) | 78.0 | 72.6 | 75.9 | 80.3 | - | 84.0 | |
DROP (3 - shot F1) | 88.3 | 83.7 | 91.6 | 83.9 | 90.2 | 92.2 | |
IF - Eval (Prompt Strict) | 86.5 | 84.3 | 86.1 | 84.8 | - | 83.3 | |
GPQA - Diamond (Pass@1) | 65.0 | 49.9 | 59.1 | 60.0 | 75.7 | 71.5 | |
SimpleQA (Correct) | 28.4 | 38.2 | 24.9 | 7.0 | 47.0 | 30.1 | |
FRAMES (Acc.) | 72.5 | 80.5 | 73.3 | 76.9 | - | 82.5 | |
AlpacaEval2.0 (LC - winrate) | 52.0 | 51.1 | 70.0 | 57.8 | - | 87.6 | |
ArenaHard (GPT - 4 - 1106) | 85.2 | 80.4 | 85.5 | 92.0 | - | 92.3 | |
Code | LiveCodeBench (Pass@1 - COT) | 33.8 | 34.2 | - | 53.8 | 63.4 | 65.9 |
Codeforces (Percentile) | 20.3 | 23.6 | 58.7 | 93.4 | 96.6 | 96.3 | |
Codeforces (Rating) | 717 | 759 | 1134 | 1820 | 2061 | 2029 | |
SWE Verified (Resolved) | 50.8 | 38.8 | 42.0 | 41.6 | 48.9 | 49.2 | |
Aider - Polyglot (Acc.) | 45.3 | 16.0 | 49.6 | 32.9 | 61.7 | 53.3 | |
Math | AIME 2024 (Pass@1) | 16.0 | 9.3 | 39.2 | 63.6 | 79.2 | 79.8 |
MATH - 500 (Pass@1) | 78.3 | 74.6 | 90.2 | 90.0 | 96.4 | 97.3 | |
CNMO 2024 (Pass@1) | 13.1 | 10.8 | 43.2 | 67.6 | - | 78.8 | |
Chinese | CLUEWSC (EM) | 85.4 | 87.9 | 90.9 | 89.9 | - | 92.8 |
C - Eval (EM) | 76.7 | 76.0 | 86.5 | 68.9 | - | 91.8 | |
C - SimpleQA (Correct) | 55.4 | 58.7 | 68.0 | 40.3 | - | 63.7 |
Distilled Model Evaluation
Model | AIME 2024 pass@1 | AIME 2024 cons@64 | MATH - 500 pass@1 | GPQA Diamond pass@1 | LiveCodeBench pass@1 | CodeForces rating |
---|---|---|---|---|---|---|
[Original table content here, but it's incomplete in the input] | ... | ... | ... | ... | ... | ... |
📄 License
The code is under the MIT license. For the model license, please refer to [Code License](https://github.com/deepseek - ai/DeepSeek - R1/blob/main/LICENSE - CODE) and [Model License](https://github.com/deepseek - ai/DeepSeek - R1/blob/main/LICENSE - MODEL).
⚠️ Important Note
Before running DeepSeek - R1 series models locally, we kindly recommend reviewing the [Usage Recommendation](#usage - recommendations) section.

