DeepSeek-R1 is an open-source language design developed on DeepSeek-V3-Base that's been making waves in the AI community. Not just does it match-or even surpass-OpenAI's o1 design in numerous benchmarks, but it also comes with fully MIT-licensed weights. This marks it as the very first non-OpenAI/Google design to deliver strong reasoning capabilities in an open and available way.
![](https://authorsguild.org/app/uploads/2024/02/header-advocacy-artificial-intelligence.jpeg)
What makes DeepSeek-R1 particularly interesting is its transparency. Unlike the less-open approaches from some industry leaders, DeepSeek has published a detailed training approach in their paper.
The design is also incredibly economical, with input tokens costing just $0.14-0.55 per million (vs o1's $15) and output tokens at $2.19 per million (vs o1's $60).
Until ~ GPT-4, the typical knowledge was that better models needed more information and compute. While that's still valid, models like o1 and R1 show an alternative: inference-time scaling through thinking.
The Essentials
The DeepSeek-R1 paper provided multiple designs, however main amongst them were R1 and R1-Zero. Following these are a series of distilled designs that, while intriguing, I won't discuss here.
DeepSeek-R1 utilizes two significant ideas:
1. A multi-stage pipeline where a little set of cold-start data kickstarts the design, followed by large-scale RL.
2. Group Relative Policy Optimization (GRPO), a support learning technique that counts on comparing numerous model outputs per timely to avoid the requirement for a separate critic.
R1 and R1-Zero are both thinking models. This essentially means they do Chain-of-Thought before addressing. For the R1 series of designs, this takes type as believing within a tag, before responding to with a last summary.
R1-Zero vs R1
R1-Zero applies Reinforcement Learning (RL) straight to DeepSeek-V3-Base with no supervised fine-tuning (SFT). RL is utilized to optimize the design's policy to make the most of benefit.
R1-Zero attains exceptional accuracy however in some cases produces confusing outputs, such as blending numerous languages in a single response. R1 repairs that by including minimal monitored fine-tuning and several RL passes, which improves both correctness and readability.
It is intriguing how some languages may reveal certain concepts much better, which leads the model to choose the most expressive language for the job.
Training Pipeline
The training pipeline that DeepSeek published in the R1 paper is exceptionally intriguing. It showcases how they developed such strong thinking models, and what you can expect from each phase. This includes the issues that the resulting models from each phase have, and how they fixed it in the next stage.
It's fascinating that their training pipeline differs from the normal:
The normal training method: Pretraining on large dataset (train to forecast next word) to get the base model → monitored fine-tuning → preference tuning through RLHF
R1-Zero: Pretrained → RL
R1: Pretrained → Multistage training pipeline with multiple SFT and akropolistravel.com RL stages
Cold-Start Fine-Tuning: Fine-tune DeepSeek-V3-Base on a few thousand Chain-of-Thought (CoT) samples to ensure the RL procedure has a good starting point. This offers an excellent design to begin RL.
First RL Stage: Apply GRPO with rule-based rewards to improve reasoning correctness and format (such as forcing chain-of-thought into believing tags). When they were near convergence in the RL process, they transferred to the next step. The outcome of this action is a strong thinking model but with weak basic capabilities, e.g., poor format and language mixing.
Rejection Sampling + general data: forum.batman.gainedge.org Create new SFT information through rejection sampling on the RL checkpoint (from action 2), combined with monitored information from the DeepSeek-V3-Base design. They collected around 600k high-quality thinking samples.
Second Fine-Tuning: Fine-tune DeepSeek-V3-Base again on 800k overall samples (600k thinking + 200k basic jobs) for broader capabilities. This step led to a strong thinking model with basic capabilities.
Second RL Stage: Add more reward signals (helpfulness, harmlessness) to improve the last design, in addition to the reasoning benefits. The outcome is DeepSeek-R1.
They also did design distillation for numerous Qwen and Llama models on the thinking traces to get distilled-R1 models.
Model distillation is a method where you utilize a teacher design to improve a trainee design by creating training data for the trainee design.
The instructor is generally a bigger model than the trainee.
Group Relative Policy Optimization (GRPO)
The fundamental idea behind using reinforcement learning for LLMs is to tweak the design's policy so that it naturally produces more accurate and helpful responses.
They utilized a benefit system that checks not only for correctness however also for appropriate format and language consistency, so the design gradually discovers to prefer actions that fulfill these quality requirements.
In this paper, they encourage the R1 design to generate chain-of-thought thinking through RL training with GRPO.
Rather than adding a separate module at inference time, the training procedure itself pushes the model to produce detailed, fishtanklive.wiki detailed outputs-making the chain-of-thought an emerging behavior of the optimized policy.
What makes their approach particularly fascinating is its reliance on straightforward, rule-based benefit functions.
Instead of depending on costly external models or human-graded examples as in traditional RLHF, the RL utilized for R1 uses easy criteria: it may give a higher reward if the answer is right, if it follows the anticipated/ formatting, and if the language of the answer matches that of the timely.
Not counting on a benefit model likewise indicates you do not need to invest time and effort training it, and it does not take memory and compute away from your main design.
GRPO was introduced in the DeepSeekMath paper. Here's how GRPO works:
1. For botdb.win each input timely, the model produces different responses.
2. Each reaction receives a scalar reward based on elements like precision, formatting, and language consistency.
3. Rewards are changed relative to the group's performance, essentially determining just how much better each response is compared to the others.
4. The model updates its strategy a little to prefer responses with higher relative benefits. It just makes slight adjustments-using methods like clipping and a KL penalty-to make sure the policy doesn't wander off too far from its original habits.
A cool aspect of GRPO is its flexibility. You can utilize basic rule-based reward functions-for circumstances, granting a reward when the model correctly uses the syntax-to guide the training.
While DeepSeek utilized GRPO, you could utilize alternative methods instead (PPO or PRIME).
For those aiming to dive much deeper, Will Brown has written rather a nice application of training an LLM with RL using GRPO. GRPO has also already been included to the Transformer Reinforcement Learning (TRL) library, which is another excellent resource.
Finally, Yannic Kilcher has an excellent video explaining GRPO by going through the DeepSeekMath paper.
Is RL on LLMs the course to AGI?
As a last note on explaining DeepSeek-R1 and the approaches they've provided in their paper, I desire to highlight a passage from the DeepSeekMath paper, based upon a point Yannic Kilcher made in his video.
These findings indicate that RL boosts the design's total performance by rendering the output distribution more robust, to put it simply, it seems that the enhancement is associated to boosting the correct reaction from TopK rather than the enhancement of basic capabilities.
In other words, RL fine-tuning tends to shape the output circulation so that the highest-probability outputs are more most likely to be right, even though the overall capability (as determined by the variety of proper answers) is mainly present in the pretrained model.
This suggests that support learning on LLMs is more about refining and "forming" the existing circulation of responses rather than enhancing the model with completely new capabilities.
Consequently, while RL methods such as PPO and GRPO can produce substantial performance gains, there seems an intrinsic ceiling determined by the underlying design's pretrained understanding.
It is uncertain to me how far RL will take us. Perhaps it will be the stepping stone to the next big turning point. I'm excited to see how it unfolds!
Running DeepSeek-R1
I've utilized DeepSeek-R1 via the main chat interface for different problems, which it appears to resolve all right. The additional search performance makes it even nicer to utilize.
Interestingly, o3-mini(-high) was released as I was composing this post. From my preliminary testing, R1 appears more powerful at mathematics than o3-mini.
I also rented a single H100 through Lambda Labs for $2/h (26 CPU cores, 214.7 GB RAM, 1.1 TB SSD) to run some experiments.
The main objective was to see how the model would carry out when deployed on a single H100 GPU-not to thoroughly evaluate the model's capabilities.
671B via Llama.cpp
DeepSeek-R1 1.58-bit (UD-IQ1_S) quantized model by Unsloth, with a 4-bit quantized KV-cache and partial GPU offloading (29 layers operating on the GPU), running through llama.cpp:
29 layers seemed to be the sweet spot provided this setup.
Performance:
![](https://www.oecd.org/adobe/dynamicmedia/deliver/dm-aid--1eafd551-b2b7-4826-bedb-7254f76dc7b2/shutterstock-2261069627.jpg?quality\u003d80\u0026preferwebp\u003dtrue)
A r/localllama user explained that they were able to overcome 2 tok/sec with DeepSeek R1 671B, without using their GPU on their regional gaming setup.
Digital Spaceport composed a complete guide on how to run Deepseek R1 671b fully locally on a $2000 EPYC server, on which you can get ~ 4.25 to 3.5 tokens per second.
As you can see, the tokens/s isn't rather bearable for any serious work, however it's enjoyable to run these big designs on available hardware.
What matters most to me is a mix of effectiveness and time-to-usefulness in these models. Since thinking designs require to think before responding to, their time-to-usefulness is generally higher than other designs, however their usefulness is likewise generally higher.
We need to both take full advantage of effectiveness and decrease time-to-usefulness.
70B by means of Ollama
70.6 b params, 4-bit KM quantized DeepSeek-R1 running by means of Ollama:
GPU usage soars here, as anticipated when compared to the mainly CPU-powered run of 671B that I showcased above.
![](https://composio.dev/wp-content/uploads/2025/01/notes-on-deepseek-v3.png)
Resources
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs by means of Reinforcement Learning
[2402.03300] DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
DeepSeek R1 - Notion (Building a fully local "deep researcher" with DeepSeek-R1 - YouTube).
DeepSeek R1's dish to replicate o1 and the future of reasoning LMs.
The Illustrated DeepSeek-R1 - by Jay Alammar.
Explainer: What's R1 & Everything Else? - Tim Kellogg.
DeepSeek R1 Explained to your grandma - YouTube
DeepSeek
- Try R1 at chat.deepseek.com.
GitHub - deepseek-ai/DeepSeek-R 1.
deepseek-ai/Janus-Pro -7 B · Hugging Face (January 2025): Janus-Pro is an unique autoregressive structure that unifies multimodal understanding and generation. It can both comprehend and generate images.
DeepSeek-R1: Incentivizing Reasoning Capability in Large Language Models by means of Reinforcement Learning (January 2025) This paper presents DeepSeek-R1, an open-source thinking model that measures up to the performance of OpenAI's o1. It presents a detailed approach for training such models utilizing large-scale reinforcement learning techniques.
DeepSeek-V3 Technical Report (December 2024) This report goes over the execution of an FP8 blended accuracy training structure confirmed on an incredibly massive design, attaining both accelerated training and lowered GPU memory use.
DeepSeek LLM: Scaling Open-Source Language Models with Longtermism (January 2024) This paper explores scaling laws and provides findings that facilitate the scaling of massive designs in open-source configurations. It presents the DeepSeek LLM job, committed to advancing open-source language models with a long-lasting viewpoint.
DeepSeek-Coder: When the Large Language Model Meets Programming-The Rise of Code Intelligence (January 2024) This research study presents the DeepSeek-Coder series, a series of open-source code models trained from scratch on 2 trillion tokens. The designs are pre-trained on a top quality project-level code corpus and use a fill-in-the-blank job to enhance code generation and infilling.
DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model (May 2024) This paper presents DeepSeek-V2, a Mixture-of-Experts (MoE) language design defined by cost-effective training and effective reasoning.
DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligence (June 2024) This research introduces DeepSeek-Coder-V2, an open-source Mixture-of-Experts (MoE) code language model that attains efficiency comparable to GPT-4 Turbo in code-specific jobs.
Interesting occasions
- Hong Kong University duplicates R1 results (Jan 25, '25).
- Huggingface announces huggingface/open-r 1: Fully open recreation of DeepSeek-R1 to reproduce R1, totally open source (Jan 25, '25).
- OpenAI scientist validates the DeepSeek team individually found and utilized some core concepts the OpenAI team utilized en route to o1
Liked this post? Join the newsletter.