Nedimark's picture
Upload 10 files
15f8038 verified
|
raw
history blame
2.81 kB

Canis.teach — Qwen3‑4B Instruct (Language)

LoRA adapters for the Language tutor in the Canis.teach suite.

  • Base: Qwen/Qwen3-4B-Instruct-2507
  • Release: CanisAI/teach-language-qwen3-4b-2507-r1
  • Project: Canis.teach, Learning that fits.
  • Tags: canis-teach, qwen3, education, lora, transformers

What is this?

This repository provides LoRA adapters fine‑tuned on Language tutoring dialogues. Apply these adapters to the base model to enable subject‑aware, didactic behavior without downloading a full merged checkpoint.

For a ready‑to‑run merged model or an Ollama‑friendly GGUF build, see “Related.”

Usage (LoRA)

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "CanisAI/teach-language-qwen3-4b-2507-r1"

tok = AutoTokenizer.from_pretrained(base, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, adapter)

prompt = "Improve this sentence for clarity while keeping the tone: 'Communication is just saying things.'"
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 as needed.

Dataset & training

  • Data: Canis.lab‑generated Language tutoring dialogues
  • Method: SFT with TRL; LoRA on Transformer projection layers (Unsloth + PEFT)
  • Goal: Clear, step‑by‑step pedagogy and helpful hints across subjects

Intended use

  • Subject‑aware tutoring for Language 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).

Related

  • LoRA adapters (lightweight):
    • CanisAI/teach-language-qwen3-4b-2507-r1
  • Quantized GGUF for Ollama/llama.cpp:
    • CanisAI/teach-language-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.