Skip to page content
SAVRN
Search Plan a project

Open-weight model · Object detection

AXDocLayout-M-v1.2

by AutomatosX AutomatosX/AXDocLayout-M-v1.2

AXDocLayout-M-v1.2 is an open-weight model for object detection from AutomatosX, released under GNU Affero General Public License 3.0. It has 37M parameters. At 16-bit it needs about 0.1 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

CUDA-powered document layout detection. AX DocLayout locates layout regions in a decoded RGB page image and returns class labels, confidence scores and bounding boxes in the original raster's pixel coordinates.

Parameters37M
Context—
Weights280.0 MB
Licenseagpl-3.0
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve AXDocLayout-M-v1.2 (37M 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.0 GB 0.0 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 Oct 24, 2026.

AXDocLayout-M-v1.2 on every accelerator the SAVRN Index prices, at every precision

Model Card

By AutomatosX, published under agpl-3.0, revision dd37e2767cd4.

CUDA-powered document layout detection. AX DocLayout locates layout regions in a decoded RGB page image and returns class labels, confidence scores and bounding boxes in the original raster's pixel coordinates. This is a CUDA runtime release using the same FP32 weights and ONNX graph as v1.1. The ONNX backend now explicitly enables ONNX Runtime's CUDA execution provider and TF32. Postprocessing is vectorized with equivalent raster geometry. The source package verifies the CUDA provider, effective TF32 policy and placement of major compute operations. CUDA setup failures raise an error; the loader does not retry with a CPU-only session. The architecture remains RT-DETRv2 rtdetrv2r50vdm, with…

Read AutomatosX's full model card

AXDocLayout-M v1.2 — ONNX CUDA + TF32

CUDA-powered document layout detection. AX DocLayout locates layout regions in a decoded RGB page image and returns class labels, confidence scores and bounding boxes in the original raster's pixel coordinates.

What changed in v1.2

This is a CUDA runtime release using the same FP32 weights and ONNX graph as v1.1. The ONNX backend now explicitly enables ONNX Runtime's CUDA execution provider and TF32. Postprocessing is vectorized with equivalent raster geometry. The source package verifies the CUDA provider, effective TF32 policy and placement of major compute operations. CUDA setup failures raise an error; the loader does not retry with a CPU-only session.

The architecture remains RT-DETRv2 rtdetrv2_r50vd_m, with 11 layout classes. There is no integer quantization or model retraining in this release. Both model.onnx (standard operators, opset 16) and FP32 model.safetensors are provided. Complete inference source is in inference/; attribution is in NOTICE.

CUDA requirements

Use Linux x86-64, Python 3.12 or 3.13, a supported NVIDIA GPU with TF32 capability (Ampere or newer), and a driver compatible with CUDA 12.8. The ONNX extra pins ONNX Runtime GPU 1.23.2 and includes CUDA/cuDNN Python dependencies. The tested configuration is RTX 5090, CUDA 12.8 and cuDNN 9.10.2.21. The ONNX path requires CUDA. backend="pytorch" remains an explicit CPU FP32 comparison path and does not provide the CUDA performance below.

Floating-point CUDA execution can produce small output differences between invocations or sessions. Outputs are not promised to be bitwise reproducible.

TF32 is an execution-provider setting. ONNX inputs and stored model weights remain FP32; downloading the ONNX file alone does not enable TF32.

Reference development results

The following aggregate results are from internal development validation, not an independent held-out acceptance test. These are measured results for one hardware/runtime configuration, not a latency guarantee.

Runtime configuration p50 ms/page p95 ms/page Serial pages/s AP AP50 AP70 AP90
Prior eager PyTorch FP32 reference 46.242 62.540 19.48 76.2382 90.9897 86.8844 55.8986
Optimized ONNX CUDA FP32 34.423 40.770 27.76 76.2384 90.9896 86.8844 55.8988
Optimized ONNX CUDA + TF32 25.792 32.395 35.91 76.2414 90.9891 86.8792 55.9025

AP uses all 11 classes on 6,489 development pages, with a 0.001 score floor for evaluation. The public prediction API uses a 0.30 score floor. Latency uses batch one, three counterbalanced passes of 100 pages after untimed startup samples. The timed region is decoded RGB to CPU box rows, including letterboxing, normalization, transfers, inference, validation and postprocessing; it excludes image-file decoding, IPC, initialization and evaluation. API serialization costs and host-load variation can change application latency. The measured p50 reduction is 44.2% versus the eager reference. Small AP differences do not establish an accuracy improvement.

On two additional financial-document development cohorts (256 and 100 pages), table AP changed by -0.0639 and +0.0730 points. The largest class AP decrease on the general development cohort was 0.0328 points. Corpus and per-page data are not included.

The tested graph placed convolutions, matrix multiplications, GridSample and Softmax on CUDA. Some shape/control and arithmetic nodes execute on CPU; this is not an all-GPU graph claim.

Release installation validation

A separate clean installation of the CUDA-only inference package, with no PyTorch installed, was evaluated on all 6,489 general development pages:

AP AP50 AP70 AP90
76.2396 90.9855 86.8767 55.9099

The same installation passed the predefined development quality margins on both financial-document cohorts. An additional 128-page API check verified preprocessing and exact postprocessing of the captured inference outputs. Independent CUDA invocations are not bitwise-equivalent; these checks do not claim cross-session raw-detection equivalence or independent acceptance.

Input and output

Supply one HWC uint8 RGB page raster. Preprocessing preserves aspect ratio, resizes the long edge to 1024, pads to 1024 x 1024 with white and normalizes to NCHW float32 in [0, 1], under rgb-letterbox-1024/1. The Python API applies score floor 0.30, removes reserved/invalid labels, reverses letterboxing and clips boxes to the original raster. Index 0 is reserved.

The JSON schema is ax-doclayout.detection/1, taxonomy ax-doclayout-11/1. Boxes use half-open pixel edges with top-left origin, x rightward and y downward. Raw ONNX inputs are images: float32 [N, 3, 1024, 1024] and orig_target_sizes: int64 [N, 2], [1024, 1024] per image. Raw outputs are labels, boxes (letterbox-space xyxy) and scores.

ID Label
1 caption
2 footnote
3 formula
4 list_item
5 page_footer
6 page_header
7 picture
8 section_header
9 table
10 text
11 title

Use and limitations

Validate the pinned release on representative pages before deployment. Boundary precision, very small regions and unusual document designs can need review. Confidence scores do not guarantee correctness. The model accepts page rasters; it does not open PDFs, perform OCR, extract text, predict reading order/hierarchy, or reconstruct table cells. Larger-batch throughput and other GPU/software configurations were not qualified by these results.

License

The weights and modified inference source are AGPL-3.0-only. Commercial use is permitted subject to the license terms. See LICENSE and NOTICE for terms, source-availability requirements and preserved Apache-2.0 component notices. This does not relicense previous releases. Complete inference source is supplied in inference/; datasets and the training pipeline are not distributed.

Installation and inference

Use the immutable source and weight revisions in the root README quick-start. Install the ONNX GPU extra and explicitly select backend="onnx" for CUDA TF32. An explicit CPU comparison is available through inference[torch] and backend="pytorch". The package verifies payload digests before inference.

Runtime reference: https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html

Quick start — CUDA + TF32

Requires supported Linux x86-64/NVIDIA CUDA setup and Python 3.12 or 3.13. Install the download helper, then the immutable inference source:

python -m pip install "huggingface-hub>=0.36,<2"
import subprocess
import sys
from huggingface_hub import snapshot_download

source = snapshot_download(
    "AutomatosX/AXDocLayout-M-v1.2",
    revision="1b4ed073124fddb0c8dce4f915b7b22aa9fab8ee",
    allow_patterns=["inference/**"],
    token=False,
)
subprocess.check_call([
    sys.executable, "-m", "pip", "install", source + "/inference[onnx]"
])

Run CUDA-powered layout detection:

import numpy as np
from PIL import Image
from ax_doclayout import AXDocLayout, PageImage

model = AXDocLayout.from_pretrained(
    "AutomatosX/AXDocLayout-M-v1.2",
    revision="7efd000fc7a1ef50ed7913835f2d8f10f30dc8e3",
    backend="onnx",  # v1.2: CUDAExecutionProvider with TF32 enabled
)
page = PageImage(
    rgb=np.asarray(Image.open("page.png").convert("RGB"), dtype=np.uint8),
    page_index=0,
)
result = model.predict(page)
print(result.to_json())

For the separate CPU PyTorch comparison, install inference[torch] and explicitly select backend="pytorch". The CUDA ONNX loader does not switch to this backend automatically.

Identity and Version

Repository
AutomatosX/AXDocLayout-M-v1.2
Publisher
AutomatosX
Task
Object detection
Modality
Image
Library
ax-doclayout
Parameters
37M parameters
Languages
Not stated by the source
Revision
dd37e2767cd4a266ad2d0ef9a6a49d45e8bd2d58
First published
2026-10-17
Last updated
2026-10-17

Files and Weights

34 files, 280.3 MB in total. The weights are 2 files totalling 280.0 MB in onnx, safetensors.

Weights2 files · 280.0 MB
Configuration22 files · 105.3 KB
Documentation7 files · 111.2 KB
Other2 files · 964 B
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.onnxWeights133.3 MB 2d5928719c39
model.safetensorsWeights146.8 MB 3b97ba1c0b1b
artifact-manifest.jsonConfiguration1.2 KB —
config.jsonConfiguration499 B —
inference/examples/predict_page.pyConfiguration2.4 KB —
inference/src/ax_doclayout/__init__.pyConfiguration2.2 KB —
inference/src/ax_doclayout/_cuda_onnx.pyConfiguration5.1 KB —
inference/src/ax_doclayout/_hub_pin.pyConfiguration1.6 KB —
inference/src/ax_doclayout/_local_onnx.pyConfiguration5.7 KB —
inference/src/ax_doclayout/_local_pytorch.pyConfiguration4.3 KB —
inference/src/ax_doclayout/_torch_rtdetrv2.pyConfiguration19.6 KB —
inference/src/ax_doclayout/artifact.pyConfiguration19.7 KB —
inference/src/ax_doclayout/cli.pyConfiguration2.7 KB —
inference/src/ax_doclayout/contract.pyConfiguration10.4 KB —
inference/src/ax_doclayout/errors.pyConfiguration1.2 KB —
inference/src/ax_doclayout/hub_release.pyConfiguration7.4 KB —
inference/src/ax_doclayout/local_detection.pyConfiguration2.1 KB —
inference/src/ax_doclayout/local_onnx.pyConfiguration728 B —
inference/src/ax_doclayout/model.pyConfiguration6.3 KB —
inference/src/ax_doclayout/postprocess.pyConfiguration4.7 KB —
inference/src/ax_doclayout/preprocess.pyConfiguration5.1 KB —
inference/src/ax_doclayout/taxonomy.pyConfiguration1.5 KB —
preprocessor_config.jsonConfiguration353 B —
taxonomy.jsonConfiguration405 B —
LICENSEDocumentation34.5 KB —
MODEL_CARD.mdDocumentation6.7 KB —
NOTICEDocumentation13.4 KB —
README.mdDocumentation8.0 KB —
inference/LICENSEDocumentation34.5 KB —
inference/NOTICEDocumentation13.4 KB —
inference/README.mdDocumentation718 B —
inference/pyproject.tomlOther964 B —
inference/src/ax_doclayout/py.typedOther —
.gitattributesRepository1.5 KB —

License and Download

License
agpl-3.0
Access
Open weights, no gate
Download size
280.0 MB
Download from AutomatosX

Released by AutomatosX through its official repository on Hugging Face. Read the license.

Memory Requirements

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

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

Questions About AXDocLayout-M-v1.2

How much GPU memory does AXDocLayout-M-v1.2 need?

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

What is the cheapest GPU to run AXDocLayout-M-v1.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 AXDocLayout-M-v1.2 commercially?

Yes, with conditions. AXDocLayout-M-v1.2 is released under GNU Affero General Public License 3.0. The AGPL 3.0 is a strong copyleft license. Commercial use is allowed, but a modified version made available to users over a network must be released with its source code under the same license.

Similar Models

Model · Object detection

rf-detr-large

Roboflow

RF-DETR is a real-time detection transformer family introduced in RF-DETR: Neural Architecture Search for Real-Time Detection Transformers by Robinson et al. and integrated in Transformers via PR #36895. RF-DETR is an end-to-end object detection model that combines ideas from LW-DETR and Deformable DETR: a DINOv2-with-registers style ViT backbone (with an RF-DETR windowing pattern for efficient attention), a multi-scale projector between encoder and decoder, and a multi-scale deformable DETR decoder for fast convergence and strong accuracy–latency tradeoffs. You can use the raw model for object detection. See the model hub to look for all available RF-DETR models. Here is how to use this…

Open weights apache-2.0 34M parameters transformers

Model · Object detection

PP-DocLayoutV3_safetensors

PaddlePaddle

Unified Layout Module for PaddleOCR-VL 1.5/1.6 & GLM-OCR & & Xiaomi-OCR-0. This is the model weights for PP-DocLayoutv3 in safetensors format. Get PaddlePaddle weights at PP-DocLayoutV3 PP-DocLayoutV3 is specifically engineered to handle non-planar document images. It can directly predict multi-point bounding boxes for layout elements—as opposed to standard two-point boxes—and determine logical reading orders for skewed and curved surfaces within a single forward pass, significantly reducing cascading errors. This model is an essential component of PaddleOCR-VL-1.5, providing crucial layout analysis for the high-precision parsing of various real-world documents in PaddleOCR-VL. This work…

Open weights apache-2.0 33M parameters transformers

Model · Object detection

deformable-detr

SenseTime

Deformable DEtection TRansformer (DETR) model trained end-to-end on COCO 2017 object detection (118k annotated images). It was introduced in the paper Deformable DETR: Deformable Transformers for End-to-End Object Detection by Zhu et al. and first released in this repository. Disclaimer: The team releasing Deformable DETR did not write a model card for this model so this model card has been written by the Hugging Face team. The DETR model is an encoder-decoder transformer with a convolutional backbone. Two heads are added on top of the decoder outputs in order to perform object detection: a linear layer for the class labels and a MLP (multi-layer perceptron) for the bounding boxes. The…

Open weights apache-2.0 40M parameters 1,024 tokens transformers

Model · Object detection

deformable-detr-DocLayNet

Aryn Inc.

Deformable DEtection TRansformer (DETR), trained on DocLayNet (including 80k annotated pages in 11 classes). You can use this model in the serverless Aryn Partitioning Service. You can get started here The DETR model is an encoder-decoder transformer with a convolutional backbone. Two heads are added on top of the decoder outputs in order to perform object detection: a linear layer for the class labels and a MLP (multi-layer perceptron) for the bounding boxes. The model uses so-called object queries to detect objects in an image. Each object query looks for a particular object in the image. For COCO, the number of object queries is set to 100. The model is trained using a "bipartite…

Open weights apache-2.0 41M parameters 1,024 tokens transformers

Model · Object detection

rf-detr-base

Roboflow

RF-DETR is a real-time detection transformer family introduced in RF-DETR: Neural Architecture Search for Real-Time Detection Transformers by Robinson et al. and integrated in Transformers via PR #36895. RF-DETR is an end-to-end object detection model that combines ideas from LW-DETR and Deformable DETR: a DINOv2-with-registers style ViT backbone (with an RF-DETR windowing pattern for efficient attention), a multi-scale projector between encoder and decoder, and a multi-scale deformable DETR decoder for fast convergence and strong accuracy–latency tradeoffs. You can use the raw model for object detection. See the model hub to look for all available RF-DETR models. Here is how to use this…

Open weights apache-2.0 32M parameters transformers