Reasoning Saturations🫙
Collection
7B, 14B [ Saturation ]
•
6 items
•
Updated
•
7
Qwen-7B-Distill-Reasoner is based on the Qwen [ KT ] model, which was distilled by DeepSeek-AI/DeepSeek-R1-Distill-Qwen-7B. It has been fine-tuned on the long chain-of-thought reasoning model and specialized datasets, focusing on chain-of-thought (CoT) reasoning for problem-solving. This model is optimized for tasks requiring logical reasoning, detailed explanations, and multi-step problem-solving, making it ideal for applications such as instruction-following, text generation, and complex reasoning tasks.
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
model_name = "prithivMLmods/Qwen-7B-Distill-Reasoner"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
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."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
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]
Detailed results can be found here! Summarized results can be found here!
Metric | Value (%) |
---|---|
Average | 18.43 |
IFEval (0-Shot) | 33.96 |
BBH (3-Shot) | 22.18 |
MATH Lvl 5 (4-Shot) | 21.15 |
GPQA (0-shot) | 10.29 |
MuSR (0-shot) | 2.78 |
MMLU-PRO (5-shot) | 20.20 |
Base model
deepseek-ai/DeepSeek-R1-Distill-Qwen-7B