Instructions to use kessenma/gemma4-e4b-german-tutor-v4-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use kessenma/gemma4-e4b-german-tutor-v4-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("kessenma/gemma4-e4b-german-tutor-v4-4bit") config = load_config("kessenma/gemma4-e4b-german-tutor-v4-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
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 (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.
| suite | items | v4 | v1 (superseded) |
|---|---|---|---|
| core grammar (v0) | 60 | 51 (85%) | 54 (90%) |
| extension (v1ext) | 61 | 56 (92%) | 57 (93%) |
| holdout (v2) | 82 | 75 (91%) | 70 (85%) |
| combined | 203 | 182 (90%) | 181 (89%) |
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).
- Downloads last month
- 17
4-bit