Downloads · 30 days
45
35% of all-time downloads
rudrakshrakeshzodage/Math-v1
Math-v1 is a text generation model from rudrakshrakeshzodage. Use it when you need the model to write or continue text. It is set up for unsloth. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/gemma-3-1b-it optimized for mathematical reasoning and step-by-step problem solving. It was trained on the unsloth/OpenMathReasoning-mini dataset using Unsloth Studio for a…
Downloads · 30 days
45
35% of all-time downloads
All-time downloads
130
Public
Repo size
806 MB
Likes
0
Public
Click a slice to open those files.
.gguf806 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/gemma-3-1b-it optimized for mathematical reasoning and step-by-step problem solving. It was trained on the unsloth/OpenMathReasoning-mini dataset using Unsloth Studio for accelerated performance and memory efficiency.
google/gemma-3-1b-itunsloth/OpenMathReasoning-miniThe model was trained on the OpenMathReasoning-mini dataset. This dataset is a curated collection of high-quality mathematical problems and detailed, step-by-step chain-of-thought (CoT) reasoning paths. It is designed to teach models how to structure their logical thinking and execute mathematical operations accurately rather than simply memorizing answers.
The model was fine-tuned using the following settings:
| Parameter | Value |
|---|---|
| Epochs | 0 (Step-based training) |
| Max Steps | 30 |
| Batch Size | 2 |
| Learning Rate | 2e-4 (0.0002) |
| Warmup Steps | 5 |
| Optimizer | AdamW 8-bit |
| Context Length | 2048 |
| LoRA Rank (R) | 16 |
| LoRA Alpha | 16 |
| LoRA Dropout | 0.0 |
| LoRA Variant | Standard LoRA |
Thanks to Unsloth's optimized CUDA kernels, training achieved the following efficiency metrics:
Use the exported GGUF model (gemma-3-1b-it.Q4_K_M.gguf) with llama-server to launch a local Web UI chat client:
llama-server -m gemma-3-1b-it.Q4_K_M.gguf -c 2048 --port 8080 --ngl 99
Then open http://localhost:8080 in your web browser.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_name = "google/gemma-3-1b-it"
adapter_id = "rudrakshrakeshzodage/Math-v1"
# Load base model in float16
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, adapter_id)
# Inference Example
messages = [
{"role": "user", "content": "Solve for x: 3x + 5 = 20. Show step-by-step reasoning."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.3)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Please note that this model is intended for educational, personal, and research purposes. Standard safety and alignment filtering from the base google/gemma-3-1b-it model are preserved. Outputs should be verified for mathematical correctness as LLMs may occasionally exhibit calculation errors.