Skip to main content

ESP-PPQ Quantization Tool

ESP-PPQ is a quantization tool based on PPQ, and its source code is fully open-sourced. Built upon PPQ, ESP-PPQ adds Espressif-customized quantizers and exporters, allowing users to select quantization rules compatible with ESP-DL for different chips and export standardized model files that can be directly loaded by ESP-DL. ESP-PPQ is fully compatible with all PPQ APIs and quantization scripts.

For more details on quantization principles, please refer to the PPQ documentation and videos. For instructions on using ESP-PPQ, see How to quantize model.

Installation (安装方法)

  1. Install CUDA from CUDA Toolkit

  2. Install Complier

apt-get install ninja-build # for debian/ubuntu user
yum install ninja-build # for redhat/centos user

For Windows User:

(1) Download ninja.exe from https://github.com/ninja-build/ninja/releases, add it to Windows PATH.

(2) Install Visual Studio 2019 from https://visualstudio.microsoft.com.

(3) Add your C++ compiler to Windows PATH Environment, if you are using Visual Studio, it should be like "C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86"

(4) Update PyTorch version to >=2.1.0.

  1. Install PPQ

Method 1: Install the package using pip

   pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
   pip install esp-ppq

Method 2: Install from source with pip to stay synchronized with the master branch

   git clone https://github.com/espressif/esp-ppq.git
   cd esp-ppq
   pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
   pip install -e .

Method 3: Install the package using uv

   uv pip install "esp-ppq[cpu]" --torch-backend=cpu
   # GPU
   # uv pip install "esp-ppq[cpu]" --torch-backend=cu124
   # AMD GPU
   # uv pip install "esp-ppq[cpu]" --torch-backend=rocm6.2
   # Intel XPU
   # uv pip install "esp-ppq[cpu]" --torch-backend=xpu

Method 4: Install from source using uv to stay in sync with the master branch

   git clone https://github.com/espressif/esp-ppq.git
   cd esp-ppq
   uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
   uv pip install -e .

Method 5: Use esp-ppq with docker:

docker build -t esp-ppq:your_tag https://github.com/espressif/esp-ppq.git

License

This project is distributed under the Apache License, Version 2.0.

Metadata

Release files for esp-ppq 1.3.12

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

Source distribution (sdist)

Source distribution for esp-ppq 1.3.12
File Size Uploaded Provenance Actions
esp_ppq-1.3.12.tar.gz 537.6 kB Without provenance Details for esp_ppq-1.3.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for esp-ppq 1.3.12
File Interpreter ABI Platform Actions
esp_ppq-1.3.12-py3-none-any.whl Python 3 none any Details for esp_ppq-1.3.12-py3-none-any.whl

Total release size: 1.3 MB

Release files / esp_ppq-1.3.12.tar.gz

Download URL esp_ppq-1.3.12.tar.gz
Size 537.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b3ac62a1982a8d93a48712f15c6edc09cff9c53a59bfef1c6a1c418230893bc8
BLAKE2b-256 checksum
How to use checksums
58bed3f17af5c95ddcbb7879b6123ff32057608f0e6c14ee782ce2ba743cb3c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / esp_ppq-1.3.12-py3-none-any.whl

Download URL esp_ppq-1.3.12-py3-none-any.whl
Size 723.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9f92103432147eb527b9075b8bd5acb7a3d75af027b19aadc7aea0f411c12bd
BLAKE2b-256 checksum
How to use checksums
dad2268d8c40b16ec25b0a7cb96dcedc6f4c02cacd08bdee0a135369d45cace6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for esp-ppq 1.3.12

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

1.3.12 This release

2 release files No provenance

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