NVIDIA Pytorch quantization toolkit
Project description
# Pytorch Quantization
PyTorch-Quantization is a toolkit for training and evaluating PyTorch models with simulated quantization. Quantization can be added to the model automatically, or manually, allowing the model to be tuned for accuracy and performance. Quantization is compatible with NVIDIAs high performance integer kernels which leverage integer Tensor Cores. The quantized model can be exported to ONNX and imported by TensorRT 8.0 and later.
## Install
#### Binaries
`bash pip install pytorch-quantization --extra-index-url https://pypi.ngc.nvidia.com `
#### From Source
`bash git clone https://github.com/NVIDIA/TensorRT.git cd tools/pytorch-quantization `
Install PyTorch and prerequisites `bash pip install -r requirements.txt # for CUDA 10.2 users pip install torch>=1.9.1 # for CUDA 11.1 users pip install torch>=1.9.1+cu111 `
Build and install pytorch-quantization `bash # Python version >= 3.7, GCC version >= 5.4 required python setup.py install `
#### NGC Container
pytorch-quantization is preinstalled in NVIDIA NGC PyTorch container, e.g. nvcr.io/nvidia/pytorch:22.12-py3
## Resources
Pytorch Quantization Toolkit [userguide](https://docs.nvidia.com/deeplearning/tensorrt/pytorch-quantization-toolkit/docs/userguide.html)
Quantization Basics [whitepaper](https://arxiv.org/abs/2004.09602)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytorch-quantization-2.1.3.tar.gz
.
File metadata
- Download URL: pytorch-quantization-2.1.3.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65322994be4555c9eb91a5b9de5dd3bc56a936a385d6d902e5816035f259dc52 |
|
MD5 | 9731a648cad0df91b4915ff3ed735f43 |
|
BLAKE2b-256 | 6ae7a781111ae7de26df1bbc157b7124dfca028412f7f62f6081b894e433d53f |
File details
Details for the file pytorch_quantization-2.1.3-py3-none-any.whl
.
File metadata
- Download URL: pytorch_quantization-2.1.3-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9896a399f662482eb02202da753a38047f5b58b52b11aaf5c462acc20cdba59 |
|
MD5 | 36256dd576201109c1d000198ac31feb |
|
BLAKE2b-256 | 53a8351e8fb2779e494039e6bfd8dbd0c4b6a2df2cdf0851905cebe517e2e577 |