Les poètes bizarres - Forum

C'est normal d'être bizarre !

Vous n'êtes pas identifié(e).

#1 Je pense donc j'agis » * » 2025-02-09 23:29:58

RubenAlmon
Réponses : 0

_108243428_gettyimages-871148930.jpg
DeepSeek-R1 is an open-source language model built on DeepSeek-V3-Base that's been making waves in the AI neighborhood. Not just does it match-or even surpass-OpenAI's o1 model in many benchmarks, however it likewise features fully MIT-licensed weights. This marks it as the very first non-OpenAI/Google design to provide strong thinking abilities in an open and available way.
benchmark_1.jpeg

What makes DeepSeek-R1 especially exciting is its transparency. Unlike the less-open techniques from some market leaders, DeepSeek has published a detailed training approach in their paper.
The design is likewise extremely cost-effective, with input tokens costing simply $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 common wisdom was that much better models needed more information and compute. While that's still legitimate, models like o1 and R1 show an alternative: inference-time scaling through thinking.


The Essentials


The DeepSeek-R1 paper presented numerous models, lespoetesbizarres.free.fr but main among them were R1 and R1-Zero. Following these are a series of distilled models that, while interesting, I won't discuss here.


DeepSeek-R1 utilizes 2 significant ideas:


1. A multi-stage pipeline where a small set of cold-start data kickstarts the model, followed by massive RL.
2. Group Relative Policy Optimization (GRPO), a reinforcement knowing method that counts on comparing multiple model outputs per timely to prevent the requirement for a separate critic.


R1 and R1-Zero are both thinking designs. This basically suggests they do Chain-of-Thought before responding to. For the R1 series of designs, this takes kind as thinking within a tag, before addressing 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 used to enhance the design's policy to optimize reward.
R1-Zero attains excellent accuracy however in some cases produces confusing outputs, such as mixing several languages in a single response. R1 repairs that by integrating limited supervised fine-tuning and numerous RL passes, which enhances both accuracy and readability.


It is intriguing how some languages might express certain ideas better, which leads the design to pick the most expressive language for the task.


Training Pipeline


The training pipeline that DeepSeek released in the R1 paper is tremendously fascinating. It showcases how they produced such strong thinking designs, and what you can expect from each stage. This includes the problems that the resulting models from each stage have, and how they resolved it in the next stage.


It's fascinating that their training pipeline differs from the usual:


The usual training technique: Pretraining on large dataset (train to forecast next word) to get the base modelmonitored fine-tuningpreference tuning through RLHF
R1-Zero: Pretrained → RL
R1: Pretrained → Multistage training pipeline with numerous SFT and RL stages


Cold-Start Fine-Tuning: Fine-tune DeepSeek-V3-Base on a couple of thousand Chain-of-Thought (CoT) samples to make sure the RL procedure has a good starting point. This provides an excellent design to start RL.
First RL Stage: Apply GRPO with rule-based benefits to enhance reasoning accuracy and formatting (such as requiring chain-of-thought into believing tags). When they were near merging in the RL procedure, they moved to the next action. The result of this step is a strong reasoning design but with weak general capabilities, e.g., bad formatting and language mixing.
Rejection Sampling + basic data: Create brand-new SFT data through rejection sampling on the RL checkpoint (from step 2), combined with monitored information from the DeepSeek-V3-Base model. They gathered around 600k top quality thinking samples.
Second Fine-Tuning: Fine-tune DeepSeek-V3-Base again on 800k overall samples (600k thinking + 200k basic tasks) for wider abilities. This action resulted in a strong reasoning model with general abilities.
Second RL Stage: Add more benefit signals (helpfulness, harmlessness) to fine-tune the final model, in addition to the reasoning rewards. The result is DeepSeek-R1.
They likewise did design distillation for a number of Qwen and Llama models on the reasoning traces to get distilled-R1 designs.


Model distillation is a technique where you use a teacher model to improve a trainee design by generating training data for the trainee model.
The teacher is generally a bigger model than the trainee.


Group Relative Policy Optimization (GRPO)


The standard idea behind utilizing reinforcement knowing for LLMs is to tweak the model's policy so that it naturally produces more precise and beneficial answers.
They utilized a reward system that inspects not only for accuracy however also for proper formatting and language consistency, so the design gradually discovers to prefer actions that fulfill these quality requirements.


In this paper, they motivate the R1 design to produce chain-of-thought thinking through RL training with GRPO.
Rather than adding a separate module at reasoning time, the training procedure itself nudges the model to produce detailed, detailed outputs-making the chain-of-thought an emerging habits of the enhanced policy.


What makes their approach especially interesting is its dependence on straightforward, rule-based reward functions.
Instead of depending upon expensive external designs or human-graded examples as in traditional RLHF, the RL utilized for R1 uses simple requirements: it might provide a higher reward if the answer is proper, if it follows the anticipated/ formatting, and if the language of the answer matches that of the timely.
Not depending on a benefit design likewise means you don't need to hang out and effort training it, and it doesn't take memory and compute away from your main model.


GRPO was introduced in the DeepSeekMath paper. Here's how GRPO works:


1. For each input timely, the model produces various responses.
2. Each reaction gets a scalar reward based on factors like precision, formatting, and language consistency.
3. Rewards are changed relative to the group's performance, essentially determining how much better each action is compared to the others.
4. The model updates its technique slightly to prefer actions with higher relative advantages. It only makes slight adjustments-using methods like clipping and a KL penalty-to ensure the policy doesn't stray too far from its original habits.


