<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ayushi Sahu on Medium]]></title>
        <description><![CDATA[Stories by Ayushi Sahu on Medium]]></description>
        <link>https://medium.com/@ayushiiisahu?source=rss-7cc06ed46173------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*u7weN8g6ApAUpFvrXTdeEA.jpeg</url>
            <title>Stories by Ayushi Sahu on Medium</title>
            <link>https://medium.com/@ayushiiisahu?source=rss-7cc06ed46173------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 15:04:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayushiiisahu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What you need to know before you appreciate DeepSeek-R1?]]></title>
            <link>https://ayushiiisahu.medium.com/what-you-need-to-know-before-you-appreciate-deepseek-r1-29712b48bb58?source=rss-7cc06ed46173------2</link>
            <guid isPermaLink="false">https://medium.com/p/29712b48bb58</guid>
            <category><![CDATA[deepseek-r1]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[chain-of-thought]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ayushi Sahu]]></dc:creator>
            <pubDate>Sun, 26 Jan 2025 12:45:41 GMT</pubDate>
            <atom:updated>2025-01-26T13:16:56.180Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2S8I32inrWK5CnhUTKuY6g.png" /><figcaption>Roosters don’t lay eggs — DeepSeek-R1 cracks the riddle with humor and logic.</figcaption></figure><p>If you’re thinking of using OpenAI O1, hold that thought (and your $$$) — because DeepSeek R1 is here to steal the show! Yes, there’s a new model in town, and it’s making waves.</p><p>Before you dive into the wonders of DeepSeek R1, let’s brush up on a few key concepts to truly appreciate its brilliance.</p><h4>Group Relative Policy Optimization (GRPO)</h4><p>DeepSeek R1 uses a cutting-edge reinforcement learning technique known as <strong>Group Relative Policy Optimization (GRPO) (</strong>introduced in <a href="https://arxiv.org/pdf/2402.03300">DeepSeek Math paper</a><strong>)</strong>, which builds on the <strong>Proximal Policy Optimization (PPO)</strong> framework. While PPO works with two components — a “robot” that makes moves and a “helper” robot that evaluates the quality of those moves — GRPO simplifies things. It removes the helper robot, allowing the main robot to improve by solving the same puzzle multiple times using different strategies. Each attempt gets scored, and the average score serves as the baseline. This approach reduces memory and computational costs, making training faster and more efficient, while still keeping performance high.</p><p>Now that we know a little technique they use let’s see how DeepSeek R1’s training unfolds in four stages.</p><h4><strong>1. Cold Start</strong></h4><p>To make DeepSeek-R1 better than its earlier version (DeepSeek-R1-Zero), the DeepSeek-V3-Base is fine-tuned on some easy-to-understand examples to help it learn faster. This helps avoid problems that can happen when the model tries to learn from scratch and gets confused.</p><p>To collect these examples, a few methods were tried:</p><ul><li>Giving the model short hints to guide it in solving problems.</li><li>Asking the model to give detailed answers, with steps to explain its thinking and check its own answers.</li><li>Collecting answers from DeepSeek-R1-Zero in a readable form and making them clearer with the help of human helpers.</li></ul><p>This approach is considered superior for two main reasons:</p><ul><li>Improved Readability: DeepSeek-R1-Zero often produced answers that were difficult to read, sometimes mixing languages or lacking proper formatting. In contrast, for DeepSeek-R1, the answers are designed to be clear and easy to follow. A summary is added at the end of each response, making it even more accessible and digestible.</li><li>Enhanced Performance: By carefully crafting easy-to-understand examples, DeepSeek-R1 demonstrates improved performance compared to DeepSeek-R1-Zero. This step-by-step training method allows the model to reason more effectively and generate more accurate, coherent results.</li></ul><h4><strong>2. Reasoning-Oriented Reinforcement Learning</strong></h4><p>After improving DeepSeek-V3-Base with the basic examples, the same big training process used for DeepSeek-R1-Zero is applied again. This part of the training focuses on making the model better at tasks that require strong reasoning, like coding, math, science, and solving logical problems that have clear answers.</p><p>During training, the model sometimes mixes languages in its reasoning process. To fix this, a <strong>language consistency reward</strong> is introduced. This reward checks how much of the reasoning process uses words from the target language. While tests showed that this slightly lowered the model’s overall performance, it helped make the answers clearer and easier to understand, which is preferred by humans.</p><p>In the end, both the <strong>accuracy</strong> of solving reasoning tasks and the <strong>language consistency</strong> are added up to calculate the model’s final score. The training continues until the model performs well and is ready to solve reasoning tasks on its own.</p><h4><strong>3. Rejection Sampling and Supervised Fine-Tuning</strong></h4><p>Once the model has improved its reasoning skills through reinforcement learning (RL), the next step is to make it even better at a variety of tasks, like writing, role-playing, and answering general questions. To do this, the model goes through another fine-tuning process called <strong>Supervised Fine-Tuning (SFT)</strong>.</p><p>Here’s how it works:</p><ol><li><strong>Reasoning Data:</strong> The team takes the reasoning tasks the model has learned and creates new problems based on them. They also add more data from other areas, using a mix of rules and judgment from the model itself. They filter out messy answers, like ones that mix languages, have too many long paragraphs, or include code blocks. The final collection includes about <strong>600k reasoning-related examples</strong>.</li><li><strong>Non-Reasoning Data:</strong> For tasks that don’t need as much reasoning, like writing, answering questions, or translating, they use the DeepSeek-V3 system. Some of these tasks might still have the model generate a reasoning process (called a <strong>chain-of-thought</strong>) before answering, while for simpler questions like “hello,” the model just gives a direct answer. In total, about <strong>200k non-reasoning examples</strong> are gathered.</li></ol><p>Finally, the model is fine-tuned for two full passes (called <strong>epochs</strong>) using all the collected data — about <strong>800k examples</strong> — to make it better at all types of tasks.</p><h4><strong>4. Comprehensive Reinforcement Learning</strong></h4><p>To make the model more aligned with what humans prefer, an extra training step is added. This step focuses on making the model not only better at reasoning but also more <strong>helpful</strong> and <strong>harmless</strong>.</p><p>Here’s how it works:</p><ol><li><strong>Reasoning Data:</strong> The model keeps learning how to solve problems in math, code, and logic by using rules to guide it, just like in the earlier steps.</li><li><strong>General Data:</strong> For other tasks, the model learns from human feedback. This helps it understand what people like and don’t like, and how to answer questions in a way that makes sense in real-world situations.</li><li><strong>Helpfulness:</strong> The model is trained to make sure that the final answer is useful and relevant to the person asking, without messing up the reasoning process.</li><li><strong>Harmlessness:</strong> The model checks its answers to make sure they don’t have any harmful, biased, or risky content. It looks at the full response, including the reasoning and the final answer, to avoid causing any problems.</li></ol><p>By using these combined training methods, the model gets better at thinking through problems, while also being more helpful and safe for users. Check out the evaluation in their publication (<a href="https://arxiv.org/pdf/2501.12948">Here)</a>.</p><p>I think I might have just become team DeepSeek, what are you thoughts? Check for yourself <a href="https://chat.deepseek.com/">here</a> and drop your comments.</p><p>Here are some excellent articles I referenced:</p><ol><li><a href="https://www.datacamp.com/blog/deepseek-r1">DeepSeek R1: Features, o1 Comparison, Distilled Models &amp; More</a></li></ol><p>2. <a href="https://www.marktechpost.com/2024/06/28/a-deep-dive-into-group-relative-policy-optimization-grpo-method-enhancing-mathematical-reasoning-in-open-language-models/">A Deep Dive into Group Relative Policy Optimization (GRPO) Method: Enhancing Mathematical Reasoning in Open Language Models</a></p><p>3. <a href="https://arxiv.org/pdf/2501.12948">DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning</a></p><p>4. <a href="https://www.geeksforgeeks.org/what-is-reinforcement-learning/">Reinforcement learning</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29712b48bb58" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>