Metadata-Version: 2.1
Name: pytorch-quantization
Version: 2.1.0
Summary: NVIDIA Pytorch quantization toolkit
Home-page: https://github.com/nvidia/tensorrt/tools/pytorch-quantization
Author: NVIDIA
Author-email: nvidia@nvidia.com
License: Apache 2.0
Platform: UNKNOWN
Requires-Dist: numpy
Requires-Dist: absl-py (>=0.7.0)
Requires-Dist: scipy
Requires-Dist: sphinx-glpi-theme
Requires-Dist: prettytable
Requires-Dist: pyyaml

# 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 to an upcoming version of TensorRT.

## 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
python setup.py install
```

#### NGC Container

`pytorch-quantization` is preinstalled in NVIDIA NGC PyTorch container since 20.12, e.g. `nvcr.io/nvidian/pytorch:20.12-py3`

## Resources

* Pytorch Quantization Toolkit [userguide](https://tensorrt.gitlab-master-pages.nvidia.com/Tools/pytorch-quantization/)
* Quantization Basics [whitepaper](https://arxiv.org/abs/2004.09602)