A cool element of GRPO is its flexibility. You can use basic rule-based reward functions-for circumstances, awarding a bonus when the design correctly utilizes the syntax-to guide the training.


While DeepSeek utilized GRPO, you might use alternative approaches rather (PPO or PRIME).


For those aiming to dive much deeper, Will Brown has composed quite a nice application of training an LLM with RL utilizing GRPO. GRPO has actually also currently been contributed to the Transformer Reinforcement Learning (TRL) library, which is another great resource.
Finally, Yannic Kilcher has a great video explaining GRPO by going through the DeepSeekMath paper.


Is RL on LLMs the course to AGI?


As a final note on explaining DeepSeek-R1 and the approaches they have actually presented in their paper, I wish to highlight a passage from the DeepSeekMath paper, based on a point Yannic Kilcher made in his video.


These findings indicate that RL boosts the model's overall performance by rendering the output distribution more robust, to put it simply, it seems that the improvement is credited to boosting the appropriate response from TopK rather than the enhancement of fundamental abilities.


In other words, RL fine-tuning tends to shape the output circulation so that the highest-probability outputs are more likely to be appropriate, even though the total ability (as measured by the diversity of proper responses) is mainly present in the pretrained design.


This recommends that reinforcement knowing on LLMs is more about refining and "shaping" the existing distribution of actions rather than endowing the design with completely brand-new abilities.
Consequently, while RL methods such as PPO and GRPO can produce significant efficiency gains, there seems an inherent ceiling determined by the underlying model's pretrained knowledge.


It is uncertain to me how far RL will take us. Perhaps it will be the stepping stone to the next big milestone. I'm excited to see how it unfolds!


Running DeepSeek-R1


I've utilized DeepSeek-R1 by means of the main chat user interface for numerous issues, which it seems to solve all right. The additional search functionality makes it even nicer to use.


Interestingly, o3-mini(-high) was launched as I was writing this post. From my initial screening, R1 seems more powerful at mathematics than o3-mini.


I also leased a single H100 via 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 design's abilities.


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 working on the GPU), running by means of llama.cpp:
6797ebb87bb3f854015a85c6?width\u003d1200\u0026format\u003djpeg

29 layers appeared to be the sweet area provided this setup.


Performance:


A r/localllama user explained that they were able to get over 2 tok/sec with DeepSeek R1 671B, without using their GPU on their local gaming setup.
Digital Spaceport composed a full guide on how to run Deepseek R1 671b totally in your area 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 quite manageable for any serious work, however it's enjoyable to run these big models on available hardware.


What matters most to me is a mix of effectiveness and time-to-usefulness in these designs. Since reasoning designs need to think before answering, their time-to-usefulness is typically higher than other models, but their usefulness is likewise generally higher.
We require to both make the most of usefulness and lessen time-to-usefulness.


70B by means of Ollama


70.6 b params, 4-bit KM quantized DeepSeek-R1 running via Ollama:


GPU usage shoots up here, as expected when compared to the mainly CPU-powered run of 671B that I showcased above.


Resources


DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
[2402.03300] DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
DeepSeek R1 - Notion (Building a completely regional "deep researcher" with DeepSeek-R1 - YouTube).
DeepSeek R1's recipe to duplicate 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 grandmother - 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 a novel autoregressive structure that combines multimodal understanding and generation. It can both understand and produce images.
DeepSeek-R1: Incentivizing Reasoning Capability in Large Language Models through Reinforcement Learning (January 2025) This paper introduces DeepSeek-R1, an open-source reasoning design that measures up to the performance of OpenAI's o1. It provides a detailed approach for training such models utilizing large-scale reinforcement learning strategies.
DeepSeek-V3 Technical Report (December 2024) This report talks about the execution of an FP8 mixed accuracy training framework confirmed on an extremely large-scale model, attaining both sped up training and minimized GPU memory use.
DeepSeek LLM: Scaling Open-Source Language Models with Longtermism (January 2024) This paper explores scaling laws and presents findings that assist in the scaling of large-scale designs in open-source setups. It presents the DeepSeek LLM project, committed to advancing open-source language models with a long-lasting point of view.
DeepSeek-Coder: When the Large Language Model Meets Programming-The Rise of Code Intelligence (January 2024) This research study introduces the DeepSeek-Coder series, a variety of open-source code models trained from scratch on 2 trillion tokens. The models are pre-trained on a high-quality project-level code corpus and utilize 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 characterized by economical training and effective inference.
DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligence (June 2024) This research presents DeepSeek-Coder-V2, an open-source Mixture-of-Experts (MoE) code language design that attains performance similar to GPT-4 Turbo in code-specific tasks.


Interesting occasions
AI.jpg

- Hong Kong University reproduces R1 outcomes (Jan 25, '25).
- Huggingface reveals huggingface/open-r 1: Fully open recreation of DeepSeek-R1 to reproduce R1, fully open source (Jan 25, '25).
- OpenAI scientist verifies the DeepSeek team individually found and utilized some core concepts the OpenAI group utilized en route to o1


Liked this post? Join the newsletter.
AI.jpg

Pied de page des forums

Propulsé par FluxBB