Instructions to use AutomatosX/AXDocLayout-M-v1.3-MLX-AXQ-MXFP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AutomatosX/AXDocLayout-M-v1.3-MLX-AXQ-MXFP8 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download AutomatosX/AXDocLayout-M-v1.3-MLX-AXQ-MXFP8 --local-dir AXDocLayout-M-v1.3-MLX-AXQ-MXFP8
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
AXDocLayout-M v1.3 — MLX AXQ MXFP8
This is a model-specific MLX Metal bundle derived from the FP32 AXDocLayout-M v1.3 CUDA/TF32 source. It detects document layout regions from decoded RGB page images. It does not open PDFs, perform OCR, extract text, predict reading order, or reconstruct table cells.
Precision and storage
The bundle stores 41 linear weight tensors as native MLX MXFP8 with group size 32. It stores 101 convolution weight tensors in FP16. Normalization tensors and sensitive class, box, and query-position projections remain FP32; other state keeps its source dtype. Activations remain floating point. There is no activation-FP8 or INT8 claim.
The checkpoint is 70,856,664 bytes, about 52% smaller than the 146,766,504-byte FP32 source. The bundled inference graph follows the v1.2 model-specific MLX implementation and executes the first three decoder layers; retained later decoder state remains in the checkpoint.
This is a development model. The source model's CUDA/TF32 evaluation results do not transfer to this MXFP8 bundle. No labeled quality evaluation or matched latency measurement was run for this release. No accuracy parity, speed improvement, or certification is claimed.
Runtime requirements
Requires Apple Silicon macOS with Metal, Python 3.12 or 3.13, MLX 0.32.4,
NumPy, Pillow, Safetensors, and Hugging Face Hub. The included
ax-doclayout-mlx package is the model-specific inference implementation.
It is separate from the CUDA/ONNX source package. AX Engine support is not
provided for this model-specific bundle.
Validation
The pinned v1.3 source contains 823 tensors. All tensor names and shapes match the admitted v1.2 MLX runtime layout. The local bundle loaded on the factory Mac Studio M2 Ultra with MLX 0.32.4 and returned finite, contract-valid detections for deterministic synthetic blank, text, and table pages.
| Synthetic input | MLX MXFP8 detections | FP32 CPU source detections |
|---|---|---|
| Blank | 0 | 0 |
| Text | 20 | 18 |
| Table | 2 | 2 |
The text-page count differs from the FP32 source. These synthetic checks are functional smokes, not a labeled accuracy evaluation.
Immutable source revisions
Source model: AutomatosX/AXDocLayout-M-v1.3-CUDA-TF32, weight commit
d2725e733fa857100fe75781715276cee4e5a84f. Source weight SHA-256:
8d24656f17eaea2dd8c399b19c21b1a19730d266e45f4a70b36fc9220540cb26.
The model files are bound to weight commit
4360bf298a8dc5bf855114ffc3f69a9feb25aaf8. The included inference source
is pinned at commit 90451b69a003add2b138d68a47a118cc8313030c.
Install and run
Install the model-specific inference source from its immutable commit:
import subprocess
import sys
from huggingface_hub import snapshot_download
repo = "AutomatosX/AXDocLayout-M-v1.3-MLX-AXQ-MXFP8"
source_revision = "90451b69a003add2b138d68a47a118cc8313030c"
source = snapshot_download(
repo,
revision=source_revision,
allow_patterns=["inference/**"],
token=False,
)
subprocess.check_call([
sys.executable, "-m", "pip", "install", source + "/inference"
])
Load the immutable checkpoint and detect regions on one decoded RGB page:
import numpy as np
from PIL import Image
from ax_doclayout_mlx import PageImage, load_model
model = load_model(revision="4360bf298a8dc5bf855114ffc3f69a9feb25aaf8")
with Image.open("page.png") as image:
rgb = np.asarray(image.convert("RGB"), dtype=np.uint8)
result = model.predict(PageImage(rgb=rgb, page_index=0))
print(result.to_json())
The output uses the ax-doclayout.detection/1 schema with original-raster
coordinates and the 11 public layout classes. The model accepts page rasters,
not PDF documents.
License and attribution
Weights and derivative inference source are AGPL-3.0-only. See
LICENSE and NOTICE for the terms and preserved third-party notices.
No training data or training code is included.
- Downloads last month
- -
Quantized
Model tree for AutomatosX/AXDocLayout-M-v1.3-MLX-AXQ-MXFP8
Base model
AutomatosX/AXDocLayout-M-v1.3-CUDA-TF32