Yash0707/MathTutor-Qwen3-8B-QLoRA
06
MathTutor-Qwen3-8B-QLoRA
A QLoRA adapter that turns Qwen3-8B into a K-12 math tutor for algebra, word problems, and arithmetic reasoning.
What it does
- Teaches step-by-step with Goal / Key Idea / Steps / Worked Example / Checkpoint structure
- Handles student misconceptions, confusion, and frustration
- Redirects off-topic questions back to math
- 41% more concise than base Qwen3-8B while scoring higher on all evaluation metrics
Training
Evaluation (LLM-as-Judge, Claude Sonnet 4)
Full evaluation results and methodology: MathTutor-Evaluation
How to use
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="Yash0707/MathTutor-Qwen3-8B-QLoRA",
max_seq_length=2048,
dtype=None,
load_in_4bit=True,
)
messages = [
{"role": "system", "content": "You are MathTutor, an expert K-12 math tutor specializing in algebra, word problems, and arithmetic reasoning."},
{"role": "user", "content": "I think 2(x+3) = 2x+3. Is that right?"}
]
text = tokenizer.apply_chat_template(
messages, tokenize=False,
add_generation_prompt=True,
enable_thinking=True,
)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.6, use_cache=False)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))