Downloads · 30 days
0
CanisAI/teach-math-qwen3-4b-2507-r1-merged
teach-math-qwen3-4b-2507-r1-merged 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.
Merged full model (LoRA adapters applied to the base), ready for direct use with Transformers.
Downloads · 30 days
0
Access
Public
Updated Oct 7, 2025
Parameters
4B
8.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
Merged full model (LoRA adapters applied to the base), ready for direct use with Transformers.
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.
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):
Note: Exact hyperparameters and logs are provided in the LoRA training pipeline (if published) or available on request.
Learning that fits.