---
title: DistilQwen2.5-DS3-0324-7B
canonical_url: "https://www.modelscope.cn/models/PAI/DistilQwen2.5-DS3-0324-7B"
md_url: "https://www.modelscope.cn/models/PAI/DistilQwen2.5-DS3-0324-7B.md"
repository: PAI/DistilQwen2.5-DS3-0324-7B
last_updated: 2025-04-24
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
parameters: 7.6B
tensor_type:
  - F32
library_name:
  - transformer
  - safetensors
  - pytorch
frameworks:
  - Pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 733
stars: 0
---

# DistilQwen2.5-DS3-0324-7B

> DistilQwen2.5-DS3-0324-7B - PAI 在 ModelScope 开源的模型。DistilQwen2.5-DS3-0324 Series: Fast-Thinking Reasoning Models

PAI/DistilQwen2.5-DS3-0324-7B 是 ModelScope 魔搭社区上的 7.6B 参数text-generation模型，采用 apache-2.0 许可，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: PAI/DistilQwen2.5-DS3-0324-7B
- **License**: apache-2.0
- **Tasks**: text-generation
- **Parameters**: 7.6B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 733
- **Stars**: 0
- **Last updated**: 2025-04-24

Source: https://www.modelscope.cn/models/PAI/DistilQwen2.5-DS3-0324-7B

---

## 📖 Introduction

# DistilQwen2.5-DS3-0324 Series: Fast-Thinking Reasoning Models

## 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

## 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

- **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. 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)

| 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       |

## 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 transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto

model = AutoModelForCausalLM.from_pretrained(
    "alibaba-pai/DistilQwen2.5-DS3-0324-7B",
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("alibaba-pai/DistilQwen2.5-DS3-0324-7B")

prompt = "Give me a short introduction to large language model."
messages=[
    {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant. You should think step-by-step."},
    {"role": "user", "content": prompt},
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)

generated_ids = model.generate(
    model_inputs.input_ids,
    max_new_tokens=2048，
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]

```
