Update README.md
This commit is contained in:
66
README.md
66
README.md
@@ -4,52 +4,53 @@ license: apache-2.0
|
||||
|
||||
## 📖 Introduction
|
||||
|
||||
# DistilQwen2.5-DS3-0324 系列快思考推理模型
|
||||
# DistilQwen2.5-DS3-0324 Series: Fast-Thinking Reasoning Models
|
||||
|
||||
## 概述
|
||||
在平衡高效推理与思维能力的行业挑战下,DistilQwen2.5-DS3-0324系列创新性地将DeepSeekV3-0324的快思考能力迁移到轻量模型中。通过两阶段蒸馏框架,该系列在保持高性能的同时实现:
|
||||
- **推理速度提升**:输出token数减少60-80%(相比慢思考模型)
|
||||
- **资源消耗降低**:适合边缘计算部署
|
||||
- **认知偏差消除**:独创的轨迹对齐技术
|
||||
## Overview
|
||||
In response to the industry challenge of balancing efficient reasoning with cognitive capabilities, the DistilQwen2.5-DS3-0324 series innovatively transfers the fast-thinking capabilities of DeepSeekV3-0324 to lightweight models. Through a two-stage distillation framework, this series achieves high performance while delivering:
|
||||
- **Enhanced Reasoning Speed**: Reduces output tokens by 60-80% (compared to slow-thinking models)
|
||||
- **Reduced Resource Consumption**: Suitable for edge computing deployment
|
||||
- **Elimination of Cognitive Bias**: Proprietary trajectory alignment technology
|
||||
|
||||
## 核心创新
|
||||
### 1. 快思考蒸馏框架
|
||||
- **阶段一:快思考CoT数据收集**
|
||||
- **Long-to-Short改写**:从DeepSeek-R1提炼关键推理步骤
|
||||
- **教师模型蒸馏**:提取DeepSeekV3-0324的快速推理轨迹
|
||||
## Core Innovations
|
||||
### 1. Fast-Thinking Distillation Framework
|
||||
- **Stage 1: Fast-Thinking CoT Data Collection**
|
||||
- **Long-to-Short Rewriting**: Extracts key reasoning steps from DeepSeek-R1
|
||||
- **Teacher Model Distillation**: Captures the rapid reasoning trajectories of DeepSeekV3-0324
|
||||
|
||||
- **阶段二:CoT轨迹认知对齐**
|
||||
- **动态难度分级**(简单/中等/困难)
|
||||
- LLM-as-a-Judge评估小模型可理解性
|
||||
- 简单链扩展 → 补充必要步骤
|
||||
- 困难链精简 → 移除高阶逻辑跳跃
|
||||
- **验证机制**:迭代优化直至所有数据达"中等"评级
|
||||
- **Stage 2: CoT Trajectory Cognitive Alignment**
|
||||
- **Dynamic Difficulty Grading** (Easy/Medium/Hard)
|
||||
- LLM-as-a-Judge evaluates small model comprehensibility
|
||||
- Simple chain expansion → Adds necessary steps
|
||||
- Hard chain simplification → Removes high-level logical leaps
|
||||
- **Validation Mechanism**: Iterative optimization until all data reaches "Medium" rating
|
||||
|
||||
### 2. 性能突破
|
||||
- **32B模型**在GPQA Diamond基准接近10倍参数量的闭源模型
|
||||
- **推理效率**显著提升(见下表对比)
|
||||
### 2. Performance Breakthroughs
|
||||
- **32B Model** approaches the performance of closed-source models with 10x the parameters on the GPQA Diamond benchmark
|
||||
- **Significant Improvement in Reasoning Efficiency** (see comparison table below)
|
||||
|
||||
| 模型 | MMLU_PRO Tokens | AIME2024 Tokens | 速度增益 |
|
||||
|--------------------------------|-----------------|-----------------|----------|
|
||||
| DistilQwen2.5-R1-32B (慢思考) | 4198 | 12178 | 1x |
|
||||
| DistilQwen2.5-DS3-0324-32B | 690 | 4177 | 5-8x |
|
||||
| Model | MMLU_PRO Tokens | AIME2024 Tokens | Speed Gain |
|
||||
|--------------------------------|-----------------|-----------------|------------|
|
||||
| DistilQwen2.5-R1-32B (Slow-Thinking) | 4198 | 12178 | 1x |
|
||||
| DistilQwen2.5-DS3-0324-32B | 690 | 4177 | 5-8x |
|
||||
|
||||
## 技术优势
|
||||
- **双阶段蒸馏**:先压缩推理长度,再对齐认知轨迹
|
||||
- **动态数据优化**:自适应难度调整确保知识可迁移性
|
||||
- **开源兼容**:基于Qwen2.5基座模型微调
|
||||
## Technical Advantages
|
||||
- **Two-Stage Distillation**: First compresses reasoning length, then aligns cognitive trajectories
|
||||
- **Dynamic Data Optimization**: Adaptive difficulty adjustment ensures knowledge transferability
|
||||
- **Open-Source Compatibility**: Fine-tuned based on the Qwen2.5 base model
|
||||
|
||||
## 🚀 快速开始
|
||||
## 🚀 Quick Start
|
||||
|
||||
```python
|
||||
from modelscope import AutoModelForCausalLM, AutoTokenizer
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
device = "cuda" # the device to load the model onto
|
||||
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
"PAI/DistilQwen2.5-DS3-0324-7B",
|
||||
"alibaba-pai/DistilQwen2.5-DS3-0324-7B",
|
||||
torch_dtype="auto",
|
||||
device_map="auto"
|
||||
)
|
||||
tokenizer = AutoTokenizer.from_pretrained("PAI/DistilQwen2.5-DS3-0324-7B")
|
||||
tokenizer = AutoTokenizer.from_pretrained("alibaba-pai/DistilQwen2.5-DS3-0324-7B")
|
||||
|
||||
prompt = "Give me a short introduction to large language model."
|
||||
messages=[
|
||||
@@ -72,4 +73,5 @@ generated_ids = [
|
||||
]
|
||||
|
||||
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user