Instructions to use lamplitlabs/licht-german-tutor-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lamplitlabs/licht-german-tutor-medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lamplitlabs/licht-german-tutor-medium") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lamplitlabs/licht-german-tutor-medium") model = AutoModelForCausalLM.from_pretrained("lamplitlabs/licht-german-tutor-medium", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lamplitlabs/licht-german-tutor-medium with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lamplitlabs/licht-german-tutor-medium" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lamplitlabs/licht-german-tutor-medium", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lamplitlabs/licht-german-tutor-medium
- SGLang
How to use lamplitlabs/licht-german-tutor-medium with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lamplitlabs/licht-german-tutor-medium" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lamplitlabs/licht-german-tutor-medium", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lamplitlabs/licht-german-tutor-medium" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lamplitlabs/licht-german-tutor-medium", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lamplitlabs/licht-german-tutor-medium with Docker Model Runner:
docker model run hf.co/lamplitlabs/licht-german-tutor-medium
licht-german-tutor-medium (v22, public preview)
Preview, not a release. This checkpoint was measured against a publication rule written before training and met five of its eight clauses. It failed three: seven answers were flagged as containing a severe error by all five judges (ceiling three), six of eight held-out role-play cards passed (floor seven), and two sentences with an error were validated as correct (ceiling zero) - see How it was evaluated. It is on the Hub by the owner's explicit decision of 2026-09-16 so that the 8B line can be tried; the figures below are the measured ones, unchanged. The released tutor is the browser line, lamplitlabs/licht-german-tutor.
A German tutor for learners from A1 to C1, as a full-size PyTorch checkpoint. It explains grammar and vocabulary, corrects sentences, drills forms, briefs you before an everyday situation (the barber, the vet, a Kita enrolment, a call to the Finanzamt) and plays the other person, transforms sentences the way C1 courses ask (Nominalstil and Verbalstil, Partizipialattribut and Relativsatz, Konjunktiv I, passive substitutes, two-part connectors) and helps you prepare for the telc and Goethe exams. It answers in the language you write in, German or English.
This is the medium line of the licht tutors: 8 billion parameters, fine-tuned from Qwen3-8B, merged weights
in bf16 safetensors, for a GPU server or a workstation with 20 GB of memory. The browser line - 3 billion
parameters, ONNX, runs on your own device - is
lamplitlabs/licht-german-tutor; how each version was
measured is on ai.lamplitlabs.com. Inside the training records this checkpoint
is called light-german-tutor-pro-v22; the Hub repository is named for the line, the tag for the version.
What it does
- Explains: the difference between
seitandvor, whenals,wennandwannare used, how adjective endings, cases, the Perfekt and word order work, with short bilingual examples; asked for a rule it opens by quoting the routed rule note when one is in the prompt (seegrounding.jsonbelow). - Corrects: shows the corrected sentence first, then names the changed word and the rule in one or two lines.
- Drills: gender and plural of nouns, irregular verb forms, article, pronoun and adjective paradigms, numbers, ordinals, dates, prices, clock times, contractions, verb-preposition pairs, false friends.
- Briefs and rehearses: say what you are about to do ("I have to talk to my landlord about the heating", "Bring mir bei, wie ich beim Friseur bestelle") and it gives the situation's phrases at your level, warns about the typical mix-ups, and offers to play the counterpart in short German turns using only the facts you set. Over a hundred situations were trained; eight further ones are held out and used only for evaluation.
- Transforms and writes at C1: Nominalstil to Verbalstil and back, Partizipialattribut to Relativsatz, indirect speech with Konjunktiv I, passive substitutes, register shifts, essay openings, formal complaints, arguing for and against.
- Prepares for exams: exam-format writing and speaking tasks, Sprachbausteine, model letters, the pass rules of telc, Goethe and DTZ applied to a given result, and a session plan for a stated level.
Examples
Three answers from the release check, quoted exactly as generated (greedy decoding, system prompt below, no rule note attached):
Can you correct this sentence? 'Ich habe ein Hund.'
Ich habe einen Hund. Fix: 'habe ein Hund.' -> 'habe einen Hund.'. Reason: 'Hund' is masculine: einen.
Heißt es der, die oder das Jobangebot? Und wie lautet der Plural?
das Jobangebot (neutral). Plural: die Jobangebote (-e).
Rewrite in nominal style with 'trotz'. Give the rewritten sentence first, then one short note. Obwohl es stark regnete, fand das Konzert statt.
Trotz des starken Regens fand das Konzert statt. 'trotz + genitive' replaces 'obwohl'; the verb stays in position 2.
Use it
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "lamplitlabs/licht-german-tutor-medium"
rev = "v22-preview" # pin the version; main moves with later versions
tok = AutoTokenizer.from_pretrained(repo, revision=rev)
model = AutoModelForCausalLM.from_pretrained(repo, revision=rev, torch_dtype="bfloat16", device_map="auto")
messages = [
{"role": "system", "content": SYSTEM_PROMPT}, # the tutor prompt below
{"role": "user", "content": "Ich muss morgen zum Friseur. Wie sage ich, dass ich nur die Spitzen geschnitten haben will?"},
]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=700, do_sample=False, no_repeat_ngram_size=24)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
The model ships with the plain ChatML template (chat_template.jinja), not Qwen3's thinking template: it was
trained and evaluated without a <think> block and produces none. It was trained under this system prompt and
answers best with it:
You are a patient, precise German tutor for learners from A1 to C1. Reply in the language the learner writes in (usually English) and keep German examples in German, with translations. Adapt depth to the learner's level when it is given. Be compact: state the meaning or rule in a few sentences, give two or three short example sentences, always mark gender and plural for nouns, and when correcting show the corrected sentence first, then explain briefly. Plain text with light Markdown, no emojis, and never mention being an AI model.
The last clause suppresses boilerplate disclaimers, not honesty: asked directly whether it is a person, the model says it is a computer program (the release check counts such identity questions; this version needed no fix on any of them).
Two data files ship with the model and make it markedly more reliable when your application uses them:
grounding.json- short rule notes (numbers, dates, prices, clock times, contractions, cases after prepositions, exam facts and so on), each with cue words. When a cue word appears in the learner's message, append the note to the prompt as a second system message. The evaluation numbers below were measured with it.lexicon.json- 3,800 nouns with gender and plural and 164 irregular verbs, verified against a Wiktionary-derived table. Use it to check the forms the model cites and to mark disagreements to the learner.
Prefer greedy decoding with no_repeat_ngram_size=24 - that is what was evaluated; sampling was not. The
shipped generation_config.json is the base model's (sampling, 128 new tokens), so pass do_sample=False
and max_new_tokens yourself as the snippet does. distill_train_summary.json holds the training run's
figures (steps, loss curve, hardware).
Model details
| Base model | Qwen/Qwen3-8B (Apache-2.0): 8.2B parameters, 36 layers, hidden size 4096, vocabulary 151,936 |
| Fine-tuning | LoRA (r 128, alpha 256, dropout 0.05) on all seven projections, completion-only loss, 2 epochs, effective batch 16, cosine schedule with 3 % warm-up, learning rate 2e-4, sequences up to 2,432 tokens, bf16; adapters merged into the weights |
| Files | model-0000N-of-00004.safetensors (bf16, 16.4 GB) with model.safetensors.index.json; config.json, generation_config.json; tokenizer files and chat_template.jinja (ChatML); grounding.json, lexicon.json; distill_train_summary.json |
| Runtime | transformers 4.57 or later (PyTorch); 20 GB of GPU memory in bf16, less with 8-bit or 4-bit loading |
| Languages | German and English; the answer follows the language the learner writes in |
| Licence | Apache-2.0, inherited from the base model (see Provenance and licences) |
| Version | v22, trained 2026-09-14/15, measured 2026-09-15 and not published by its own rule; on the Hub since 2026-09-16 as a preview by the owner's explicit decision outside that rule (tag v22-preview) |
Intended use and scope
Learning German: grammar and vocabulary explanations, gender and plural of nouns, irregular verb forms, article, pronoun and adjective paradigms, numbers, ordinals, dates, prices and clock times, contractions, verb-preposition pairs, false friends, sentence correction with a short explanation, formal and informal letters, C1 sentence transformations, situation briefings and short dialogue practice, exam-format questions, exam pass rules and session planning for a stated level.
Out of scope: anything other than learning German; legal, medical or safety advice; use as the only source for exam preparation. It is a fine-tuned 8B model: it makes the mistakes listed under Known weak spots and should run with the lexicon check when learners cannot judge the answer themselves.
How it was trained
The training set has 12,188 rows (461 more for validation), all produced by the same pipeline; the v22 set is the v21 set plus the two families described under Versions. Every answer over 300 words was shortened at paragraph boundaries before training. Nine kinds of rows:
- Teacher answers to learner questions (about 5,400 rows). Questions from about seventy categories - word meaning, gender and plural, translation in both directions, gap fills, exam formats (writing, speaking, Sprachbausteine, grading, planning), idioms, register, learning strategy, C1 writing and transformation tasks - answered by large language models acting as the teacher under the system prompt above. Every teacher answer was scored 1-10 by a judge from a different model vendor; answers under 7 were dropped or re-answered. About 4,200 of these questions carried a routed rule note in the prompt, so the model learns to answer with a reference in front of it.
- Situation briefings (646 rows). A learner describes what they are about to do, in English or German, with or without a level, often without naming what kind of help they want; the teacher answers with the situation's phrases, the mix-ups to avoid and an offer to rehearse. 103 situations; every answer was judged one by one and 62 were dropped for a wrong form.
- Rule drills with computed answers (about 1,150 rows). Numbers, ordinals, dates, prices, clock times, contractions (the full list of standard preposition-article contractions, with the forms that do not contract, inside a 100-word budget), years and verb prepositions come from deterministic rule engines, so the answer is correct by construction.
- Lexicon drills (about 2,250 rows). Gender, plural and irregular verb forms taken from the verified lexicon
that ships as
lexicon.json, as tables, single answers and corrections of a wrong form. - Corrections (about 250 rows). One rule for each classic learner error (perfect-tense auxiliary, adjective endings, verb position, case after prepositions, and others), with verified bilingual rule sentences and a line that names the changed word.
- Role-play turns (620 rows). Everyday situations turned into short in-character replies with a question, where the facts of the situation are fixed. Eight further situations are kept out of training and used only for evaluation.
- Grammar rule cards and C1 drills (about 1,140 rows). Forty-two bilingual cards - Perfekt, adjective
endings, cases, word order,
als/wenn/wann,dass/ob, and twelve C1 topics - in explain, contrast, check and examples form, every rule sentence copied from a verified reference block; plus 340 engine-computed transformation and connector drills at C1. - Grammar paradigms (700 rows, new in v22). Article, pronoun and adjective-ending tables by case and gender, the fixed-case and two-way prepositions with their contractions, separable and inseparable prefixes, irregular and regular verb paradigms - composed by an engine from the same reference blocks the rule notes quote, half in German, each answer opening with the reference paragraph and closing with one pitfall.
- Exam rules applied (250 rows, new in v22). The DTZ overall result for a combination of area levels, the telc B1/B2 pass rule on given written and oral points, the Goethe modular rule and the telc-versus-Goethe format facts, each answer quoting the exam note and then stating the verdict for the case.
Some questions of kind 1 were based on a privately held language-course export (vocabulary lists, lesson notes). That material is not redistributed; the model saw the teacher's answers about it, not the material.
Training ran on one A100 80 GB for 5.2 hours (1,524 optimiser steps, 17.2 million tokens seen); the final validation loss on the 461 pinned rows was 0.752, the same as v21's on the same rows (0.752).
How it was evaluated
Every version answers the same fixed hold-out prompts with greedy decoding, up to 700 new tokens, on the training hardware in bf16; nothing in these sets is in the training data.
Judge panel. 41 prompts (26 tutor questions, 15 exam questions with the fact sheet the exam rows were grounded on) are scored 1-5 on accuracy, helpfulness, German and format by five independent judges from five model families, who also list every severe error (a wrong German form stated as a rule). A second set of 16 C1 and implicit-ask prompts (set C) is scored the same way. The rule this version had to meet was written down before training started.
| Figure | Must reach | v22 (this) | v21 | v18 | browser v16 |
|---|---|---|---|---|---|
| Panel mean over the 41 (recomputed from the judges' scores) | > 3.66 | 3.71 | 3.85 | 3.75 | 3.56 |
| Answers with a severe error flagged by all five judges | <= 3 | 7 (not met) | 5 | 6 | 8 |
| Answers flagged by a majority of judges | <= 15 | 9 | 13 | 11 | 14 |
| Set C mean (C1 and implicit-ask prompts) | > 2.87 | 3.63 | 3.50 | 3.11 | - |
| Set C accuracy | > 2.4 | 3.04 | 2.76 | 2.41 | - |
Against v21, the paradigm rows did what they were meant to do - fewer majority flags, the fewest lexical
flags of the series (14, from 36) and the best set C figures - and produced a new failure shape: confidently
stated wrong rules on paradigms the reference does not cover. Four of the seven all-five answers are of that
kind: an invented adjective ending after ein in the nominative and accusative, an indirect question called a
main clause with the verb in second position, a Vorgangspassiv in the Perfekt called a state, and Sie warft
inside a verb paradigm. The mean over the 41 fell by 0.14 against v21 while staying above the line.
Automated release check. The same 177 scenarios the browser line must pass, run in PyTorch: no repeated-phrase runaways, answers end inside the token budget, never presents itself as an AI, answers in the learner's language, rule facts match the engines, cited gender and plural match the lexicon, corrections lead with the corrected sentence, and eight held-out role-play cards.
| Check | Must reach | v22 (this) | v21 | v18 |
|---|---|---|---|---|
| release (all checks) | yes | yes (all_checks 0.887) | yes (0.898) | yes (0.887) |
| not_truncated | >= 0.97 | 1.000 | 1.000 | 0.994 |
| role-play cards (held-out situations) | >= 7 of 8 | 6 of 8 (not met) | 8 of 8 | 8 of 8 |
| C1 transformation and connector scenarios | >= 13 of 16 | 14 of 16 | 14 of 16 | 11 of 16 |
| informal letters | >= 2 of 3 | 3 of 3 | 3 of 3 | 3 of 3 |
| identity fixes / false validations | <= 1 / 0 | 0 / 2 (not met) | 0 / 0 | 0 / 0 |
| contraction scenarios | (indicator) | 3 of 4 (facts right in 4 of 4) | 0 of 4 | 2 of 4 |
| situation briefings | (indicator) | 7 of 8 | 7 of 8 | 8 of 8 |
Per category, v22 gained on irregular verbs (10 of 10), prepositions and case (8 of 8), vocabulary lists (8 of 8) and contractions, and lost on corrections (8 of 12, from 11), translations (4 of 8, from 6: the answers grew to 160-200 words and left the budget), dialogue (3 of 4) and role-play (8 of 10). The two false validations came from the correction family's "already correct" branch: Es ist ein Problem mit dem Auto and Ich spreche nicht Deutsch were confirmed as correct.
Known weak spots
- Rule statements without a rule note. With a note from
grounding.jsonin the prompt the model quotes it correctly; without one it can state a neighbouring rule or an invented one, now most often on paradigms (adjective endings afterein, subordinate-clause word order, passive forms). Keep the grounding file in the prompt. - False validations. Asked "is this sentence correct?", the model can confirm a sentence that has an error (two of the checked sentences on this version). Do not use it as a grader without the lexicon and rule checks.
- Gender and plural in running text. Drills pass the lexicon check, but inside longer vocabulary lists and
model letters the model can still state a wrong article or plural, and nouns outside the lexicon are answered
from memory (9 of 12 gender-and-plural scenarios: Frost was given the plural Froste for Fröste, and
Idealismus and Schwindel were given plurals they do not have). Check cited nouns against
lexicon.json. - Invented details in briefings and role-play. A briefing can slip in a wrong or made-up word - a passing v22 briefing for a car repair shop produced "Totimpuls" and "Kellerschlüssel" - and a role-play turn can drop the card's facts. Treat briefings as phrase lists to check, not scripts.
- Long translations. Translation answers can run to 200 words; set
max_new_tokensor ask for the translation alone when you want it short. - Exam facts (points, parts, durations) are answered from general knowledge when the fact is not in the routed note and are then sometimes wrong; an application should show the routed exam facts next to the answer.
- The model has no knowledge of current events, can be confidently wrong, and has not been evaluated for anything outside German learning. It was evaluated with greedy decoding only.
Versions
- v22 (this revision, tag
v22-preview). v21's recipe on the v22 data: v21's rows plus 700 engine-composed grammar-paradigm rows and 250 exam-rule rows that quote the reference blocks, contraction drills shortened into their word budget, and a rule-note pack regenerated from its source (two dative-plural bullets corrected). Measured 2026-09-15: five of the eight publication clauses held (panel mean, majority flags, set C mean and accuracy, C1 scenarios, letters), three did not (all-five severe flags 7, role-play cards 6 of 8, false validations 2), so the rule written before training did not publish it. Published 2026-09-16 as a preview by the owner's explicit decision outside that rule. - v21 (2026-09-14; trained and measured, not published, weights kept). v18's recipe on the v21 data - v20's rows plus the situation-briefing family and the full contraction lists. The best panel figure of the series (3.85) and the release check passed, but five answers were flagged severe by all five judges against a ceiling of three.
- v18 (2026-09-13; trained and measured, not published). The first Qwen3-8B row, on the judged v18 data: panel 3.75, set C 3.11, release check passed with 8 of 8 role-play cards - 0.02 under its publish rule on the self-reported panel figure.
Provenance and licences
- Base model: Qwen/Qwen3-8B, Apache-2.0. These weights are a derivative work released under the same licence, with attribution.
- Lexicon:
lexicon.jsonis derived from gambolputty/german-nouns (Wiktionary-derived, CC BY-SA 4.0, commit8386d23). The file carriessource,licenceandattributionfields; share-alike applies to that file, not to the weights. - Teacher answers: the training answers of kinds 1 and 2 are synthetic - written by large language models acting as teacher, scored by a second-vendor judge, then filtered by the rule engines and the lexicon before training.
- Course-based questions: a privately held course export was the basis of some questions; it is not redistributed.
- The training dataset is not published.
About
The model was built with licht, a toolkit for training, checking and serving small tutors (data build, LoRA and full fine-tunes, ONNX export for the browser line, the 177-scenario release check, the judge panel, the browser UI); one A100 trains and checks a version in a few hours. Questions and requests go to this repository's Community tab.
Citation
@misc{licht-german-tutor-medium-2026,
title = {licht-german-tutor-medium v22: a German tutor fine-tuned from Qwen3-8B},
author = {Lamplit Labs},
year = {2026},
note = {public preview revision v22-preview},
url = {https://huggingface.co/lamplitlabs/licht-german-tutor-medium}
}
- Downloads last month
- 206