Model reference · open weights

trocr-large-handwritten

trocr-large-handwritten is an open-weight language model from microsoft, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.

Licence fee required LLMs microsoft 1 variants 132k downloads/mo
Request a licence + hosting quote All served models Not on the shared API today — deployed on request.

About

What trocr-large-handwritten is

TrOCR (large-sized model, fine-tuned on IAM) TrOCR model fine-tuned on the IAM dataset. 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. Disclaimer: The team releasing TrOCR did not write a model card for this model so this model card has been written by the Hugging Face team. Model description The TrOCR model is an encoder-decoder model, consisting of an image Transformer as encoder, and a text Transformer as decoder. The image encoder was initialized from the weights of BEiT, while the text decoder was initialized from the weights of RoBERTa. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. Next, the Transformer text decoder autoregressively generates tokens. Intended uses & limitations You can use the raw model for optical character recognition (OCR) on single text-line images. See the model hub to look for fine-tuned versions on a task that interests you. How to use Here is how to use this model in PyTorch: BibTeX entry and citation info

Summarised from the published model card. Read the full card on the HuggingFace links below.

Specifications

What it is

Makermicrosoft
TypeLanguage models
Variants1
Runs withtransformers
Released2022-03-02
Popularity132k downloads / month
Likes166
LicenceCommercial licence needed

How it works

How language models work

Your prompttext / messagesTransformerattention over tokensNext-token loopgenerate + streamResponsetext · tool callsA language model reads your tokens and predicts the next one, again and again, streaming the reply back.

Variants

Sizes & precisions

Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.

VariantParamsPrecisionVRAMFits 16 GBWeights
trocr-large-handwrittenBF16Weights ↗

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys trocr-large-handwritten for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (trocr-large-handwritten below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/chat/completions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"trocr-large-handwritten","messages":[{"role":"user","content":"Hello"}]}'

Details

Languages, data & research

Tags

transformers pytorch vision-encoder-decoder image-text-to-text trocr image-to-text endpoints_compatible

Papers

Licence

Commercial licence needed

The weights are open but its licence needs a commercial agreement for business use. AxForge can arrange that licence and host the model for you — you pay AxForge, we settle with the model’s maker. Ask us for a quote. Read the licence ↗

Sources

Weights & code

Want trocr-large-handwritten on EU-owned hardware?

Request a licence + hosting quote See what’s served now

Explore

More language models

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