Instructions to use jaigouk/smollm3-german-teacher with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jaigouk/smollm3-german-teacher with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jaigouk/smollm3-german-teacher") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jaigouk/smollm3-german-teacher", dtype="auto") - llama-cpp-python
How to use jaigouk/smollm3-german-teacher with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="jaigouk/smollm3-german-teacher", filename="smollm3-german-teacher-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use jaigouk/smollm3-german-teacher with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jaigouk/smollm3-german-teacher:Q4_K_M # Run inference directly in the terminal: llama-cli -hf jaigouk/smollm3-german-teacher:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf jaigouk/smollm3-german-teacher:Q4_K_M # Run inference directly in the terminal: llama-cli -hf jaigouk/smollm3-german-teacher:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf jaigouk/smollm3-german-teacher:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf jaigouk/smollm3-german-teacher:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf jaigouk/smollm3-german-teacher:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf jaigouk/smollm3-german-teacher:Q4_K_M
Use Docker
docker model run hf.co/jaigouk/smollm3-german-teacher:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use jaigouk/smollm3-german-teacher with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jaigouk/smollm3-german-teacher" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jaigouk/smollm3-german-teacher", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jaigouk/smollm3-german-teacher:Q4_K_M
- SGLang
How to use jaigouk/smollm3-german-teacher 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 "jaigouk/smollm3-german-teacher" \ --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": "jaigouk/smollm3-german-teacher", "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 "jaigouk/smollm3-german-teacher" \ --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": "jaigouk/smollm3-german-teacher", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use jaigouk/smollm3-german-teacher with Ollama:
ollama run hf.co/jaigouk/smollm3-german-teacher:Q4_K_M
- Unsloth Studio new
How to use jaigouk/smollm3-german-teacher with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jaigouk/smollm3-german-teacher to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for jaigouk/smollm3-german-teacher to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jaigouk/smollm3-german-teacher to start chatting
- Pi new
How to use jaigouk/smollm3-german-teacher with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf jaigouk/smollm3-german-teacher:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jaigouk/smollm3-german-teacher:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use jaigouk/smollm3-german-teacher with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf jaigouk/smollm3-german-teacher:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default jaigouk/smollm3-german-teacher:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use jaigouk/smollm3-german-teacher with Docker Model Runner:
docker model run hf.co/jaigouk/smollm3-german-teacher:Q4_K_M
- Lemonade
How to use jaigouk/smollm3-german-teacher with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jaigouk/smollm3-german-teacher:Q4_K_M
Run and chat with the model
lemonade run user.smollm3-german-teacher-Q4_K_M
List all available models
lemonade list
SmolLM3 German Teacher V6 (Ξ»=2500)
A finetuned 3B parameter model specialized for teaching German at A1-B1 levels, optimized for grammatical accuracy using Elastic Weight Consolidation (EWC).
Model Details
| Property | Value |
|---|---|
| Base Model | HuggingFaceTB/SmolLM3-3B |
| Training Method | QLoRA + EWC (Two-Stage Continual Learning) |
| Training Data | ~1,800 examples (900 per stage) |
| EWC Lambda | 2500 (best from grid search) |
| Hardware | RTX 4090 (24GB VRAM) |
Evaluation Results
| Metric | V6 (This Model) | V5 Baseline | Improvement |
|---|---|---|---|
| CoLA MCC | 0.6236 | 0.5927 | +5.2% |
| GEC Macro F1 | 0.1909 | 0.1121 | +70.3% |
| Generation Quality | 3.29/5.0 | 3.71/5.0 | -11.3% |
| Overall Score | 0.5158 | 0.4987 | +3.4% |
Why V6?
We tested multiple approaches (V5-V9) to balance accuracy and fluency:
| Model | Method | CoLA MCC | GEC F1 | Generation | Overall | Status |
|---|---|---|---|---|---|---|
| V5 | EWC Baseline | 0.5927 | 0.1121 | 3.71 | 0.4987 | Reference |
| V6 | EWC Ξ»=2500 | 0.6236 | 0.1909 | 3.29 | 0.5158 | Best |
| V7 | Multi-Task SFT | 0.3333 | 0.0479 | 3.00 | 0.3858 | Failed |
| V8 | DPO | 0.5833 | 0.0625 | 3.63 | 0.4730 | Failed |
| V9 | SimPO | 0.5674 | 0.0731 | 3.72 | 0.4787 | Failed |
V6 has the best grammatical accuracy, which is critical for a German teacher model. Preference optimization (V8/V9) improved fluency but destroyed accuracy.
Capabilities
- German grammar correction with clear explanations
- Error identification: haben/sein in Perfekt, article gender, case endings, word order
- A1-B1 level instruction following CEFR guidelines
- Bilingual explanations (German/English)
Files
| File | Size | Quantization | VRAM Required |
|---|---|---|---|
smollm3-german-teacher-v6-q4_k_m.gguf |
1.9 GB | Q4_K_M | ~3 GB |
Usage
With Ollama
# Download and create model
ollama create smollm3-german:v6 -f - <<EOF
FROM ./smollm3-german-teacher-v6-q4_k_m.gguf
TEMPLATE """{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{- range .Messages }}<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
SYSTEM """You are a friendly German language teacher specializing in A1-B1 level instruction. Help students learn German grammar, correct mistakes with clear explanations, and provide examples."""
PARAMETER stop "<|im_end|>"
PARAMETER temperature 0.7
EOF
# Use
ollama run smollm3-german:v6 "Korrigiere: Ich habe nach Berlin gefahren."
With llama.cpp
./llama-cli -m smollm3-german-teacher-v6-q4_k_m.gguf \
-p "<|im_start|>user\nKorrigiere: Ich habe nach Berlin gefahren.<|im_end|>\n<|im_start|>assistant\n" \
-n 256 --temp 0.7
With Transformers (Full Model)
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("jaigouk/smollm3-german-teacher")
tokenizer = AutoTokenizer.from_pretrained("jaigouk/smollm3-german-teacher")
prompt = "Korrigiere: Ich habe nach Berlin gefahren."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
Example Output
Input: Korrigiere: Ich habe nach Berlin gefahren.
Output:
Die korrekte Form ist: "Ich bin nach Berlin gefahren."
ErklΓ€rung: Bei Verben der Bewegung (fahren, gehen, kommen, fliegen) verwendet man im Perfekt das Hilfsverb "sein", nicht "haben".
Regel: Bewegungsverben + sein = Perfekt
- Ich bin gefahren (nicht: Ich habe gefahren)
- Ich bin gegangen
- Ich bin gekommen
Training Details
Two-Stage EWC Training
- Stage 1: Grammar fundamentals (articles, cases, verb conjugation)
- Stage 2: Error correction and explanations with EWC regularization
EWC (Elastic Weight Consolidation)
EWC prevents catastrophic forgetting by:
- Computing Fisher Information Matrix after Stage 1
- Using Fisher as importance weights during Stage 2
- Loss:
L_total = L_task + Ξ» * L_ewc
Lambda=2500 was selected from grid search over [2500, 5000, 10000].
Hyperparameters
# Stage 1 & 2
learning_rate = 2e-5
batch_size = 4
epochs = 3
lora_r = 16
lora_alpha = 32
# EWC
ewc_lambda = 2500
fisher_samples = 500
Limitations
- Optimized for A1-B1 level; may struggle with advanced grammar (C1+)
- Generation fluency is lower than V8/V9 (trade-off for accuracy)
- Best for structured grammar tasks; less natural in open conversation
- German/English bilingual; other languages not supported
Citation
@misc{smollm3-german-teacher-v6,
author = {Jaigouk Kim},
title = {SmolLM3 German Teacher V6: EWC-Optimized Grammar Instruction Model},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/jaigouk/smollm3-german-teacher}
}
Acknowledgments
- HuggingFace for SmolLM3 base model
- Unsloth for efficient QLoRA training
- llama.cpp for GGUF conversion
License
Apache 2.0 (same as base model)
- Downloads last month
- 56
4-bit
8-bit
Model tree for jaigouk/smollm3-german-teacher
Base model
HuggingFaceTB/SmolLM3-3B-BaseEvaluation results
- MCCself-reported0.624
- Macro F1self-reported0.191
- Scoreself-reported3.290