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.

πŸ”Ή Key Features

  • Base Model: Qwen/Qwen2.5-1.5B-Instruct
  • Fine-Tuned On: eagle0504/openai-gsm8k-enhanced-using-together-ai-deepseek-train8k-test1k-v1
  • Optimized for: Mathematical problem-solving & step-by-step logical reasoning
  • Fine-tuned with: LoRA (Low-Rank Adaptation) for efficient memory usage
  • Inference-ready: Available on πŸ€— Hugging Face and compatible with llama.cpp
  • Supports GGUF: Optimized versions for Q4_K_M, Q8_0, Q5_K_M, and FP16

πŸ“‚ Model Details

  • Developed by: [Your Name or Organization]
  • Model Type: Causal Language Model (Text Generation)
  • Languages: English (en)
  • License: MIT License
  • Fine-tuned from: Qwen/Qwen2.5-1.5B-Instruct
  • Training Library: transformers + unsloth + trl
  • Quantization: GGUF (Q4_K_M, Q8_0, Q5_K_M, f16)

πŸ”— Hugging Face Repository:
πŸ‘‰ Fine-tuned Qwen2.5-1.5B-Instruct


πŸ›  How to Use the Model

Using transformers in Python

You can load and use the model with πŸ€— transformers as follows:

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

# Load model and tokenizer
model_name = "your-repo-id"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# Move model to GPU if available
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)

# Example inference
question = "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?"
inputs = tokenizer(question, return_tensors="pt").to(device)
output = model.generate(**inputs, max_length=200)

# Decode response
print(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

mkdir -p ~/llama_models && cd ~/llama_models
wget https://huggingface.co/your-repo-id/resolve/main/q8_0.gguf

3️⃣ Run the Model

llama-cli -m ~/llama_models/q8_0.gguf --interactive

Or you can use the following

llama-cli -hf eagle0504/qwen-2_5-1_5b-instruct-using-openai-gsm8k-data-enhanced-with-deepseek-v4:Q8_0

4️⃣ Test with a Prompt

llama-cli -m ~/llama_models/q8_0.gguf -p "Explain quantum computing in simple terms."

πŸ‹οΈ Training Details

πŸ“Š Dataset Used

The model was fine-tuned on:
πŸ”Ή eagle0504/openai-gsm8k-enhanced-using-together-ai-deepseek-train8k-test1k-v1

This dataset contains:

  • 8K training samples
  • 1K testing samples
  • Features: "question", "answer", "cot" (Chain-of-Thought)

βš™οΈ Training Configuration

  • Framework: transformers + unsloth + trl
  • Optimization:
    • 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:

To solve the problem, we first find the clips sold in May:
  Clips in May = 48 / 2 = 24
Next, we find the total:
  Total Clips = 48 + 24 = 72
#### 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.

🌍 Environmental Impact

Estimated Carbon Emissions:

  • Hardware Used: NVIDIA A100 GPU
  • Training Time: ~5 hours
  • Estimated CO2 Emitted: ~8.2 kg CO2eq (via ML Impact Calculator)

πŸ“– Citation

If you use this model in your research, please cite it as:

@misc{your_model_2024,
  title={Fine-Tuned Qwen2.5-1.5B-Instruct on GSM8K with DeepSeek Augmentation},
  author={Your Name},
  year={2024},
  url={https://huggingface.co/your-repo-id}
}

πŸ“© Model Card Contact

For questions, suggestions, or issues, reach out via Hugging Face Discussions.


πŸŽ‰ Thank you for using this model! If you find it useful, please ⭐ it on Hugging Face! πŸš€πŸ”₯

Downloads last month
32
Safetensors
Model size
1.54B params
Tensor type
FP16
Β·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no pipeline_tag.

Model tree for eagle0504/qwen-2_5-1_5b-instruct-using-openai-gsm8k-data-enhanced-with-deepseek-v4

Base model

Qwen/Qwen2.5-1.5B
Quantized
(74)
this model

Dataset used to train eagle0504/qwen-2_5-1_5b-instruct-using-openai-gsm8k-data-enhanced-with-deepseek-v4