Object Detection
Safetensors
MLX
ax-doclayout-mlx
document-layout
apple-silicon
metal
axq
mxfp8
mixed-precision
Instructions to use AutomatosX/AXDocLayout-M-v1.2-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.2-MLX-AXQ-MXFP8 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download AutomatosX/AXDocLayout-M-v1.2-MLX-AXQ-MXFP8 --local-dir AXDocLayout-M-v1.2-MLX-AXQ-MXFP8
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download inference/src/ax_doclayout_mlx/errors.py from AutomatosX/AXDocLayout-M-v1.2-MLX-AXQ-MXFP8: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/AutomatosX/AXDocLayout-M-v1.2-MLX-AXQ-MXFP8/resolve/main/inference/src/ax_doclayout_mlx/errors.py
- Command line
-
hf download hf://AutomatosX/AXDocLayout-M-v1.2-MLX-AXQ-MXFP8/inference/src/ax_doclayout_mlx/errors.py
-
curl -L -o errors.py https://huggingface.co/AutomatosX/AXDocLayout-M-v1.2-MLX-AXQ-MXFP8/resolve/main/inference/src/ax_doclayout_mlx/errors.py
1.22 kB
| # Copyright 2026 AutomatosX | |
| # SPDX-License-Identifier: AGPL-3.0-only | |
| # Modified 2026-10-17 for v1.2; prior component notices are in NOTICE. | |
| """Public error types. Messages stay content-free.""" | |
| from __future__ import annotations | |
| class AXDocLayoutError(Exception): | |
| """Base error for the public contract.""" | |
| class InvalidPageImageError(AXDocLayoutError): | |
| """Page raster failed validation.""" | |
| class PdfRejectedError(AXDocLayoutError): | |
| """CLI and loaders reject PDF inputs.""" | |
| class UnsupportedBackendError(AXDocLayoutError): | |
| """Backend missing, unknown, or unavailable.""" | |
| class ArtifactError(AXDocLayoutError): | |
| """Artifact identity, digest, or files failed closed.""" | |
| class ArtifactUnavailableError(ArtifactError): | |
| """No published immutable artifact is available to load.""" | |
| class InvalidRevisionError(ArtifactError): | |
| """Hub revision is not a 40-character commit.""" | |
| class BackendUnavailableError(UnsupportedBackendError): | |
| """Requested inference backend is missing or unknown.""" | |
| class InferenceError(AXDocLayoutError): | |
| """A loaded backend could not execute page-raster inference.""" | |
| class TaxonomyError(AXDocLayoutError): | |
| """Unknown or reserved class identity.""" | |