SAVRN
Search Contact SAVRN

Open-weight model

layoutlmv3-base

by Microsoft microsoft/layoutlmv3-base

LayoutLMv3 is a pre-trained multimodal Transformer for Document AI with unified text and image masking. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model.

Parameters125M
Context514
Weights2.0 GB
Licensecc-by-nc-sa-4.0
AccessOpen weights
Monthly Downloads1.1M

Runs On

What it takes to serve layoutlmv3-base (125M 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.3 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 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.

SAVRN's Notes on layoutlmv3-base

Forms, receipts and scanned pages are the workload here. This 125M parameter transformer from Microsoft reads text and page images together and fine-tunes for form understanding, document visual question answering, document image classification and layout analysis. Memory is not the constraint: 0.3 GB at 16-bit, 0.2 GB at 8-bit, 0.1 GB at 4-bit. The eleven files come to about 2.0 GB across safetensors, ONNX, PyTorch and TensorFlow formats; you only need one. One 192 GB MI300X at $1.85 per hour on-demand, the cheapest setup on our board, leaves nearly all of that memory free.

The constraint is the license. CC BY-NC-SA 4.0 rules out commercial use without separate permission, and any adaptation you fine-tune must carry the same license, so a production pipeline needs written permission first. Check the 514 token context against your page lengths, and note the April 2022 release, last updated April 2024.

Model Card

LayoutLMv3 is a pre-trained multimodal Transformer for Document AI with unified text and image masking. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model. For example, LayoutLMv3 can be fine-tuned for both text-centric tasks, including form understanding, receipt understanding, and document visual question answering, and image-centric tasks such as document image classification and document layout analysis. Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei, ACM Multimedia 2022. If you find LayoutLM useful in your research, please cite the following paper: The content of this project itself is licensed under the…

Excerpt from the card by Microsoft, licensed cc-by-nc-sa-4.0.

Configuration

Context length (tokens)
514
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
50,265
Stored precision
float32
Model type
layoutlmv3

Identity and Version

Repository
microsoft/layoutlmv3-base
Publisher
Microsoft
Task
Not stated by the source
Modality
Other
Library
transformers
Parameters
125M parameters
Languages
en
Revision
cfbbbff0762e6aab37086fdd4739ad14fe7d5db4
First published
2022-04-18
Last updated
2024-04-10

Files and Weights

11 files, 2.0 GB in total. The weights are 4 files totalling 2.0 GB in bin, h5, onnx, safetensors.

Weights4 files · 2.0 GB
Configuration2 files · 1.1 KB
Tokenizer3 files · 1.4 MB
Documentation1 file · 1.7 KB
Repository1 file · 1.3 KB
Every file
FileTypeSizeSHA-256
model.onnxWeights501.6 MB e8d1f8e133bc
model.safetensorsWeights501.3 MB 3c6bd09290e2
pytorch_model.binWeights501.4 MB 3b631333e3cb
tf_model.h5Weights501.6 MB 0e8ef2140ebb
config.jsonConfiguration856 B
preprocessor_config.jsonConfiguration275 B
README.mdDocumentation1.7 KB
.gitattributesRepository1.3 KB
merges.txtTokenizer456.3 KB
tokenizer_config.jsonTokenizer1.1 KB
vocab.jsonTokenizer898.8 KB

License and Download

License
cc-by-nc-sa-4.0
Access
Open weights, no gate
Download size
2.0 GB
Download from Microsoft

Released by Microsoft through its official repository on Hugging Face.

Built From

  • Described by arXiv:2204.08387

Memory Requirements

PrecisionWeights in memory
As published2.0 GB
16-bit0.3 GB
8-bit0.1 GB
4-bit0.1 GB

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

Questions About layoutlmv3-base

How much GPU memory does layoutlmv3-base need?

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

What is the cheapest GPU to run layoutlmv3-base 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 layoutlmv3-base commercially?

Not without separate permission. layoutlmv3-base is released under Creative Commons Attribution-NonCommercial-ShareAlike 4.0. CC BY-NC-SA 4.0 permits non-commercial sharing and adapting with credit, and requires adaptations to use the same license. Commercial use needs separate permission.

What is layoutlmv3-base's context length?

514 tokens, from the maximum position embeddings in its published configuration.