Downloads · 30 days
0
DexterSptizu/qwen2.5-3b-reasoning-qlora
qwen2.5-3b-reasoning-qlora is a text generation model from DexterSptizu. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains the fine-tuned weights for Qwen/Qwen2.5-3B-Instruct trained to produce explicit step-by-step <think...</think Chain-of-Thought (CoT) reasoning.
Downloads · 30 days
0
Access
Public
Updated Aug 1, 2026
Repo size
131 MB
Likes
0
Public
Click a slice to open those files.
.safetensors120 MB · 91%
From the Hugging Face model README
This repository contains the fine-tuned weights for Qwen/Qwen2.5-3B-Instruct trained to produce explicit step-by-step <think>...</think> Chain-of-Thought (CoT) reasoning.
Qwen/Qwen2.5-3B-InstructFreedomIntelligence/medical-o1-reasoning-SFT (10,000 instructions)| Metric / Feature | Benchmark Score |
|---|---|
CoT Reasoning Tag Rate (<think>) | 50.0% |
| Holdout Benchmark Accuracy | 100.0% |
| Training Duration | 19.13 minutes |
| Final Epoch Loss | 1.449 |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-3B-Instruct"
adapter_model_id = "DexterSptizu/qwen2.5-3b-reasoning-qlora"
# Load base model & tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Attach fine-tuned reasoning adapter
model = PeftModel.from_pretrained(base_model, adapter_model_id)
# Inference Example
prompt = "<|im_start|>system\nYou are a helpful reasoning assistant.<|im_end|>\n<|im_start|>user\nSolve step by step: What is 15 * 24?<|im_end|>\n<|im_start|>assistant\n<think>\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))