Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
S
soccer-warriors
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Issues 70
    • Issues 70
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Aline Sidaway
  • soccer-warriors
  • Issues
  • #66

Closed
Open
Opened Feb 12, 2025 by Aline Sidaway@alinesidaway03
  • Report abuse
  • New issue
Report abuse New issue

Distillation with Reasoning: can DeepSeek R1 Teach Better Than Humans?


Inclusion of reasoning "chains of idea" (CoT) in the design output substantially improves its quality, but it increases reasoning expense. - Distillation transfers thinking understanding from a pricey teacher model to a more cost-effective trainee, reducing general reasoning expense.

  • DeepSeek R1 can produce detailed CoT, making it an excellent instructor design.
  • Synthetic information generated by DeepSeek R1 might outshine data produced by human specialists.

    Introduction

    The current release of DeepSeek R1 has taken the AI neighborhood by storm, providing efficiency on par with leading frontier models-such as OpenAI's o1-at a fraction of the cost. Still, R1 can be expensive for usage cases with high traffic or low latency requirements.

    DeepSeek R1's strength depends on its explicit detailed thinking. Before generating a last answer, it creates an internal "chain of idea" (CoT) to systematically reason through each problem. This process is a kind of test-time calculation, allowing the model to dynamically assign more calculate to complex issues. However, these extended reasoning series typically increase inference expense.

    Distillation

    Distillation is an approach for moving understanding from a large, more powerful teacher design to a smaller sized, more cost-efficient trainee design. According to the DeepSeek R1 paper, R1 is highly effective in this instructor role. Its detailed CoT series direct the trainee model to break down complicated jobs into smaller, more .

    Comparing Distillation to Human-Labeled Data

    Although fine-tuning with human-labeled information can produce customized designs, collecting both final answers and their corresponding thinking actions is pricey. Distillation scales more quickly: rather than relying on human annotations, the teacher model immediately generates the training data for the trainee.

    A Side Note on Terminology

    The term "distillation" can refer to various methods:

    Distribution Distillation Aligns the trainee design's output token distribution with the teacher's utilizing Kullback-Leibler divergence (KL-divergence). Works finest when both designs share the very same architecture, tokenizer, and pre-training data.

    Data Distillation Uses the teacher design to create conclusions for a set of triggers. Fine-tunes the trainee model using a basic cross-entropy loss on these created outputs, skipping the KL-divergence term. Allows the teacher and trainee to be different model families and tokenizers (though if the instructor wiki.eqoarevival.com uses specialized tokens like __, it can be useful for both designs to acknowledge them).

    In this post, we concentrate on the information distillation since it supports a larger range of student-teacher pairs.

    Data Generation

    Training data is frequently a traffic jam in design development. In a recent post (include link), we checked out how to produce labels by integrating model output with a verification function. Distillation takes a different approach, using an instructor model to synthesize missing out on conclusions.

    DeepSeek R1 sticks out since it not only supplies final answers but also exposes its detailed chain of thought-unlike other reasoning models that keep this internal process concealed. If your dataset includes ground truth answers, you can determine high-quality artificial CoTs through rejection tasting, selecting just the very best chains to further enhance your fine-tuned design. Rejection sampling can get rid of inaccurate information examples either by comparing the produced information against ground fact labels or by applying a user-defined recognition function. From the interface viewpoint, the recognition function resembles the proven reward function utilized by value-model-free RL techniques like these explained in our current post.

    Case Study: bybio.co GSM8K

    GSM8K (Grade School Math 8K) is a dataset of 8.5 K varied grade-school mathematics word issues. Each data point includes:

    1. A problem description.
  1. A human professional's chain of thought.
  2. The last answer.

    We broadened this dataset by adding:

    Synthetic R1 reasoning, i.e., the CoT created by DeepSeek R1.

    Then, we fine-tuned three versions of the design (utilizing LoRA on llama-3.1 -8 B-instruct), each with different training targets:

    Direct Answer Only: Generate the final response without showing reasoning. Human Expert CoT: Generate the final response along with a reasoning chain looking like the human professional's. Synthetic R1 CoT: Generate the last response along with DeepSeek R1's artificial thinking chain. The table listed below sums up average accuracy and thinking length:

    - Note: The accuracy for the 5-shot standard may vary from numbers reported in other places due to various assessment setups. The essential focus is on comparing relative performance across distillation techniques, not on beating other models.

    From this study, artificial thinking CoTs from DeepSeek R1 appear remarkable to human-expert CoTs in improving efficiency, albeit with a greater inference expense due to their longer length.

    Fireworks AI Inference and Fine-Tuning Platform

    DeepSeek R1 is available on the Fireworks AI platform. An easy to use distillation interface will soon belong to FireOptimizer. If you need earlier gain access to, please contact us to check out options.

    Conclusions

    By incorporating reasoning-based data through distillation, organizations can significantly enhance design efficiency without bearing the complete burden of human-annotated datasets. DeepSeek R1's ability to produce long, high-quality thinking chains makes it a powerful teacher model-showing that, sometimes, the maker might simply out-teach the human.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View project labels
Reference: alinesidaway03/soccer-warriors#66