AQT (Accurate Quantized Training) is a Python software library designed for easy tensor operation quantization in JAX, providing excellent quantized int8 model quality without extensive manual tuning. It enables significant training speedup on modern ML accelerators and offers simple, flexible APIs suitable for both production and research. AQT focuses on quantizing tensor operations like matmul, einsum, and conv, without making assumptions about their use in neural networks, making it injectable into any JAX computation. It has been extensively tested with frameworks such as Flax, Pax, and MaxText at Google. The current version is 0.9.0, with a rapid release cadence for minor versions (monthly/bi-monthly).
pip install aqtpVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define a simple Multi-Layer Perceptron (MLP) using Flax, then apply 8-bit quantization using AQT's `aqt.jax.v2` API. It shows how to create an AQT configuration for `DotGeneral` operations and inject it into the neural network, allowing for quantized forward and backward passes. This example requires `jax` and `flax` to be installed.
Migrate code to use `import aqt.jax.v2 as aqt` and update API calls according to the latest documentation. Review the official GitHub repository for migration guides.
Always use `pip install aqtp` and verify the package description on PyPI matches 'Accurate Quantized Training library' to avoid installing an incorrect package.
Ensure your Python environment is version 3.10 or greater before installing `aqtp`.
Pin `aqtp` to specific versions in your `requirements.txt` or `pyproject.toml` to prevent unexpected breaking changes during updates.
Install the package using pip: 'pip install aqtp'.
Ensure you are importing the correct module or attribute from 'aqtp'.
Verify the correct usage and available functions in the 'aqtp' documentation.
Ensure you install the correct package `aqtp` using `pip install aqtp` and import it as `import aqt.jax.v2 as aqt` or `from aqt.jax.v2 import ...`.
Update `aqtp` to the latest version (`pip install --upgrade aqtp`) and ensure your JAX, JAXlib, and Flax installations are compatible with the latest `aqtp` release. You might need to pin specific versions of JAX/Flax if the issue persists.