Qwen2.5-1.5B-Instruct Fine-Tuned on GSM8K with DeepSeek Augmentation
🚀 Model Overview
This model is a fine-tuned version of Qwen2.5-1.5B-Instruct, optimized for mathematical problem-solving with step-by-step reasoning. It was trained on the GSM8K dataset, incorporating Chain-of-Thought (CoT) reasoning using DeepSeek augmentation.
The model is designed to provide logical, structured, and interpretable answers, making it ideal for applications in education, tutoring, and automated reasoning.
You can load and use the model with 🤗 transformers as follows:
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
34# Load model and tokenizer5model_name ="your-repo-id"6tokenizer = AutoTokenizer.from_pretrained(model_name)7model = AutoModelForCausalLM.from_pretrained(model_name)89# Move model to GPU if available10device ="cuda"if torch.cuda.is_available()else"cpu"11model.to(device)1213# Example inference14question ="Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?"15inputs = tokenizer(question, return_tensors="pt").to(device)16output = model.generate(**inputs, max_length=200)1718# Decode response19print(tokenizer.decode(output[0], skip_special_tokens=True))
🖥️ Running the Model with llama.cpp (Mac/Linux/Windows)
The model is quantized into GGUF format and can run on Mac without a GPU using llama.cpp.
1️⃣ Install llama.cpp
brew install llama.cpp
2️⃣ Download the Model
sh
1mkdir -p ~/llama_models && cd ~/llama_models
2wget https://huggingface.co/your-repo-id/resolve/main/q8_0.gguf
LoRA (Low-Rank Adaptation) applied to QKV projections
Learning Rate:1e-6
AdamW Optimizer (8-bit)
Mixed Precision (bf16 or fp16)
Batch Size:8
Gradient Accumulation Steps:1
Max Sequence Length:1024
📊 Model Performance
✅ Training Loss
Step
Training Loss
Reward
KL
1
0.0000
0.0000
0.0000
500
0.0033
0.2617
0.0821
1000
0.0028
0.1359
0.0696
1500
0.0062
1.3781
0.1559
🧪 Testing & Expected Results
The model was evaluated on the 1K test samples and showed strong accuracy in multi-step problem-solving.
Example expected response:
text
1To solve the problem, we first find the clips sold in May:
2 Clips in May = 48 / 2 = 24
3Next, we find the total:
4 Total Clips = 48 + 24 = 72
5#### Answer: 72
🚨 Bias, Risks, and Limitations
⚠️ Potential Risks
May hallucinate incorrect reasoning steps if prompts are unclear.
Could struggle with complex mathematical problems outside its training data.
Limited generalization to non-math reasoning tasks.
🎯 Recommendations
If using this model for critical applications, verify outputs with human review.
For better performance, fine-tune on larger datasets with real-world numerical reasoning.