kessenma/gemma4-e4b-german-tutor-v4-4bit
Gemma 4 E4B German Tutor v4 (MLX 4-bit)
QLoRA fine-tune of google/gemma-4-e4b-it for German grammar tutoring, quantized to 4-bit (group size 64, affine) for on-device inference with MLX. Built for an iOS flashcard app; the model corrects learner sentences and chats in natural, colloquial German.
This build supersedes [`kessenma/gemma4-e4b-german-tutor-4bit`](https://huggingface.co/kessenma/gemma4-e4b-german-tutor-4bit) (v1).
Scores
All scores use the app-guard convention: a reply only counts if the app's parser would actually show it to the learner. Suites are frozen JSON eval sets scored offline.
Paired per-item comparison vs v1: 170/203 agree, 11 items only v1 gets, 12 only v4 gets (exact McNemar p = 1.0). Grammar ability is equivalent; the differences are behavioral:
- false corrections on already-correct sentences: 3% (v1: 6%)
- missed errors: 16% (v1: 9%)
- conversational naturalness: modal particles 12.4 per 100 tokens (v1: 2.8), repeated-4-gram share 0.10 (v1: 0.30)
In short: v4 almost never marks correct German wrong, and it talks like a person instead of a worksheet. The trade is that it lets a few more real errors slide than v1 did.
Training data
42,841 instruction rows (corpus v4): teacher-generated grammar corrections balanced to 70% fix / 30% ok per phenomenon across 15 grammar phenomena, plus a conversational slice for register. Teachers: gemma-4-31B (bulk), Claude Sonnet (judgment-heavy phenomena), with every row passing LanguageTool + spaCy validation and phenomenon-shape gates.
Output contract
Given a learner sentence, the model answers either OK (sentence is correct) or:
FIX: <corrected sentence>
WHY: <one-line explanation>
HINT: <question that nudges the learner>Use with MLX
Requires a recent mlx-vlm / mlx-swift-lm (Gemma 4 support). Single-shard safetensors; the lora/ adapter is not included here (archived separately with the fp16 merge).
