Library / SDK
qualcomm/aimet avatar
qualcomm/aimet

AIMET: Quantization and Compression for PyTorch and ONNX Models

AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.

2,710 stars463 forksPythonNOASSERTION

At a glance

What is it?
AIMET is Qualcomm's toolkit for shrinking trained neural networks through INT8 quantization and model compression. It targets PyTorch and ONNX models, and its documentation leans heavily on post-training techniques that do not require retraining.
Who is it for?
AIMET is worth adopting if you have a trained PyTorch or ONNX model and need to reduce its memory footprint or run it on integer hardware, especially if you want to avoid a full retraining cycle. It is the wrong tool if your model is in TensorFlow, if you need documented ONNX support for every technique, or if you cannot work within the supported PyTorch versions.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The Problem AIMET Solves for Edge Deployment

Deploying a trained neural network on a phone or laptop runs into two hard limits: memory and compute. A 32-bit floating-point model is large, and floating-point inference is slower than integer inference. The README states that models run 5x-15x faster on the Qualcomm Hexagon DSP than on the Qualcomm Kyro CPU, and that 8-bit precision models have a 4x smaller footprint than 32-bit precision models. Those numbers describe the payoff of quantization, not a guarantee for any particular model.

The catch is accuracy. Converting weights and activations to INT8 introduces rounding error, and the README acknowledges that maintaining model accuracy when quantizing ML models is often challenging. AIMET exists to close that gap. It provides post-training quantization techniques that operate on an already-trained model, plus compression techniques that reduce parameter count. The intended user is an engineer who has a model that works in floating point and needs it to fit and run on constrained hardware without retraining from scratch.

How AIMET Fits Into a PyTorch or ONNX Pipeline

AIMET is a Python library that operates on models from two frameworks: PyTorch and ONNX. The README describes it as designed to work with both, and the feature table marks each technique with a checkmark or cross per framework. It is not a training framework and not a runtime. It sits between a trained model and a deployment target.

The mechanism is a pipeline of transformations. Calibration computes quantization parameters by running data through the model. AdaRound adjusts how quantized weights are rounded rather than using round-to-nearest. SeqMSE optimizes encodings layer by layer. BatchNorm Folding folds batch normalization into preceding layers to bridge the gap between simulation and on-target behavior. Cross Layer Equalization rescales weights to reduce range imbalance across layers. AdaScale learns per-weight scales through blockwise optimization, and SpinQuant reduces activation outliers via Hadamard rotations. Each technique is a separate call, and the README presents them as composable, with a recommended workflow for combining QAT with advanced PTQ techniques.

For compression, AIMET offers Spatial SVD, which splits a large layer into two smaller ones, Channel Pruning, which removes redundant input channels and reconstructs layer weights, and per-layer compression-ratio selection, which automatically decides how much to compress each layer. The visualization module lets you inspect weight ranges to judge whether a model is a candidate for Cross Layer Equalization and to see the effect after applying it.

Installing AIMET and Getting to a First Quantized Model

Two packages are published on PyPI: aimet-onnx and aimet-torch. The README points to a Quick Start page for the latest package. For a source build, it directs you to a Docker-based build guide, which suggests the source path is not a simple pip install from a checkout.

The practical entry point is installing the framework-specific package, for example pip install aimet-torch, then calling the techniques from your existing pipeline. The README states that AIMET provides user-friendly APIs that allow users to make calls directly from their PyTorch pipelines, so the intended integration is in-process rather than through a separate CLI. A typical sequence would be to load a trained model, apply one or more PTQ techniques, and export the quantized result.

What the README does not give is a complete code sample with function names and arguments. The feature table links to per-technique pages such as the AdaRound, SeqMSE, and SpinQuant guides, and those pages are where the actual API signatures live. If you are evaluating AIMET, the honest first step is reading the Quick Start and one technique page rather than assuming the README is sufficient.

Technique Coverage Is Not Uniform Across Frameworks

The feature table is the most useful part of the README because it exposes a real constraint. Most PTQ techniques are marked supported for both ONNX and PyTorch: Calibration, AdaRound, SeqMSE, BatchNorm Folding, Cross Layer Equalization, BatchNorm re-estimation, AdaScale, and SpinQuant. OmniQuant is the exception, marked with a cross for ONNX and a checkmark for PyTorch only.

That asymmetry matters if your model is in ONNX. You can still use the majority of the PTQ toolkit, but OmniQuant is off the table. The table does not explain why, and the README does not state whether ONNX support is planned. Treat the table as the authoritative scope document for what you can actually run on your framework, and check it against the specific release you install, since coverage can change between versions.

