Skip to main content

AXQuant

CI PyPI version Python versions License: MIT

The MXFP / NVFP toolkit: reproducible MXFP4, MXFP8 and NVFP4 model packs for MLX and CUDA.

AXQuant is an independent, MIT-licensed product from AutomatosX / DEFAI Digital. It allocates per-tensor precision, preserves sensitive model components, and binds the source, plan and output bytes to reproducible validation evidence. It does not train the source model or add capabilities.

We want AXQ model packs to be easy to produce, inspect and adopt across inference tools. Independent producers, runtime integrations and community forks are welcome. See AXQ formats and runtime targets for existing contracts, integration guidance and current limitations.

AXQuant writes exactly five storage formats and nothing else:

Backend Storage formats Runtime targets Support policy
MLX (Apple Silicon) MXFP4, MXFP8, BF16 MLX-LM, MTPLX, oMLX, AX Engine First-class compatibility targets where the runtime supports the model, physical format and requested features; each combination needs validation
CUDA (NVIDIA) NVFP4, BF16 vLLM as the primary target NVFP4 W4A16 and calibrated W4A4 development exports; qualification depends on the model, GPU, kernel and vLLM version

Affine integer storage (2/3/4/6/8-bit), AWQ/GPTQ/DWQ refined affine packing, FP8 and mixed budget lanes were removed in 3.0.0. Protection floors that used to be affine 8-bit are MXFP8. AXQuant still inspects and validates existing affine packs. See the 3.0 migration note.

AX Engine is optimized for AXQ on Apple Silicon. Portable model loading does not require AX Engine; its additional optimizations and performance claims need their own evidence. Runtime targets are a product commitment, not a claim that every model works in every runtime today.

The current development flagship is Qwen3.8-27B MXFP4 with default-on MTP. Its coding calibration study uses measured sensitivity, a matched storage budget, protected BF16 MTP weights, and separate task-quality and runtime validation.

Status: official toolkit release 3.0.0 (not a prerelease). The historical validated-toolkit pin is axquant[mlx]==1.8.1; new installations should use the current package. Neither install choice certifies a model. The 2.0 line opens the experimental native CUDA NVFP4 backend — RTN NVFP4 W4A16 exports plus an opt-in calibrated W4A4 path — alongside the MLX planning line and its joint weight/KV diagnostics (diagnose-joint, plan-joint) as development evidence. CUDA runtime and quality certification remain open. All per-pack certificate records were withdrawn on 2026-10-03 pending re-certification, so there is currently no certified pack revision on the live catalog; the certification index is the source of truth for what is certified today.

AXDocLayout RT-DETRv2 has a separate development storage exporter for NVFP4, MXFP4 and MXFP8, with FP32 reference execution.

Version 2.1 adds explicit oMLX/MTPLX runtime exports and manifest-bound compatibility checks for future MLX conversions. Unknown peer profiles fail closed; static format checks do not establish generation or certification. Install the toolkit with python -m pip install 'axquant[mlx]==3.0.0' when using these commands.

Install from PyPI, then convert. You do not need to clone this repository.

Who it is for

  • You ship or evaluate MLX models on Apple Silicon, or experimental CUDA models for vLLM, and need controlled precision allocation.
  • You need reproducible artifacts: pinned source, exact plan, measured BPW, checksums, and runtime metadata in every output.
  • You publish packs and want fail-closed gates between a development checkpoint and a public quality or speed claim.

The conversion workflow expects a supported checkpoint at the convertible tier or above. Training, GGUF export and arbitrary model-family conversion are outside this workflow. Inspection, planning and reporting work without MLX.

How it compares

Tool Strength What AXQuant adds
mlx_lm.convert Fast HF-to-MLX conversion, affine / MXFP recipes Architecture roles, hard protection floors, budget allocation, coverage checks, provenance-bound artifacts
MLX learned quants Dynamic per-layer bit selection, DWQ / AWQ / GPTQ MXFP-only per-tensor planning under policy, replayable artifact graph, governed claim labels
Community MLX scripts Speed of experimentation, broad coverage Reproducibility, completeness checks, refusal of ambiguous success
llama.cpp quantize GGUF breadth, cross-platform serving Native Apple/MLX packs, AX Engine metadata, MTP and multimodal sidecar protection

