Skip to main content

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 `

#### From Source

`bash git clone 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 install `

#### NGC Container

pytorch-quantization is preinstalled in NVIDIA NGC PyTorch container, e.g.

## Resources

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page