A second limitation is the framework boundary itself. AIMET supports ONNX and PyTorch. If your model is in TensorFlow or JAX, AIMET is not the tool for you unless you can convert to ONNX first, and the README does not describe a conversion path. That is a hard boundary, not a soft preference.

QAT Versus PTQ: Choosing the Right Path

AIMET supports Quantization Aware Training via aimet-torch, and the README recommends a specific workflow when you want to combine QAT with advanced PTQ techniques. The distinction is about cost. PTQ operates on a trained model and requires only calibration data, which makes it cheap to try. QAT requires fine-tuning the model with quantization simulated in the forward pass, which means training compute and access to a training pipeline.

The README frames AIMET as designed to automate optimization of neural networks, avoiding time-consuming and tedious manual tweaking. That automation is most visible in the PTQ path, where techniques like SeqMSE and per-layer compression-ratio selection make decisions that would otherwise require manual sweeps. The QAT path is more involved because you are back in a training loop.

A reasonable order of operations, based on the README's structure, is to start with PTQ techniques and only move to QAT if accuracy loss remains unacceptable. The README does not give a threshold for when to make that switch, so the decision rests on your own accuracy budget.

Where AIMET Is the Wrong Choice

The clearest failure mode is framework mismatch. If your deployment pipeline is built around a framework AIMET does not support, no amount of technique coverage helps. The README names PyTorch and ONNX only.

The second is technique mismatch. If OmniQuant is central to your quantization strategy and your model is in ONNX, AIMET's ONNX path will not cover you. You would need to either move to PyTorch or pick a different technique.

The third is a documentation gap. The README is a map, not a manual. It links out to technique pages and a Quick Start, and it does not include end-to-end code. If you need a copy-paste tutorial to get started, you will be reading the linked pages before you write anything. That is normal for a project of this scope, but it is worth knowing before you allocate time.

Finally, AIMET is a Qualcomm project and its headline performance example is on Qualcomm hardware. The README's 5x-15x figure is specific to the Hexagon DSP versus the Kyro CPU. If your target is a different accelerator, the techniques still apply, but the README does not offer performance expectations for your hardware.

Alternatives and How They Differ

The most direct alternative is to use the quantization tooling built into your training framework. PyTorch ships its own quantization APIs, and the difference in approach is scope. Framework-native quantization is tied to that framework's model representation and export path, and it tends to focus on the mechanics of converting a model to integer operations. AIMET's emphasis is different: it is a collection of accuracy-recovery techniques layered on top of quantization, such as AdaRound, SeqMSE, Cross Layer Equalization, and SpinQuant. The README positions these as the answer to the accuracy problem, not the conversion problem.

A second alternative is to use a deployment toolkit from your target hardware vendor. Those toolkits typically own the full path from model to compiled binary and may include their own calibration step. AIMET's difference is that it is framework-level and hardware-agnostic in its API surface, with Qualcomm hardware appearing as the motivating example rather than a requirement. The trade-off is that AIMET stops at the quantized model, and you still need a runtime to execute it.

The README points to Qualcomm AI Hub Models as a collection of models already quantized with AIMET. That is useful as a reference for what the output looks like, though it does not substitute for running the techniques on your own model.

Maintenance Cost and Licence Status

AIMET is actively released. The recent release list shows 2.39.0, 2.38.0, and 2.37.0 within roughly a month, which indicates a fast cadence. That cadence cuts both ways. You get current techniques, but you also need to track version compatibility, particularly the PyTorch version each aimet-torch release supports. The README does not state the supported PyTorch range in the excerpt available here, so that is something to confirm on the install page before pinning a version.

On licensing, the repository metadata reports NOASSERTION rather than a recognized SPDX identifier. That means the licence could not be automatically classified from the repository metadata. It does not mean there is no licence. Before using AIMET in a commercial product, read the actual licence file in the repository and, if the terms are unclear, get your own legal review. Nothing here should be read as legal advice.

The upgrade cost is mostly in API stability. Techniques are exposed as separate calls, and the README's recommended QAT-plus-PTQ workflow implies ordering matters. If you build a pipeline around several techniques, a version bump could change signatures or defaults. Pinning to a specific release and testing against it is the safer route than tracking develop.

Editorial conclusion

AIMET is worth adopting if you have a trained PyTorch or ONNX model and need to reduce its memory footprint or run it on integer hardware, especially if you want to avoid a full retraining cycle. It is the wrong tool if your model is in TensorFlow, if you need documented ONNX support for every technique, or if you cannot work within the supported PyTorch versions. Before committing, verify the supported PyTorch version for your target release, check whether your required technique is marked as supported for your framework, and confirm that your target deployment runtime can consume the exported quantized model.

Official sources

  1. Issues
  2. Project website
  3. qualcomm/aimet on GitHub
  4. README
  5. Releases
Community notes

Community notes