alibaba-pai / DistilQwen2.5-3B-Instruct

huggingface.co
Total runs: 29
24-hour runs: 0
7-day runs: -77
30-day runs: -71
Model's Last Updated: May 24 2025

Introduction of DistilQwen2.5-3B-Instruct

Model Details of DistilQwen2.5-3B-Instruct

📖 Introduction

DistilQwen2.5-3B is a distilled version of Qwen2.5-3B-Instruct , designed to distill the capabilities of stronger LLMs into smaller ones. To achieve this, we utilized a diverse range of datasets for the distillation process, including well-known open-source collections such as Magpie, Openhermes, and Mammoth 2, as well as proprietary synthetic datasets.

The training data primarily consists of instructions in Chinese and English. To enhance the quality and diversity of the instruction data, we implemented a difficulty scoring system and task-related resampling techniques.

For difficulty scoring, we employed the LLM-as-a-Judge paradigm, using the teacher model to evaluate responses based on accuracy, relevance, helpfulness, and level of detail. We then calculated the Model Fitting Difficulty (MFD) Score by subtracting the teacher model's score from the student model's score. A higher MFD Score indicates that the instruction is more valuable for distillation training. This approach allowed us to remove low-difficulty instructions from the training set, focusing on more challenging and informative examples.

After performing black-box data distillation on the model, we further conducted white-box distillation (teacher model logits distillation). Black-box knowledge distillation relies solely on the highest probability token output by the teacher model, while white-box knowledge distillation focuses more on the distribution of logits output by the teacher model, thereby providing richer information for the student model. By mimicking the logits distribution of the teacher model, white-box distillation can transfer knowledge more effectively, further enhancing the performance of the student model.

This careful curation and scoring process ensures that DistilQwen2.5-3B achieves high performance after the distillation process.

🚀 Quick Start

Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.

from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto

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

prompt = "Give me a short introduction to large language model."
messages = [
    {"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]

Runs of alibaba-pai DistilQwen2.5-3B-Instruct on huggingface.co

29
Total runs
0
24-hour runs
-1
3-day runs
-77
7-day runs
-71
30-day runs

More Information About DistilQwen2.5-3B-Instruct huggingface.co Model

DistilQwen2.5-3B-Instruct huggingface.co

DistilQwen2.5-3B-Instruct huggingface.co is an AI model on huggingface.co that provides DistilQwen2.5-3B-Instruct's model effect (), which can be used instantly with this alibaba-pai DistilQwen2.5-3B-Instruct model. huggingface.co supports a free trial of the DistilQwen2.5-3B-Instruct model, and also provides paid use of the DistilQwen2.5-3B-Instruct. Support call DistilQwen2.5-3B-Instruct model through api, including Node.js, Python, http.

DistilQwen2.5-3B-Instruct huggingface.co Url

https://huggingface.co/alibaba-pai/DistilQwen2.5-3B-Instruct

alibaba-pai DistilQwen2.5-3B-Instruct online free

DistilQwen2.5-3B-Instruct huggingface.co is an online trial and call api platform, which integrates DistilQwen2.5-3B-Instruct's modeling effects, including api services, and provides a free online trial of DistilQwen2.5-3B-Instruct, you can try DistilQwen2.5-3B-Instruct online for free by clicking the link below.

alibaba-pai DistilQwen2.5-3B-Instruct online free url in huggingface.co:

https://huggingface.co/alibaba-pai/DistilQwen2.5-3B-Instruct

DistilQwen2.5-3B-Instruct install

DistilQwen2.5-3B-Instruct is an open source model from GitHub that offers a free installation service, and any user can find DistilQwen2.5-3B-Instruct on GitHub to install. At the same time, huggingface.co provides the effect of DistilQwen2.5-3B-Instruct install, users can directly use DistilQwen2.5-3B-Instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

DistilQwen2.5-3B-Instruct install url in huggingface.co:

https://huggingface.co/alibaba-pai/DistilQwen2.5-3B-Instruct

Url of DistilQwen2.5-3B-Instruct

DistilQwen2.5-3B-Instruct huggingface.co Url

Provider of DistilQwen2.5-3B-Instruct huggingface.co

alibaba-pai
ORGANIZATIONS

Other API from alibaba-pai