Model reference · open weights

trocr-handwritten-hist-swe-2

trocr-handwritten-hist-swe-2 is an open-weight language model from Riksarkivet, 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.

LLMs Riksarkivet 1 variants 54k downloads/mo
Request this model on EU hardware All served models Not on the shared API today — deployed on request.

About

What trocr-handwritten-hist-swe-2 is

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 The model can be used without fine-tuning on all handwriting but performs best on the type of handwriting it was trained on, which is Swedish handwriting from 1600-1900. See below for detailed test and evaluation results. Downstream Use The model can be fine-tuned on other types of handwriting, or if you plan to use it to transcribe some specific material that is within it's domain but not included in the training data, for instance if you got a large letter collection dating from the 17th century, it can be fine-tuned on a small amount of manually transcribed in-domain data, say 20-50 letters, and then used to transcribe the entire collection. Out-of-Scope Use The model won't work well out-of-the-box for other languages than Swedish, and it won't work well for printed text. How to Get Started with the Model Use the code below to get started with the model, but bear in mind that the image has to be a single text line. If you want to transcribe entire pages, consider using HTRflow, a package developed by the Swedish National Archives and intended for streamlining large and small scale HTR/OCR-projects. Install the package, write a pipeline config yaml, where you specify the models to use by their huggingface id, add preprocessing or post-processing steps, and then run the pipeline with htrflow pipeline <path/to/yaml <path/to/im

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

Specifications

What it is

MakerRiksarkivet
TypeLanguage models
Parameters (lead)385M
Variants1
Runs withhtrflow
Based onmicrosoft/trocr-base-handwritten
Released2024-08-15
Popularity54k downloads / month
Likes16
LicenceOpen weights

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-base-handwritten-hist-swe-2385MBF16~0.9 GBWeights ↗

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys trocr-handwritten-hist-swe-2 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (trocr-handwritten-hist-swe-2 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-handwritten-hist-swe-2","messages":[{"role":"user","content":"Hello"}]}'

Details

Languages, data & research

Languages

sv

Trained / evaluated on

Riksarkivet/goteborgs_poliskammare_fore_1900_lines Riksarkivet/krigshovrattens_dombocker_lines Riksarkivet/svea_hovratt_lines Riksarkivet/bergskollegium_relationer_och_skrivelser_lines Riksarkivet/frihetstidens_utskottshandlingar_lines Riksarkivet/carl_fredrik_pahlmans_resejournaler_lines Riksarkivet/trolldomskommissionen_lines Riksarkivet/gota_hovratt_lines Riksarkivet/bergmastaren_i_nora_htr_lines Riksarkivet/alvsborgs_losen_lines Riksarkivet/jonkopings_radhusratt_och_magistrat_lines

Tags

htrflow tensorboard safetensors vision-encoder-decoder image-text-to-text trocr image-to-text swedish lion libre htr transformers swedish historical handwriting sv

Papers

Licence

Open weights

Open weights under apache-2.0 — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗

Sources

Weights & code

Want trocr-handwritten-hist-swe-2 on EU-owned hardware?

Request this model on EU hardware See what’s served now

Explore

More language models

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