Image-Text-to-Text
Transformers
PyTorch
Safetensors
German
vision-encoder-decoder
trocr
kurrent
ocr
htr
19th century
Instructions to use dh-unibe/trocr-kurrent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dh-unibe/trocr-kurrent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="dh-unibe/trocr-kurrent")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("dh-unibe/trocr-kurrent") model = AutoModelForImageTextToText.from_pretrained("dh-unibe/trocr-kurrent") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dh-unibe/trocr-kurrent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dh-unibe/trocr-kurrent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dh-unibe/trocr-kurrent", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dh-unibe/trocr-kurrent
- SGLang
How to use dh-unibe/trocr-kurrent 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 "dh-unibe/trocr-kurrent" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dh-unibe/trocr-kurrent", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "dh-unibe/trocr-kurrent" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dh-unibe/trocr-kurrent", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dh-unibe/trocr-kurrent with Docker Model Runner:
docker model run hf.co/dh-unibe/trocr-kurrent
TrOCR Kurrent-Model 19th century
Handwritten Text Recognition model for 19th century German.
Part of the developments at the Digital Humanities@University of Bern. Developed by Jonas Widmer and Tobias Hodel in conjunction with researchers and institutions mentioned below.
Base model: microsoft/trocr-base-handwritten
Train Lines: 292'997
Eval Lines: 7'513
Test Lines: 15'817
Epochs: 19.66 / 20
Eval CER: 0.02827
Test CER: 0.02655
Finetuned on Kurrent-dataset, containing:
- Material from the State Archives of Zurich ("Regierungsratsprotokolle"), provided by the State Archives of Zurich
- Lecture notes of Humboldt Lectures, provided by the Berlin-Brandenburgian Academy of Sciences
- Diary of Eugen Huber, provided by the University of Zurich
- Handwriting and Copies by and of Gottfried Semper (provided by the respective research project at ETH Zürich and USI Mendrisio)
- Konzilsprotokolle, University of Greifswald (19th century)
- as well as many other smaller collections/examples
The model has not been extensively tested. Potential biases are still to be identified.
- Downloads last month
- 911
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for dh-unibe/trocr-kurrent
Base model
microsoft/trocr-base-handwritten