Downloads · 30 days
47
56% of all-time downloads
keyvan-ai/german-ocr
german-ocr is a image-text-to-text model from keyvan-ai. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
<p align="center" <img src="https://app.german-ocr.de/icon.png" alt="German-OCR-3" width="140" height="140" / </p
Downloads · 30 days
47
56% of all-time downloads
All-time downloads
84
Public
Parameters
2.2B
4.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors4.4 GB · 100%
From the Hugging Face model README
German-OCR-3 ist eine kompakte, schnelle und voll lokal lauffähige Vision-OCR-Distribution für deutsche Geschäftsdokumente — Rechnungen, Briefe, Formulare, Quittungen, Bescheide. Aus dem Bild kommt strikt validiertes JSON nach unserem deutschen Extraktions-Schema. Ohne Cloud-Pflicht, ohne Vendor-Lock-in.
Zwei Editionen, beide Apache 2.0, beide unter 3 GB:
| Edition | Ollama | Größe | Zielhardware | Stärke |
|---|---|---|---|---|
| Nano | Keyvan/german-ocr-nano | 1.0 GB | CPU · Edge · Mobile | „läuft überall" |
| Default ⭐ | Keyvan/german-ocr-3 | 2.7 GB | 4–6 GB VRAM | beste Field-Erkennung |
Fine-tuned adapter für deutsche Geschäftsdokument-Extraktion. Apache 2.0.
| Edition | Valid JSON | Sender korrekt | Halluzination | Latenz |
|---|---|---|---|---|
Keyvan/german-ocr-nano | 84 % | 79 % | 0 % | 6.6 s |
Keyvan/german-ocr-3 ⭐ | 100 % | 95 % | 0 % | 5.0 s |
Keine "Mustermann"-Defaults. German-OCR-3 liest echte Firma, Kundenadresse, Produkte, Beträge — statt zu raten.
german-ocr-3 (2.7 GB) ist 6× kleiner als ein typischer 7B-OCR-VLM. Läuft auf einer 8 GB-Gaming-GPU oder über CPU auf einem normalen Laptop.
ollama pull Keyvan/german-ocr-3
ollama run Keyvan/german-ocr-3 "Extrahiere die Rechnung im Bild als JSON." ./meine_rechnung.png
<details>
<summary><b>Beispiel-Output (anonymisiert, aus Praxistest)</b> — klicken zum Aufklappen</summary>
{
"document_type": "invoice",
"language": "de",
"invoice_number": "100137xXXXXX",
"invoice_date": "2024-01-22",
"due_date": "2024-01-27",
"sender": {
"name": "IONOS SE",
"address": "Elgendorfer Str. 57, 56410 Montabaur",
"vat_id": "DE81556XXX",
"iban": null
},
"recipient": {
"name": "Firma e.K.",
"address": "Muster Straße 32, 80335 München",
"customer_id": "5835XXX"
},
"line_items": [
{"position": 1, "description": "Mail Business 1 Liz.", "quantity": 1,
"unit": "Monat", "unit_price_net": 4.20, "amount_net": 4.20, "vat_rate": 19}
],
"amount_net": 4.20,
"amount_vat": 0.80,
"amount_total": 5.00,
"currency": "EUR",
"notes": ["Entsprechend Ihrem SEPA-Lastschriftmandat ..."]
}
</details>
import base64, json, requests
from pathlib import Path
b64 = base64.b64encode(Path("rechnung.png").read_bytes()).decode()
resp = requests.post("http://localhost:11434/api/generate", json={
"model": "Keyvan/german-ocr-3",
"prompt": "Extrahiere die Rechnung im Bild als JSON.",
"images": [b64],
"stream": False,
"options": {"temperature": 0, "num_ctx": 32768},
})
data = json.loads(resp.json()["response"])
print(json.dumps(data, indent=2, ensure_ascii=False))
huggingface-cli download Keyven/german-ocr-3 --local-dir ./german-ocr-3
# Enthält: Modelfile · JSON-Schemas · System-Prompt · GGUF-Quants · Charts
llama-cli -m ./german-ocr-3/german-ocr-3-Q4_K_M.gguf \
--system-prompt-file ./german-ocr-3/system_prompt.txt \
-p "Extrahiere die Rechnung als JSON:" --temp 0
| Datensatz | Umfang | Typ |
|---|---|---|
neuralabs/german-synth-ocr | 4 500+ | Deutsche OCR-Samples (synthetisch, Apache-2.0) |
Aoschu/German_invoices_dataset_for_donut | 129 | Echte deutsche Rechnungen (Donut-Format) |
| Eigenes synthetisches DE-Rechnungs-Set | 100 | Rechnungen mit Golden-JSON, deterministisch generiert |
| Anonymisierter DACH-Praxistest | 200+ | Echte Rechnungen verschiedener DACH-Anbieter (intern, DSGVO) |
Wer es gemanagt und mit noch größeren Modellen will:
🌐 german-ocr.de — gehostete deutsche OCR-API mit Premium-Modellen, höherer Genauigkeit, ohne eigene Hardware. Daten bleiben in der EU.
German-OCR-3 baut auf der hervorragenden Arbeit des Qwen-Teams bei Alibaba Group auf. Die zugrundeliegende Vision-Language-Architektur stammt aus der Qwen 3.5 Small Series, veröffentlicht unter Apache License 2.0. Ohne die offene Forschung und die saubere Veröffentlichung der Qwen-Weights wäre dieses Projekt nicht möglich.
Vollständiger Attribution-Text in NOTICE.
Apache License 2.0 für die gesamte German-OCR-3-Distribution (Modelfiles, System-Prompt, Schemas, Docs, GGUFs).
Wenn du German-OCR-3 in Forschung oder Produktion verwendest, zitiere bitte beides — unsere Distribution und die Qwen-Basisarbeit:
@misc{german_ocr_3_2026,
title = {German-OCR-3: A compact German document-OCR distribution},
author = {Hardani, Keyvan},
year = {2026},
url = {https://github.com/Keyvanhardani/German-OCR}
}
@misc{qwen35_2026,
title = {Qwen 3.5 Small Series},
author = {{Qwen Team, Alibaba Group}},
year = {2026},
howpublished = {\url{https://huggingface.co/Qwen}},
note = {Apache License 2.0}
}
@article{qwen25vl_2025,
title = {Qwen2.5-VL Technical Report},
author = {{Qwen Team, Alibaba Group}},
journal = {arXiv preprint arXiv:2502.13923},
year = {2025}
}
Keyvan Hardani · Website: keyvan.ai · LinkedIn: linkedin.com/in/keyvanhardani · GitHub: @Keyvanhardani · Hosted Premium: german-ocr.de