Design beliefs

  1. Open formats and independent adoption. MLX exports use public MLX packing; the CUDA exporter writes documented NVFP4 layouts for vLLM's compressed-tensors interface. AXQ adds precision policy and verifiable provenance. Format conformance and runtime execution are separate checks.
  2. Floors are constraints, not suggestions. Sensitive components are never sacrificed to hit a pretty BPW number; infeasible budgets adjust or refuse, with a record.
  3. Prior, measurement, and certification are different things. Architecture priors suit fast development; calibrated measurement supports allocation; only complete quality and hardware evidence supports a public claim.
  4. Success must be complete. Every module a plan claims to quantize must actually be processed by the backend — no silent fallback.
  5. Claims follow artifact identity. Quality, size, and speed claims belong to one source revision, one plan, one set of bytes, and one runtime and profile — never to a family by association.
  6. Certification aims at reproducibility, not universality. A single factory host class keeps comparisons honest; checkpoint (Tier 1) and MTP acceleration (Tier 2) claims stay separate.

Install

Python 3.11+. The MLX quick start below needs an Apple Silicon Mac and the mlx extra. For experimental CUDA conversion targeting vLLM, use the separate CUDA installation and conversion guide.

Always install into a virtual environment. A bare system-wide install fails with externally-managed-environment; do not pass --break-system-packages. Copy the block as a whole (plain ASCII quotes; single-quote the extra so zsh does not treat [mlx] as a glob):

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install 'axquant[mlx]'
axquant --help
Goal Command
Convert / analyze / evaluate (typical) python -m pip install 'axquant[mlx]' inside a venv
Inspect / plan / report only (no Metal) python -m pip install axquant inside a venv
Global CLI via Homebrew tooling brew install pipx && pipx install 'axquant[mlx]'

Wheels and checksums also ship on GitHub Releases.

Convert

Point quantize at a local BF16 Safetensors directory. --target-bpw defaults to 4.8. The result is a development checkpoint — good for trying the model locally, not a public quality or speed claim.

axquant quantize /path/to/model-bf16

Choose an MLX format

axquant --version
axquant formats --backend mlx
axquant quantize /path/to/model-bf16 --format mxfp4
axquant quantize /path/to/model-bf16 --format mxfp8

mxfp4 is an MXFP4 trunk with MXFP8 and BF16 protection floors; mxfp8 is an MXFP8 trunk. Storage follows allocation bits: 4-bit is MXFP4, 8-bit is MXFP8 (both group 32), 16-bit is BF16. Omitting --format keeps the mixed 4.8-BPW prior planner over the same three formats. Packs are named AX-<model>-MLX-AXQ-MXFP4, -MXFP4-attn8 (attention raised to MXFP8 after a measured study) or -MXFP8. Presets use architecture priors and remain development evidence. See format behavior and runtime coverage.

# Choose the bit budget and output folder
axquant quantize /path/to/model-bf16 --target-bpw 4.8 --output ./AXQuant-output

# Hugging Face id (downloads only when you pass --allow-download)
axquant quantize Qwen/Qwen3.6-27B --allow-download --revision COMMIT_SHA

# Confirm the family is convertible before spending the convert
axquant inspect --model /path/to/model-bf16 --output inventory.json

For a model and physical format supported by MLX-LM, load the output with:

python -m pip install -U mlx-lm
mlx_lm.generate --model ./AXQuant-output --prompt "Hello" --max-tokens 64 --temp 0.0

For MTPLX, oMLX and AX Engine, check the exact pack's runtime requirements in the runtime guide. Some models need a distinct runtime export. Text generation does not establish vision, audio or MTP support.

Prefer a ready-made pack? The live catalog is on AutomatosX on Hugging Face — packs, model cards, and certification status. This README deliberately does not mirror the pack list.

Conversion needs enough unified memory for the source model. Not every Hugging Face model is convertible: run axquant support-matrix and axquant support-policy for the registry-derived tier (certified / convertible / inspect-only) before beginning work.

How it works

BF16 Safetensors checkpoint (pin a revision for measured/release evidence)
                         |
                         v
        inspect -> plan -> convert -> runtime-check / validate
           |                |
           |                +-- mixed-precision MLX checkpoint
           |                    + plan, manifest, checksums, provenance
           |                    + AX Engine / MLX runtime metadata
           +-- inventory with protection boundaries

Most users only need Install and Convert. The staged journey (inspect → plan → convert → validate → publish) is for measured releases and public claims; see the certification operator guide.

Input and output

For the MLX workflow above, input is an unquantized Safetensors checkpoint of a family at the convertible tier or above, converted through the promoted public backend (MLX-LM for text, MLX-VLM / MLX-Audio with BF16-protected modality towers for vision and audio). A pinned source revision is mandatory for measured sensitivity and release evidence; an unpinned local source is permitted only for development.

