Model reference · open weights

TrOCR_german_handwritten

LLMs fhswf Image→text 1 build Its own licence terms 967 dl/mo

TrOCR_german_handwritten is an open-weight language model from fhswf. TrOCR_german_handwritten (FP32) weighs 1.1 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

What it is

Released byfhswf
Released2024-05-29
Parameters558M
VRAM1.1 GB for the weights

What it runs on

Memory and cards for TrOCR_german_handwritten (FP32)

1.1 GBweights, file size
682 MBruntime overhead, at least

How much memory each request adds isn't estimated yet for this architecture. The weights need at least the cards below, plus room for the context.

CardWeights alone
RTX 3060 12 GBfits
RTX 4060 Ti 16 GBfits
RTX 3090 24 GBfits
RTX 4090 24 GBfits
RTX 5090 32 GBfits
L40S 48 GBfits
A100 80 GBfits
H100 80 GBfits
RTX PRO 6000 Blackwell 96 GBfits
DGX Spark (GB10) 128 GB unifiedfits
H200 141 GBfits
B200 180 GBfits

From the model card

What fhswf says about TrOCR_german_handwritten

Model Details

TrOCR model fine-tuned on the german_handwriting. It was introduced in the paper TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models by Li et al. and first released in this repository.

  • Developed by: [More Information Needed]
  • Model type: Transformer OCR
  • Language(s) (NLP): German
  • License: afl-3.0
  • Finetuned from model [optional]: TrOCR_large_handwritten

Uses

Here is how to use this model in PyTorch:

Read the full model card
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
from PIL import Image
import requests
# load image from the IAM database
url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg'
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
processor = TrOCRProcessor.from_pretrained('fhswf/TrOCR_german_handwritten')
model = VisionEncoderDecoderModel.from_pretrained('fhswf/TrOCR_german_handwritten')
pixel_values = processor(images=image, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]

Bias, Risks, and Limitations

You can use the raw model for optical character recognition (OCR) on single text-line images of german handwriting.

Training Details

Training Data

This model was finetuned on german_handwriting.

Evaluation

Levenshtein: 1.85 WER (Word Error Rate): 17.5% CER (Character Error Rate): 4.1%

BibTeX:

@misc{li2021trocr,
      title={TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models},
      author={Minghao Li and Tengchao Lv and Lei Cui and Yijuan Lu and Dinei Florencio and Cha Zhang and Zhoujun Li and Furu Wei},
      year={2021},
      eprint={2109.10282},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms