Model Summary
Qwen2.5-0.5B-Hendrycks-Math is a fully fine-tuned version of Qwen2.5-0.5B, specialized for solving High School-level mathematics problems. The model is purpose-built for low-RAM and CPU-only environments, making it practical to deploy on edge devices, low-end laptops, and resource-constrained servers where larger math-reasoning LLMs are impractical to run.
Despite its small 0.5B parameter footprint, the model is trained on a curated blend of high-quality mathematical reasoning datasets to maximize accuracy on grade-school and high-school level arithmetic, algebra, and word problems.
| Developed by | Sujal Wagholikar |
| Base model | Qwen/Qwen2.5-0.5B |
| Model type | Causal decoder-only language model (fully fine-tuned) |
| Language | English |
| License | Apache 2.0 |
| Target use case | High School grade math problem solving |
| Target hardware | CPU / low-RAM devices |
| Training hardware | TPU v5e-4 |
| Fine-tuning method | Full fine-tuning (all parameters updated) |
Intended Use
This model is designed for:
- Solving high school-level math word problems and arithmetic/algebra questions
- Step-by-step reasoning (chain-of-thought style) for math problem solving
- On-device / offline math tutoring assistants
- Lightweight educational tools where GPU access is unavailable
- Research on small language models (SLMs) for domain-specific reasoning
Out-of-Scope Use
- Advanced/graduate-level mathematics (e.g., real analysis, abstract algebra) — not a primary training focus
- Non-math general-purpose conversation (capability inherited from base model may degrade after fine-tuning)
- High-stakes, safety-critical, or graded academic assessment without human verification
- Any use case prohibited under the Apache 2.0 license or applicable law
Training Data
The model was fine-tuned on a combined corpus of well-established mathematical reasoning datasets:
| Dataset | Description |
|---|---|
| GSM8K | Grade-school math word problems requiring multi-step reasoning |
| OpenOrca-Math-200K | 200K curated math reasoning samples derived from the OpenOrca pipeline |
| NuminaMath | Large-scale competition and curated math problem-solution dataset |
| Hendrycks MATH | Challenging math problems spanning multiple difficulty levels and subjects |
This blend was selected to cover a broad range of problem phrasing, difficulty levels, and step-by-step solution styles typical of high-school mathematics curricula.
Training Details
- Base model: Qwen2.5-0.5B
- Fine-tuning strategy: Full fine-tuning (not LoRA/PEFT) — all model weights were updated
- Hardware: TPU v5e-4 pod slice
- Objective: Supervised fine-tuning (SFT) on question → step-by-step solution pairs
- Focus domain: High school grade mathematics (arithmetic, algebra, word problems, basic geometry)
Note: Exact hyperparameters (learning rate, batch size, epochs, sequence length) can be added here once finalized for full reproducibility.
How to Use
Installation
pip install transformers accelerate torch
Inference (CPU-friendly)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Sujal-Wagholikar/Qwen2.5-0.5B-Hendrycks-Math" # update with actual repo path
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="cpu")
prompt = "A store sells apples for $2 each. If Sarah buys 7 apples and pays with a $20 bill, how much change does she get?"
messages = [
{"role": "user", "content": prompt}
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(
inputs,
max_new_tokens=256,
temperature=0.3,
do_sample=True,
top_p=0.9
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Recommended Generation Settings
| Parameter | Recommended Value | Notes |
|---|---|---|
temperature | 0.2 – 0.4 | Lower values improve math accuracy and reduce hallucinated steps |
top_p | 0.9 | |
max_new_tokens | 256 – 512 | Depending on problem complexity |
repetition_penalty | 1.1 | Helps avoid repeated reasoning loops |
Why This Model?
- ✅ Small footprint (0.5B params) — runs comfortably on CPU-only machines and devices with limited RAM
- ✅ Focused training — fine-tuned specifically on math reasoning data rather than general-purpose chat
- ✅ Multi-dataset coverage — blends grade-school, competition-style, and curated reasoning datasets for broader generalization
- ✅ Open license — Apache 2.0 allows commercial and research use with minimal restriction
- ✅ Edge-deployment ready — ideal for offline tutoring apps, embedded educational tools, and low-resource institutions
Limitations
- As a 0.5B parameter model, reasoning capability is inherently limited compared to larger LLMs (7B+) — expect occasional arithmetic slips on multi-step or ambiguous problems.
- Performance on math domains outside the training distribution (e.g., calculus, advanced geometry proofs) is not guaranteed.
- Full fine-tuning may have reduced some general conversational ability present in the base Qwen2.5-0.5B model.
- Outputs should be verified before use in formal educational grading or assessment contexts.
- No formal benchmark numbers are published yet in this card — see Evaluation below.
Evaluation
| Benchmark | Score |
|---|---|
| GSM8K (test) | TBD |
| Hendrycks MATH (test) | TBD |
| NuminaMath (held-out) | TBD |
Add your evaluation results here (accuracy / exact-match / pass@1) once benchmarking is complete. This section significantly increases model card credibility and discoverability.
Environmental Impact
Training was performed on a TPU v5e-4 slice. Compared to large-scale LLM training, the compute footprint for fine-tuning a 0.5B model is minimal. Precise CO₂ estimates can be added here using tools like the ML CO2 Impact Calculator if exact training duration/power data is available.
Citation
If you use this model in your work, please cite:
@misc{qwen25-05b-hendrycks-math,
author = {sujalw},
title = {Qwen2.5-0.5B-Math: A Lightweight High School Math Reasoning Model},
year = {2026},
howpublished = {\url{https://huggingface.co/Sujal-Wagholikar/Qwen2.5-0.5B-Hendrycks-Math}},
note = {Fine-tuned from Qwen2.5-0.5B on GSM8K, OpenOrca-Math-200K, NuminaMath, and Hendrycks MATH}
}
Acknowledgements
- Qwen Team (Alibaba) for the base Qwen2.5-0.5B model
- Creators of the GSM8K, OpenOrca-Math-200K, NuminaMath, and Hendrycks MATH datasets
- Google Cloud TPU v5e for training compute
License
This model is released under the Apache License 2.0. See LICENSE for full terms.
Author
Sujal Santosh Wagholikar Model creator and maintainer