Output: a portable MLX model directory with mixed-precision weights, the exact quantization plan, a checksum-bound artifact manifest recording authoritative parameters and measured BPW, runtime metadata for the supported runtimes, and byte-preserved MTP / modality sidecars unless an explicit validated transform is selected. The language-model output stays usable as a standard MLX checkpoint; AX Engine reads the extra metadata.

CUDA exports have separate versioned plans and manifests targeting vLLM; see CUDA NVFP4. MLX and CUDA packs have distinct physical layouts and are not interchangeable just because both use four-bit values. AXDocLayout uses a separate custom development storage format.

CLI workflow

Run axquant COMMAND --help for the full options of any command. The main entry points are quantize (one-command development conversion), inspect, analyze, plan, convert, and verify-cert (offline certificate check). The complete command table lives in the CLI reference.

Certification

The existing certification workflow is AX Engine-bound and separates checkpoint claims from acceleration claims. Making other runtimes first-class compatibility targets does not extend this frozen certification contract:

  • Tier 1 (checkpoint): size, matched quality, conversion integrity, and standard-runtime compatibility for one exact revision.
  • Tier 2 (MTP, scoped): greedy exactness plus token-weighted ≥1.20× and prompt-median ≥1.10× decode speedup on named authorizing workloads — measured evidence for that pack, engine build, and host only.

Official MLX conversion, Tier 1, and Tier 2 evidence are produced on one factory host class: Mac Studio, M2 Ultra, 192 GB unified memory. Records name the hardware spec, never a machine identity.

The rules are frozen in the Certification Spec v1.0; the verdicts live in docs/certifications/, including the full list of every record. A certificate never promotes a family by association.

Documentation

Index: docs/README.md.

I want to … Start with
Quantize a model Convert, then the CLI reference
Adopt AXQ or integrate a runtime AXQ formats and runtime targets, environment compatibility
Understand or verify an artifact Affine-U32 v1 contract, certification status
Operate certification Certification operator guide, Certification Spec v1.0
Contribute code Development, CONTRIBUTING.md, CI root causes

Product requirements, the architecture decision register, technical specifications, and the independent-implementation policy are maintained internally and are not published in this repository.

Development

CI splits surfaces on purpose: Ubuntu runs the non-MLX gate, macOS runs the MLX suite. Prefer the local CI mirror:

./scripts/ci-local.sh
.venv/bin/pytest
.venv/bin/ruff check .
.venv/bin/ruff format --check .
.venv/bin/mypy src

Tests use small synthetic Safetensors fixtures and do not require real model weights. See CONTRIBUTING.md.

Contributing

Developers are welcome to help build AXQuant and grow the AXQ ecosystem. Fork AXQuant, try a focused change, and open a pull request against main. First-time contributors and independent runtime or model-tool authors are welcome.

Useful starting points include documentation, reproducible bug reports, synthetic tests, CLI usability, MLX-LM / MTPLX / oMLX / AX Engine integrations, and vLLM compatibility. Many contributions need no Apple hardware, GPU or model downloads. Share the checks you can run; maintainers can help identify the additional evidence needed for hardware-specific work.

Read CONTRIBUTING.md for setup and the fork-to-PR workflow. Small fixes can go straight to a PR. For a new architecture, format or major API change, start a GitHub issue to agree on scope and validation. Draft PRs are welcome for early feedback.

License

AXQuant is released under the MIT License. Dependencies, model checkpoints, calibration datasets, and external tools retain their own licenses.

Metadata

Release files for axquant 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for axquant 3.0.0
File Size Uploaded Provenance Actions
axquant-3.0.0.tar.gz 2.3 MB With provenance Details for axquant-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for axquant 3.0.0
File Interpreter ABI Platform Actions
axquant-3.0.0-py3-none-any.whl Python 3 none any Details for axquant-3.0.0-py3-none-any.whl

Total release size: 3.2 MB

Release files / axquant-3.0.0.tar.gz

Download URL axquant-3.0.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4d088d07e9d4545fec1f04702814bfb7589c7aea28d8c55e6694ab14cea9ff8f
BLAKE2b-256 checksum
How to use checksums
d9e156bc1b7312fab9532aea600c6e94a10330d097a591c050030295528d5742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / axquant-3.0.0-py3-none-any.whl

Download URL axquant-3.0.0-py3-none-any.whl
Size 822.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac9c00c88ae8056cafdc948488aab8c40169ff6a3f54b72f9a4efc27d01e8e53
BLAKE2b-256 checksum
How to use checksums
3fc938cb8501f5396e7f0fd176379617d9d419dc9b8d8cb39f6e06cca7ea9005
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for axquant 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for axquant-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page