File size: 2,812 Bytes
15f8038
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# 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)

```python
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.