Rimon-Math-3B-V1 is a specialized 3-billion-parameter causal language model, fine-tuned for high-accuracy mathematical reasoning and logical problem-solving. Built on the Llama-3.2-3B-Instruct architecture and optimized using the Unsloth framework, this model excels at generating structured, step-by-step solutions (Chain-of-Thought).
Highlights
Reasoning Focused: Trained specifically to break down complex problems into logical steps.
Lightweight & Efficient: Optimized for consumer-grade GPUs (T4, RTX 3060+) and edge deployment.
High Compatibility: Works seamlessly with transformers, vLLM, and supports GGUF conversion for local use.
Model Capabilities
The model is fine-tuned to handle various mathematical domains:
Algebra: Solving equations, inequalities, and system of equations.
Calculus: Derivatives, integrals, and limit problems.
Geometry & Trigonometry: Properties of shapes and trigonometric identities.
Logic & Arithmetic: Multi-step word problems and sequence analysis.
Training Metrics (Approximation)
Epoch
Step
Training Loss
Validation Loss
LR
1.0
1000
0.7104
0.6952
1.5e-4
2.0
2000
0.5911
0.5843
5.0e-5
3.0
3000
0.5244
0.5102
1.0e-5
Usage Guide
Installation & Dependencies
To run Rimon-Math-3B-V1 efficiently, ensure you have the latest versions of the following libraries installed. Run this command in your terminal or a notebook cell:
Once the model is loaded, you can solve math problems using the standard Llama 3.2 chat template.
python
1# Define your math problem2messages =[3{"role":"system","content":"You are a specialized math tutor. Explain step-by-step."},4{"role":"user","content":"If x + 1/x = 3, find the value of x^5 + 1/x^5."}5]67# Apply the chat template8inputs = tokenizer.apply_chat_template(9 messages,10 add_generation_prompt=True,11 return_tensors="pt"12).to(model.device)1314# Generate the response15outputs = model.generate(16**inputs,17 max_new_tokens=1024,18 temperature=0.1,# Low temperature is crucial for math accuracy19 do_sample=True,20 pad_token_id=tokenizer.eos_token_id
21)2223print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Troubleshooting Guide
GPU Memory Error (OOM):
If you get an "Out of Memory" error, restart your runtime and use Option 1 (4-bit).
BitsAndBytes Issues:
If load_in_4bit fails, ensure you are running on a Linux-based environment (or WSL2 on Windows) and that your bitsandbytes is up to date:
pip install -U bitsandbytes
CUDA Mismatch:
If you encounter a runtime error regarding CUDA versions, reinstall PyTorch with the correct index URL:
Use a system prompt to control reasoning style Keep temperature between 0.1 – 0.3 for math tasks Always request step-by-step explanation Avoid ambiguous wording in problems
Author
Rimon Dutta
DevOps Engineer | AI & ML Learner
Kotwali, Bangladesh