Downloads · 30 days
18
6% of all-time downloads
CanisAI/teach-math-qwen3-4b-2507-r1
teach-math-qwen3-4b-2507-r1 is a text generation model from CanisAI. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapters for the Math tutor in the Canis.teach suite.
Downloads · 30 days
18
6% of all-time downloads
All-time downloads
302
Public
Repo size
144 MB
Likes
0
Public
Click a slice to open those files.
.safetensors132 MB · 89%
From the Hugging Face model README
LoRA adapters for the Math tutor in the Canis.teach suite.
This repository provides LoRA adapters fine-tuned on Math tutoring dialogues. Apply these adapters to the base model to enable subject-aware, didactic behavior without downloading a full merged checkpoint.
The model is designed to teach, not just answer - providing step-by-step explanations, hints, and pedagogically structured responses.
For ready-to-run merged models or Ollama-friendly GGUF quantizations, see the "Related Models" section.
pip install transformers peft torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "CanisAI/teach-math-qwen3-4b-2507-r1"
tokenizer = AutoTokenizer.from_pretrained(base, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
base,
device_map="auto",
torch_dtype="auto"
)
model = PeftModel.from_pretrained(model, adapter)
# Example prompt
prompt = "Explain how to solve 2x + 1 = 5 step by step."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
top_p=0.8,
top_k=20,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model is optimized for:
For optimal tutoring behavior:
Important Considerations:
| Type | Repository | Description |
|---|---|---|
| LoRA Adapters | CanisAI/teach-math-qwen3-4b-2507-r1 | This repository (lightweight) |
| Merged Model | (Coming Soon) | Ready-to-use full model |
| GGUF Quantized | (Coming Soon) | Ollama/llama.cpp compatible |
| Dataset | CanisAI/teach-math-dataset | Training data |
This model inherits the license from the base model (Qwen/Qwen3-4B-Instruct-2507). Please review the base model's license terms before use.
@misc{canis-teach-math,
title={Canis.teach Math Tutor},
author={CanisAI},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/CanisAI/teach-math-qwen3-4b-2507-r1}}
}
Canis.teach - Learning that fits.