SAVRN
Search Contact SAVRN

Open-weight model · Image to text

trocr-small-printed

by Microsoft microsoft/trocr-small-printed

TrOCR model fine-tuned on the SROIE 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.

Parameters61M
Context
Weights491.8 MB
License
AccessOpen weights
Monthly Downloads32.3k

Runs On

What it takes to serve trocr-small-printed (61M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

TrOCR model fine-tuned on the SROIE 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. 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 DeiT, while the text decoder was initialized from the weights of UniLM. 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…

Excerpt from the card by Microsoft.

Configuration

Architecture
VisionEncoderDecoderModel
Stored precision
float32
Model type
vision-encoder-decoder

Identity and Version

Repository
microsoft/trocr-small-printed
Publisher
Microsoft
Task
Image to text
Modality
Image and text
Library
transformers
Parameters
61M parameters
Languages
Not stated by the source
Revision
04e994ab854b0089d4929f48c2b4dbe2ce78a340
First published
2022-03-02
Last updated
2024-05-27

Files and Weights

10 files, 493.1 MB in total. The weights are 2 files totalling 491.8 MB in bin, safetensors.

Weights2 files · 491.8 MB
Configuration4 files · 4.9 KB
Tokenizer1 file · 327 B
Documentation1 file · 2.8 KB
Other1 file · 1.4 MB
Repository1 file · 1.2 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights245.8 MB 49350a39968d
pytorch_model.binWeights245.9 MB 159af16f37ca
config.jsonConfiguration4.2 KB
generation_config.jsonConfiguration190 B
preprocessor_config.jsonConfiguration272 B
special_tokens_map.jsonConfiguration238 B
README.mdDocumentation2.8 KB
sentencepiece.bpe.modelOther1.4 MB 6f5e2fefcf79
.gitattributesRepository1.2 KB
tokenizer_config.jsonTokenizer327 B

License and Download

License
Not stated by the source
Access
Open weights, no gate
Download size
491.8 MB
Download from Microsoft

Released by Microsoft through its official repository on Hugging Face.

Built From

Memory Requirements

PrecisionWeights in memory
As published491.8 MB
16-bit0.1 GB
8-bit0.1 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About trocr-small-printed

How much GPU memory does trocr-small-printed need?

About 0.1 GB at 16-bit and 0 GB at 4-bit: the weights (61M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run trocr-small-printed on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Similar Models

captioning pretrained on COCO dataset - base architecture (with ViT base backbone). Authors from the paper write in the abstract: Vision-Language Pre-training (VLP) has advanced the performance for many vision-language tasks. However, most existing pre-trained models only excel in either understanding-based tasks or generation-based tasks. Furthermore, performance improvement has been largely achieved by scaling up the dataset with noisy image-text pairs collected from the web, which is a suboptimal source of supervision. In this paper, we propose BLIP, a new VLP framework which transfers flexibly to both vision-language understanding and generation tasks. BLIP effectively utilizes the…

Open weights bsd-3-clause 512 tokens transformers

Model · Image to text

manga-ocr-base

Maciej Budyś

Optical character recognition for Japanese text, with the main focus being Japanese manga. It uses Vision Encoder Decoder framework. Manga OCR can be used as a general purpose printed Japanese OCR, but its main goal was to provide a high quality text recognition, robust against various scenarios specific to manga: - both vertical and horizontal text - text with furigana - text overlaid on images - wide variety of fonts and font styles - low quality images Code is available here.

Open weights apache-2.0 transformers

Model · Image to text

PP-OCRv5_server_det

PaddlePaddle

PP-OCRv5serverdet is one of the PP-OCRv5det series, the latest generation of text detection models developed by the PaddleOCR team. Designed for high-performance applications, it supports the detection of text in diverse scenarios—including handwriting, vertical, rotated, and curved text—across multiple languages such as Simplified Chinese, Traditional Chinese, English, and Japanese. Key features include robust handling of complex layouts, varying text sizes, and challenging backgrounds, making it suitable for practical applications like document analysis, license plate recognition, and scene text detection. The key accuracy metrics are as follow: Please refer to the following commands to…

Open weights apache-2.0 PaddleOCR

Model · Image to text

UVDoc

PaddlePaddle

The main purpose of text image correction is to carry out geometric transformation on the image to correct the document distortion, inclination, perspective deformation and other problems in the image, so that the subsequent text recognition can be more accurate. Please refer to the following commands to install PaddlePaddle using pip: For details about PaddlePaddle installation, please refer to the PaddlePaddle official website. Install the latest version of the PaddleOCR inference package from PyPI: You can quickly experience the functionality with a single command: You can also integrate the model inference of the TextImageUnwarping module into your project. Before running the following…

Open weights apache-2.0 PaddleOCR

Model · Image to text

en_PP-OCRv5_mobile_rec

PaddlePaddle

enPP-OCRv5mobilerec is one of the PP-OCRv5rec that are the latest generation text line recognition models developed by PaddleOCR team. It aims to efficiently and accurately support the recognition of English. The key accuracy metrics are as follow: Note: If any character (including punctuation) in a line was incorrect, the entire line was marked as wrong. This ensures higher accuracy in practical applications. Please refer to the following commands to install PaddlePaddle using pip: For details about PaddlePaddle installation, please refer to the PaddlePaddle official website. Install the latest version of the PaddleOCR inference package from PyPI: You can quickly experience the…

Open weights apache-2.0 PaddleOCR

Model · Image to text

PP-LCNet_x1_0_doc_ori

PaddlePaddle

The Document Image Orientation Classification Module is primarily designed to distinguish the orientation of document images and correct them through post-processing. During processes such as document scanning or ID photo capturing, the device might be rotated to achieve clearer images, resulting in images with various orientations. Standard OCR pipelines may not handle these images effectively. By leveraging image classification techniques, the orientation of documents or IDs containing text regions can be pre-determined and adjusted, thereby improving the accuracy of OCR processing. The key accuracy metrics are as follow: Please refer to the following commands to install PaddlePaddle…

Open weights apache-2.0 PaddleOCR