On this page

What is AIMET?

AIMET (AI Model Efficiency Toolkit) is an open-source Python library that quantizes trained PyTorch and ONNX models so they run faster and use less memory and power on edge devices such as phones, laptops, and cars, while keeping accuracy as close as possible to the original model.

How AIMET works A trained PyTorch or ONNX model goes through the AI Model Efficiency Toolkit and comes out as a smaller quantized model, which is deployed to devices such as cars, phones and IoT devices. Trained AI model PyTorch or ONNX AI Model Efficiency Toolkit Quantized AI model Deployed AI model

You give AIMET a trained floating-point model and a small amount of representative data. AIMET gives you back a quantized model, ready to compile and run on target hardware.

Why quantize?

Trained models usually store weights and compute activations in 32-bit floating point. Quantization represents them with fewer bits, for example 8-bit or 16-bit integers. Compared to 32-bit floating point, 8-bit weights take a quarter of the memory, and integer math runs faster and uses less power on hardware accelerators.

The cost is accuracy. Each value is rounded to a coarser grid, and that rounding error accumulates through the network. AIMET lets you measure that loss before you deploy and provides techniques to recover it, so you can choose the lowest precision your accuracy target allows.

How AIMET works

How AIMET fits into a deployment workflow A trained PyTorch or ONNX model goes into AIMET. AIMET simulates quantization, you evaluate the simulated model's accuracy, and if it is below target you apply improvement techniques (post-training quantization, mixed precision, quantization-aware training) and evaluate again. Once accuracy meets the target, AIMET exports an ONNX model with encodings, or an ONNX QDQ model, which you deploy with Qualcomm AI Hub, QAIRT, or ONNX Runtime. Trained model PyTorch or ONNX AIMET Simulate, measure and recover accuracy before you deploy 1 Simulate Insert quantizers, calibrate encodings 2 Evaluate Measure accuracy of the simulation target met 4 Export ONNX + encodings, or ONNX QDQ below target re-evaluate 3 Improve PTQ techniques Mixed precision QAT Deploy Qualcomm AI Hub QAIRT ONNX Runtime
  1. Simulate. AIMET wraps your model in a quantization simulation (QuantizationSimModel) that inserts quantizers on weights and activations. A short calibration pass over representative data, typically 500 to 1,000 samples, computes the quantization parameters (encodings).

  2. Evaluate. The simulated model runs on your CPU or GPU and behaves like the quantized model will on device. Run your existing evaluation pipeline on it to see the accuracy at the chosen precision.

  3. Improve. If accuracy falls short, apply AIMET’s techniques, then evaluate again:

  4. Export. AIMET exports the result as an ONNX model plus an encodings file, or as a single ONNX QDQ model with QuantizeLinear and DequantizeLinear nodes in the graph.

You then deploy the exported model with Qualcomm® AI Hub, the Qualcomm® AI Runtime (QAIRT) SDK, or ONNX Runtime.

For a step-by-step guide to picking precisions and techniques, see the quantization workflow.

What you can do with AIMET

Capability

What it gives you

Quantization simulation

Accuracy of the quantized model at any weight/activation precision (for example W8A8, W8A16, W4A16), measured on your own hardware before deployment.

Post-training quantization

Calibration plus accuracy-recovery techniques such as AdaRound, SeqMSE, AdaScale, and SpinQuant, using unlabeled data and no training.

Mixed precision

Per-layer precision chosen automatically (Lite-MP, AMP) or by hand, to balance accuracy and latency.

Blockwise quantization

Low-Power Blockwise Quantization (LPBQ) for 4-bit weights, used by large language models.

Analysis tools

Per-layer sensitivity reports that show which layers lose the most accuracy.

Quantization-aware training

Training with quantization in the loop, for models that need it (aimet-torch).

LLM quantization recipes

Tested end-to-end recipes for popular large language models, with accuracy results.

Choose a package

AIMET ships as two Python packages. Each one takes a model in its own framework’s format.

aimet-onnx

aimet-torch

Input model

ONNX model (onnx.ModelProto)

PyTorch model (torch.nn.Module)

Best for

Post-training quantization and fast experiments

Quantization-aware training, or staying in PyTorch

Unique features

Lite mixed precision, ONNX QDQ conversion of existing encodings

QAT, OmniQuant, batch norm re-estimation, model compression

Install

pip install aimet-onnx

pip install aimet-torch

Tip

Start with aimet-onnx. It has the fastest turnaround for calibration, mixed precision, and PTQ techniques. For a PyTorch model, export it to ONNX with torch.onnx.export first. Move to aimet-torch for QAT only if PTQ and mixed precision don’t meet your accuracy target.

Supported platforms

AIMET runs on Linux, Windows, and macOS with Python 3.10 or later (tested through 3.13). NVIDIA GPUs are optional and speed up calibration and optimization. Support varies by package and architecture; see Installation for the full matrix.

Next steps