Instructions to use dh-unibe/trocr-essoins-middle-latin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dh-unibe/trocr-essoins-middle-latin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="dh-unibe/trocr-essoins-middle-latin")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("dh-unibe/trocr-essoins-middle-latin") model = AutoModelForMultimodalLM.from_pretrained("dh-unibe/trocr-essoins-middle-latin", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dh-unibe/trocr-essoins-middle-latin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dh-unibe/trocr-essoins-middle-latin" # 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-essoins-middle-latin", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dh-unibe/trocr-essoins-middle-latin
- SGLang
How to use dh-unibe/trocr-essoins-middle-latin 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-essoins-middle-latin" \ --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-essoins-middle-latin", "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-essoins-middle-latin" \ --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-essoins-middle-latin", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dh-unibe/trocr-essoins-middle-latin with Docker Model Runner:
docker model run hf.co/dh-unibe/trocr-essoins-middle-latin
Textrecognition Model for Essoins (England) in Latin
Part of the developments within the Flow-Project. Developed by Jonas Widmer, Christopher Kuhlmann, and Melvin Wilde.
Base model: magistermilitum/tridis_HTR v1
Train Lines: 15356
Eval Lines: 394
Test Lines: 2288
Epochs: 14.1667 / 20
Eval CER: 0.0544
Test CER: 0.0622
Testresults with CERberus
CERberus on GitHub with explanations
CERberus gets 2288 lines of the test set and evaluates them.
| Metric | Value |
|---|---|
| Character Error Rate | 6.22 |
| Number of Correct Characters | 186998 |
| Number of Substitutions | 5425 |
| Number of Insertions | 2933 |
| Number of Deletions | 3849 |
| Total Character Count | 196272 |
| Original Lines Count | 2288 |
| Discarded Lines Count | 0 |
| Block | Count | Correct | Incorrect | Correct Ratio | Incorrect Ratio |
|---|---|---|---|---|---|
| Digits | 0 | 0 | 0 | nan | nan |
| Lowercase Latin alphabet | 154731 | 147241 | 7490 | 95.16 | 4.84 |
| MUFI Glyphs | 0 | 0 | 0 | nan | nan |
| Punctuation | 9 | 4 | 5 | 44.44 | 55.56 |
| Uppercase Latin alphabet | 6883 | 6450 | 433 | 93.71 | 6.29 |
The handwritten texts in Latin (with some Middle-English and Anglo-Norman wording) that were used for training are from the 13th and 14th centuries. They come from England and were written in 'Court Hand', also known as 'Anglicana'. They come from the 'Court of Common Pleas', the second highest court of the time, and deal primarily with civil disputes, such as inheritances or dowries, and from the Justices, which also dealt with civil pleas, but covered crown pleas as well.
The model has not been extensively tested.
Errors often occur in the Punctuation, which itself has an error rate of 44.44% which mostly consits of missed ‧ dots.
Potential biases are still to be identified.
- Downloads last month
- 95
Model tree for dh-unibe/trocr-essoins-middle-latin
Base model
magistermilitum/Roberta_Historical