Views
No views yet
CanisAI/teach-r3-multilingual (dialogue field, default config). A separate adapter was trained on the 161k single-turn export; this repository is the 51k multi-turn publish.| Field | Value |
|---|---|
| Developed by | CanisAI (Marko Nedilko) |
| Adapter type | LoRA (PEFT / QLoRA) |
| Base model | unsloth/gemma-4-E2B-unsloth-bnb-4bit |
| Training framework | Unsloth + TRL |
| LoRA config | r=16, alpha=16, dropout=0 |
| Training data | 51,870 multi-turn dialogues |
| Data generation | Gemma 4 26B A4B-IT on DGX Spark + Canis.lab |
| Training hardware | RTX 4080 Super (full run impractical) → rented A6000, ~12 h |
| Languages | en, de, uk, fr, es, it (dataset coverage) |
| Code | https://github.com/crasyK/canis-gemma4good |
| Live Studio demo | https://canis.appwrite.network |
| Video | https://www.youtube.com/watch?v=QbxPs0jLiZY |
| License | Apache-2.0 (adapter). Base + derivatives: Gemma Terms of Use |
llama-server + Canis CLI)| Config | ~Rows | Role |
|---|---|---|
default | 51,870 | This adapter — multi-turn dialogue |
adapted-hybrid | 4,958 | Adaption-enhanced hybrid slice |
adapted-hybrid-flat | 4,958 | Flat single-turn variant |
chat-pilot-source | 300 | Small adaptation experiment |
chat-pilot-adapted | 298 | Small chat-column pilot — not this adapter’s train set |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3
4base = "unsloth/gemma-4-E2B-unsloth-bnb-4bit"
5adapter = "CanisAI/teach-multilingual-gemma-4-e2b-r3"
6
7tok = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
8model = AutoModelForCausalLM.from_pretrained(base, device_map="auto", trust_remote_code=True)
9model = PeftModel.from_pretrained(model, adapter)
10
11messages = [
12 {"role": "system", "content": "You are a Socratic K-12 tutor. Do not give the final answer directly."},
13 {"role": "user", "content": "hey kannst du mir einfach die lösung für aufgabe 3 schicken"},
14]
15text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
16out = model.generate(**tok(text, return_tensors="pt").to(model.device), max_new_tokens=256, temperature=0.7)
17print(tok.decode(out[0], skip_special_tokens=True))model/load_adapter.py in the submission repo.1from unsloth import FastModel
2
3model, tokenizer = FastModel.from_pretrained(
4 model_name="CanisAI/teach-multilingual-gemma-4-e2b-r3",
5 max_seq_length=2048,
6)model/inference_ollama.md and cli/ in the submission repo.unsloth/gemma-4-E2B-unsloth-bnb-4bitdefault config, dialogue fieldlesson/, Canis paper) informed dataset design (e.g. short student messages, generalist vs math-only). That is not validation of this Gemma 4 checkpoint in production.training/train.py for your own loss curves.1@software{canis_teach_r3_gemma4_2026,
2 author = {Nedilko, Marko},
3 title = {teach-multilingual-gemma-4-e2b-r3: Socratic LoRA for Gemma 4 E2B},
4 year = {2026},
5 url = {https://huggingface.co/CanisAI/teach-multilingual-gemma-4-e2b-r3},
6 note = {Canis Gemma 4 Good submission, github.com/crasyK/canis-gemma4good}
7}