ai-edge-quantizer
A quantizer for advanced developers to quantize converted AI Edge models.
What it is and what it does
AI Edge Quantizer is a tool for converting unquantized LiteRT models into quantized versions optimized for edge device deployment. It targets advanced developers working with resource-constrained environments, particularly for GenAI and large language models. The package provides three quantization strategies: dynamic quantization (weights quantized, activations remain float, no calibration needed), weight-only quantization (reduced model size with float computation), and static quantization (both weights and activations quantized, requires calibration data). Users define quantization behavior through recipes that specify which operators to quantize, bit-widths, symmetry, and granularity settings.
The workflow is straightforward: instantiate a Quantizer with an input .tflite file, load a quantization recipe (either from built-in templates or custom-defined), then quantize and export. The package depends on numpy, scipy, absl-py for core functionality, plus Google's ai-edge-litert and litert-lm-builder for LiteRT model handling. It supports Python 3.10–3.13 on Linux and macOS, with active maintenance and nightly releases.
Use it for:
- Reduce model size and memory footprint for deployment on mobile and embedded devices without calibration data using dynamic quantization.
- Optimize inference latency on NPU hardware by applying static quantization with calibration on representative data.
- Selectively quantize specific operators or layers while keeping others in FP32 to balance quality and performance.
- Convert GenAI and large language models to 4-bit or 8-bit weight quantization for on-device inference.
- Experiment with mixed-precision quantization strategies to find the optimal trade-off between model size and accuracy.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Quantizes LiteRT models to reduce size and improve inference performance on edge devices, supporting dynamic, weight-only, and static quantization strategies with configurable recipes.
Yes, if you are quantizing LiteRT models for edge deployment. The package is actively maintained, has low install friction, carries a permissive license, and provides a clear API with multiple quantization strategies. No known vulnerabilities. Best suited for advanced developers; requires understanding of quantization trade-offs and model format requirements. Start with dynamic quantization recipes if you lack calibration data.
Install
ai-edge-quantizer on PyPI
pip
pip install ai-edge-quantizeruv
uv add ai-edge-quantizerpoetry
poetry add ai-edge-quantizerInstalling ai-edge-quantizer
Before you install
Low friction install with a pure-Python wheel. Active maintenance with recent releases and passing unit tests. Depends on established packages (numpy, scipy, absl-py) plus Google's ai-edge-litert and litert-lm-builder, which may require additional setup.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install ai-edge-quantizer
from ai_edge_quantizer import quantizer, recipe
qt = quantizer.Quantizer("path/to/input.tflite")
qt.load_quantization_recipe(recipe.dynamic_wi8_afp32())
qt.quantize().export_model("/path/to/output.tflite")
Requires Python 3.10 or later. Input model must be an unquantized FP32 LiteRT model in FlatBuffer format with .tflite extension. TensorFlow (tf-nightly) is listed as a dependency in the documentation.
Verify before relying
- Whether tf-nightly is an actual runtime dependency or only a build/development requirement
- Hardware compatibility details for each quantization strategy beyond the CPU/GPU vs NPU recommendation
- Performance benchmarks or typical latency/size improvements across different model types
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — absl-py, immutabledict, numpy, scipy, ml_dtypes, ai-edge-litert, litert-lm-builder |
| Maintenance | actively maintained — 32 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 169,674/month — #10,410 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ai_edge_quantizer-0.8.0-py3-none-any.whl
Keywords: On-Device ML, AI, Google, TFLite, Quantization, LLMs, GenAI
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
ai-edge-litertai-edge-litert runs machine learning models on…
permissive · top 15,000 on PyPI
optimum-quantoA PyTorch quantization backend that reduces…
permissive · top 15,000 on PyPI
ai-edge-litert-nightlyLiteRT is a runtime for running trained machine…
permissive · top 15,000 on PyPI
litert-converterConverts machine learning models to LiteRT…
permissive · top 15,000 on PyPI
tosa-adapter-model-explorerEnables visualization of TOSA neural network…
permissive · top 15,000 on PyPI
litert-torchConverts PyTorch models to .tflite format for…
permissive · top 15,000 on PyPI
diffqDiffQ performs differentiable quantization of…
noncommercial · top 15,000 on PyPI
ai-edge-model-explorerVisualizes and debugs machine learning model…
permissive · top 15,000 on PyPI
auto-gptqQuantizes large language models to lower…
permissive · top 15,000 on PyPI
qwixQwix is a JAX quantization library that applies…
permissive · top 15,000 on PyPI