# trocr-base-handwritten-hist-swe-2: Open-Weight Model
Source: https://savrn.com/models/trocr-base-handwritten-hist-swe-2
Markdown alternate of the page above; the site index is https://savrn.com/llms.txt

---

## Runs On

What it takes to serve trocr-base-handwritten-hist-swe-2 (385M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
| --- | --- | --- | --- | --- | --- |
| 16-bit | 0.8 GB | 0.9 GB | 1x [MI300X](https://savrn.com/ai-index/pricing/gpus/mi300x) (192 GB) Vultr | $1.85 | [1x H100](https://savrn.com/ai-index/pricing/gpus/h100) $1.99 · [1x MI325X](https://savrn.com/ai-index/pricing/gpus/mi325x) $2.00 |
| 8-bit | 0.4 GB | 0.5 GB | 1x [MI300X](https://savrn.com/ai-index/pricing/gpus/mi300x) (192 GB) Vultr | $1.85 | [1x H100](https://savrn.com/ai-index/pricing/gpus/h100) $1.99 · [1x MI325X](https://savrn.com/ai-index/pricing/gpus/mi325x) $2.00 |
| 4-bit | 0.2 GB | 0.2 GB | 1x [MI300X](https://savrn.com/ai-index/pricing/gpus/mi300x) (192 GB) Vultr | $1.85 | [1x H100](https://savrn.com/ai-index/pricing/gpus/h100) $1.99 · [1x MI325X](https://savrn.com/ai-index/pricing/gpus/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](https://savrn.com/ai-index/pricing/gpus), read Oct 23, 2026.

[trocr-base-handwritten-hist-swe-2 on every accelerator the SAVRN Index prices, at every precision](https://savrn.com/models/trocr-base-handwritten-hist-swe-2/gpus)

## Model Card

By Swedish National Archives, AI-lab and Data Services, published under apache-2.0, revision aa79fcb1850b.

### Swedish Lion Libre

An HTR model for historical Swedish developed by the Swedish National Archives in collaboration with the Stockholm City Archives, the Finnish National Archives and Jämtlands Fornskriftsällskap. The model is trained on Swedish handwriting from the period 1600-1900.

### Model Details

#### Model Description

- Developed by: The Swedish National Archives
- Model type: TrOCR base handwritten
- Language(s) (NLP): Historical Swedish handwriting
- License: apache-2.0
- Finetuned from model: trocr-base-handwritten

### Uses

The model is trained on Swedish running-text handwriting dating from the start of the 17th century to the end of the 19th century. Like most current HTR models it operates on a text-line level, so its intended use is within an HTR pipeline that segments the text into text lines, which are transcribed by the model.

#### Direct Use

[Read the full model card (1,178 words)](https://savrn.com/models/trocr-base-handwritten-hist-swe-2/card)

## Configuration

Architecture

VisionEncoderDecoderModel

Vocabulary size

50,265

Stored precision

float32

Model type

vision-encoder-decoder

## Identity and Version

Repository

Riksarkivet/trocr-base-handwritten-hist-swe-2

Publisher

Swedish National Archives, AI-lab and Data Services

Task

Image to text

Modality

Image and text

Library

htrflow

Parameters

385M parameters

Languages

sv

Revision

aa79fcb1850bf3155ebc442570d6c6bfc0ac8100

First published

2024-08-15

Last updated

2026-06-04

## Files and Weights

33 files, 1.5 GB in total. The weights are 1 file totalling 1.5 GB in safetensors.

Weights1 file · 1.5 GB

Configuration5 files · 8.1 KB

Tokenizer4 files · 3.4 MB

Documentation1 file · 13.4 KB

Other21 files · 4.1 MB

Repository1 file · 1.5 KB

Every file

| File | Type | Size | SHA-256 |
| --- | --- | --- | --- |
| model.safetensors | Weights | 1.5 GB | 786c378f820e |
| config.json | Configuration | 4.8 KB | — |
| generation_config.json | Configuration | 274 B | — |
| handler.py | Configuration | 1.7 KB | — |
| preprocessor_config.json | Configuration | 364 B | — |
| special_tokens_map.json | Configuration | 957 B | — |
| README.md | Documentation | 13.4 KB | — |
| tensorboard/events.out.tfevents.1722593667.amlpai05.1105181.0 | Other | 3.9 MB | e81f5466e797 |
| tensorboard/events.out.tfevents.1723193022.amlpai05.965322.0 | Other | 9.3 KB | da74c58ec00e |
| tensorboard/events.out.tfevents.1723193194.amlpai05.973492.0 | Other | 9.3 KB | 6f99a604119a |
| tensorboard/events.out.tfevents.1723193342.amlpai05.981268.0 | Other | 9.3 KB | a586b1a3f265 |
| tensorboard/events.out.tfevents.1723193372.amlpai05.983438.0 | Other | 9.3 KB | fd93fbe7d0e8 |
| tensorboard/events.out.tfevents.1723193535.amlpai05.991824.0 | Other | 9.3 KB | cc62b59f3f8c |
| tensorboard/events.out.tfevents.1723194050.amlpai05.1009717.0 | Other | 9.3 KB | de37725d9546 |
| tensorboard/events.out.tfevents.1723194523.amlpai05.1023845.0 | Other | 9.3 KB | e734c7ada0fc |
| tensorboard/events.out.tfevents.1723195508.amlpai05.1058286.0 | Other | 9.3 KB | bfbcada98187 |
| tensorboard/events.out.tfevents.1723195753.amlpai05.1067357.0 | Other | 9.3 KB | aef606f1453e |
| tensorboard/events.out.tfevents.1723196150.amlpai05.1081045.0 | Other | 9.3 KB | 847ba958ca06 |
| tensorboard/events.out.tfevents.1723196403.amlpai05.1089190.0 | Other | 9.3 KB | 751f004889ba |
| tensorboard/events.out.tfevents.1723198169.amlpai05.1144588.0 | Other | 9.3 KB | c4edf1a1d6b5 |
| tensorboard/events.out.tfevents.1723198290.amlpai05.1149345.0 | Other | 9.3 KB | 5fae89f13545 |
| tensorboard/events.out.tfevents.1723198390.amlpai05.1153837.0 | Other | 9.3 KB | 6482f55a9c61 |
| tensorboard/events.out.tfevents.1723198574.amlpai05.1160632.0 | Other | 9.3 KB | c76729f530da |
| tensorboard/events.out.tfevents.1723198651.amlpai05.1165918.0 | Other | 9.3 KB | b14f2323fe6d |
| tensorboard/events.out.tfevents.1723198808.amlpai05.1174133.0 | Other | 9.3 KB | d054323f5586 |
| tensorboard/events.out.tfevents.1723198845.amlpai05.1176198.0 | Other | 9.3 KB | 3a19baa0b765 |
| tensorboard/events.out.tfevents.1723198913.amlpai05.1179428.0 | Other | 9.3 KB | 737c1974ec08 |
| tensorboard/events.out.tfevents.1723198936.amlpai05.1181588.0 | Other | 9.3 KB | d269e3a8f8bc |
| .gitattributes | Repository | 1.5 KB | — |
| merges.txt | Tokenizer | 456.3 KB | — |
| tokenizer.json | Tokenizer | 2.1 MB | — |
| tokenizer_config.json | Tokenizer | 1.3 KB | — |
| vocab.json | Tokenizer | 798.3 KB | — |

## License and Download

License

apache-2.0

Access

Open weights, no gate

Download size

1.5 GB

[Download from Swedish National Archives, AI-lab and Data Services](https://huggingface.co/Riksarkivet/trocr-base-handwritten-hist-swe-2)

Released by Swedish National Archives, AI-lab and Data Services through its official repository on Hugging Face. [Read the license](https://www.apache.org/licenses/LICENSE-2.0).

## Built From

- Derived from [microsoft/trocr-base-handwritten](https://savrn.com/models/trocr-base-handwritten)
- Described by [arXiv:2109.10282](https://savrn.com/papers/trocr-transformer-based-optical-character-recognition-with-pre-trained-models)
- Trained on (disclosed) Riksarkivet/alvsborgs_losen_lines
- Trained on (disclosed) Riksarkivet/bergmastaren_i_nora_htr_lines
- Trained on (disclosed) Riksarkivet/bergskollegium_relationer_och_skrivelser_lines
- Trained on (disclosed) Riksarkivet/carl_fredrik_pahlmans_resejournaler_lines
- Trained on (disclosed) Riksarkivet/frihetstidens_utskottshandlingar_lines
- Trained on (disclosed) Riksarkivet/gota_hovratt_lines
- Trained on (disclosed) Riksarkivet/goteborgs_poliskammare_fore_1900_lines
- Trained on (disclosed) Riksarkivet/jonkopings_radhusratt_och_magistrat_lines
- Trained on (disclosed) Riksarkivet/krigshovrattens_dombocker_lines
- Trained on (disclosed) Riksarkivet/svea_hovratt_lines
- Trained on (disclosed) Riksarkivet/trolldomskommissionen_lines

## Memory Requirements

| Precision | Weights in memory |
| --- | --- |
| As published | 1.5 GB |
| 16-bit | 0.8 GB |
| 8-bit | 0.4 GB |
| 4-bit | 0.2 GB |

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

## Questions About trocr-base-handwritten-hist-swe-2

### How much GPU memory does trocr-base-handwritten-hist-swe-2 need?

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

### What is the cheapest GPU to run trocr-base-handwritten-hist-swe-2 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.

### Can I use trocr-base-handwritten-hist-swe-2 commercially?

Yes. trocr-base-handwritten-hist-swe-2 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

## Similar Models

Model · Image to text

### [nougat-base](https://savrn.com/models/nougat-base)

[AI at Meta](https://savrn.com/model-publishers/facebook)

Nougat model trained on PDF-to-markdown. It was introduced in the paper Nougat: Neural Optical Understanding for Academic Documents by Blecher et al. and first released in this repository. Disclaimer: The team releasing Nougat did not write a model card for this model so this model card has been written by the Hugging Face team. Note: this model corresponds to the "0.1.0-base" version of the original repository. Nougat is a Donut model trained to transcribe scientific PDFs into an easy-to-use markdown format. The model consists of a Swin Transformer as vision encoder, and an mBART model as text decoder. The model is trained to autoregressively predict the markdown given only the pixels of…

Open weights cc-by-nc-4.0 349M parameters transformers

[View model](https://savrn.com/models/nougat-base)

Model · Image to text

### [trocr-base-printed](https://savrn.com/models/trocr-base-printed)

[Microsoft](https://savrn.com/model-publishers/microsoft)

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. 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. 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…

Open weights 333M parameters transformers

[View model](https://savrn.com/models/trocr-base-printed)

Model · Image to text

### [trocr-base-handwritten](https://savrn.com/models/trocr-base-handwritten)

[Microsoft](https://savrn.com/model-publishers/microsoft)

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. 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…

Open weights mit 333M parameters transformers

[View model](https://savrn.com/models/trocr-base-handwritten)

Model · Image to text

### [blip-image-captioning-large](https://savrn.com/models/blip-image-captioning-large)

[Salesforce AI Research](https://savrn.com/model-publishers/salesforce)

captioning pretrained on COCO dataset - base architecture (with ViT large 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 470M parameters 512 tokens transformers

[View model](https://savrn.com/models/blip-image-captioning-large)

Model · Image to text

### [pix2struct-base](https://savrn.com/models/pix2struct-base)

[Google](https://savrn.com/model-publishers/google)

This model is the pretrained version of Pix2Struct, use this model for fine-tuning purposes only. Pix2Struct is an image encoder - text decoder model that is trained on image-text pairs for various tasks, including image captionning and visual question answering. The full list of available models can be found on the Table 1 of the paper: The abstract of the model states that: forms. Perhaps due to this diversity, previous work has typically relied on domainspecific recipes with limited sharing of the underlying data, model architectures, and objectives. We present Pix2Struct, a pretrained image-to-text model for purely visual language understanding, which can be finetuned on tasks…

Open weights apache-2.0 282M parameters transformers

[View model](https://savrn.com/models/pix2struct-base)

Model · Image to text

### [donut-boletas-peru](https://savrn.com/models/donut-boletas-peru)

[André Edgardo Saras Rivera](https://savrn.com/model-publishers/eng-aesr)

Modelo experimental de extracción estructurada, sin OCR explícito, para imágenes de boletas peruanas. Es una adaptación de bajo recurso de naver-clova-ix/donut-base-finetuned-cord-v2, no un modelo entrenado desde cero. El modelo recibe una imagen completa y genera una representación que DonutProcessor.token2json convierte al siguiente esquema: Este checkpoint está pensado para investigación, demostraciones y prototipos supervisados sobre boletas impresas peruanas en español. Puede servir como punto de partida para nuevas evaluaciones o fine-tuning con datos propios. No debe utilizarse sin revisión humana para contabilidad, tributación, auditoría, pagos, cumplimiento normativo ni otras…

Open weights mit 201M parameters transformers

[View model](https://savrn.com/models/donut-boletas-peru)

## Swedish National Archives, AI-lab and Data Services

[All models and datasets](https://savrn.com/model-publishers/riksarkivet)

## Versions

- [aa79fcb1850b](https://savrn.com/models/trocr-base-handwritten-hist-swe-2/versions/aa79fcb1850b) · current 2026-09-18

## Explore More

- [All image to text models](https://savrn.com/models/tasks/image-to-text)
- [All models under apache-2.0](https://savrn.com/models/licenses/apache-2-0)
- [Model comparisons](https://savrn.com/models/comparisons)
- [The model directory](https://savrn.com/models)
- [Open model prices by host](https://savrn.com/ai-index/pricing/open-models)

## Source

- Repository metadata, read 2026-10-20.
- [Hugging Face record](https://huggingface.co/Riksarkivet/trocr-base-handwritten-hist-swe-2)
- [How the hub is built](https://savrn.com/model-hub/methodology)
