How to use from
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
	}'
Quick Links

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
966
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for dh-unibe/trocr-kurrent

Finetuned
(36)
this model

Space using dh-unibe/trocr-kurrent 1