Canis.teach β Qwen3β4B Instruct (Math) β Merged
Merged full model (LoRA adapters applied to the base), ready for direct use with Transformers.
- Base: Qwen/Qwen3-4B-Instruct-2507
- Release: CanisAI/teach-math-qwen3-4b-2507-r1-merged
- Project: Canis.teach, Learning that fits.
- Tags: canis-teach, qwen3, education, lora-merged, transformers
What is this?
This repository contains a merged checkpoint: the LoRA adapters fineβtuned on Math tutoring dialogues have been merged into the base model (Qwen/Qwen3β4BβInstructβ2507). This allows you to load and run the model directly with Transformers (no PEFT merge step at runtime).
For lightweight adapters or Ollama-friendly quantized builds, see the βRelatedβ section.
Quick usage (Transformers)
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "CanisAI/teach-math-qwen3-4b-2507-r1-merged"
tok = AutoTokenizer.from_pretrained(repo, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
repo,
device_map="auto",
torch_dtype="auto"
)
prompt = "Explain how to solve 2x + 1 = 5 step by step."
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, temperature=0.7, top_p=0.8, top_k=20)
print(tok.decode(out[0], skip_special_tokens=True))
Recommended decoding (for instruct-style usage):
- temperature β 0.7
- top_p β 0.8
- top_k β 20 Adjust to your needs.
Intended use
- Subjectβaware tutoring for Math with didactic, stepβbyβstep responses.
- Suitable for educational prototypes, demonstrations, and research.
- Built to βteach, not just answerβ: stepwise hints, clarity, and rubricβaligned structure.
Safety and limitations
- Human oversight is required. The model may hallucinate or oversimplify.
- For factβheavy tasks, consider RetrievalβAugmented Generation (RAG) with curriculum sources.
- Follow data privacy and compliance rules in your environment (e.g., school policies).
Training summary
- Base model: Qwen/Qwen3-4B-Instruct-2507
- Method: Supervised fineβtuning with LoRA (Unsloth + TRL/PEFT), then merged to full weights
- Data: Subjectβspecific tutoring dialogues generated/curated via Canis.lab
- Goal: Improve clarity, hints, and step-by-step pedagogy for Math
Note: Exact hyperparameters and logs are provided in the LoRA training pipeline (if published) or available on request.
Related
- LoRA adapters (lightweight):
- CanisAI/teach-math-qwen3-4b-2507-r1
- Quantized GGUF for Ollama/llama.cpp:
- CanisAI/teach-math-qwen3-4b-2507-r1-gguf
- Base model:
- Qwen/Qwen3-4B-Instruct-2507
License
- Inherits the base modelβs license. Review the base model terms before use.
- Dataset licensing and any thirdβparty assets should be respected accordingly.
Acknowledgments
- Qwen3 by Qwen team
- Unsloth, TRL, PEFT, and Transformers for training/serving
- Educators and contributors supporting Canis.teach
Learning that fits.
- Downloads last month
- -
Model tree for CanisAI/teach-math-qwen3-4b-2507-r1-merged
Merge model
this model