Downloads · 30 days
0
shalhamucha/Qwen2.5-3B-Instruct-Reasoning-for-math
Qwen2.5-3B-Instruct-Reasoning-for-math is a machine learning model from shalhamucha. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
[](https://huggingface.co/shalhamucha/Qwen2.5-3B-Instruct-Reasoning-for-math) [](https://opensource.org/licenses/Apache-2.0)
Downloads · 30 days
0
Access
Public
Updated Sep 27, 2025
Repo size
240 MB
Likes
1
Public
Click a slice to open those files.
.safetensors240 MB · 100%
From the Hugging Face model README
Qwen2.5-3B-Instruct-Reasoning-for-math is a fine-tuned version of Qwen2.5-3B-Instruct, specialized for mathematical reasoning in both Bangla 🇧🇩 and English 🇬🇧.
This model has been fine-tuned using Group Relative Policy Optimization (GRPO) to generate structured step-by-step reasoning chains, ideal for math education, automated tutoring, and reasoning-based chat systems.
| Property | Value |
|---|---|
| 🧠 Base Model | Qwen2.5-3B-Instruct |
| 🧰 Fine-tuning Method | GRPO (Reinforcement Learning) + LoRA |
| 🌐 Languages | Bangla 🇧🇩, English 🇬🇧 |
| 🧮 Domain | Mathematical reasoning & structured problem solving |
| 🧱 Context Length | 1024 tokens |
| 🧠 Quantization | 4-bit QLoRA |
| 📄 License | Apache 2.0 |
| 🚀 Best Use Case | Low-resource educational tools, reasoning agents, math chatbots |
This model is designed for practical applications in education, research, and language technologies:
🧮 Bangla & English Math Tutoring
🤖 Educational Chatbots
📚 Reasoning Benchmarking & RL Research
<reasoning>...</reasoning>).🧠 Math Reasoning Agents
<reasoning> and <answer> tagsYou can use this model with 🤗 Transformers in just a few lines:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "shalhamucha/Qwen2.5-3B-Instruct-Reasoning-for-math"
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto",
)
# Bangla example
prompt = tokenizer.apply_chat_template([
{"role": "system", "content": "তুমি একটি সহায়ক গাণিতিক টিউটর। ধাপে ধাপে ব্যাখ্যা করো।"},
{"role": "user", "content": "মারির কাছে ৩টা আপেল আছে। সে আরো ২টা কিনলো। মোট কত আপেল?"},
], tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
top_p=0.95,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
If you use this model in your research or application, please cite:
@misc{QwenMathReasoning2025,
author = {Shalha Mucha Bhuyan},
title = {Qwen2.5-3B-Instruct-Reasoning-for-math},
year = {2025},
howpublished = {\url{https://huggingface.co/shalhamucha/Qwen2.5-3B-Instruct-Reasoning-for-math}}
}