Xilinx/brevitas
Brevitas: neural network quantization in PyTorch
What it solves
Brevitas is designed to reduce the memory and computational requirements of neural networks through quantization. It provides tools to convert high-precision floating-point models into lower-precision formats, making them more efficient for deployment on hardware.
How it works
It is a PyTorch library that implements quantized versions of common deep learning layers (such as QuantConv2d, QuantLSTM, and QuantMultiheadAttention). It supports two primary methods of quantization:
- Post-Training Quantization (PTQ): Quantizing a model after it has already been trained.
- Quantization-Aware Training (QAT): Incorporating quantization effects during the training process to maintain accuracy.
Users can individually tune quantization settings for different tensors, including inputs, weights, bias, and outputs, adjusting parameters like bit-width and scale granularity.
Who it’s for
This library is intended for researchers and developers working on neural network optimization and deployment, specifically those using PyTorch.
Highlights
- Support for both PTQ and QAT workflows.
- Quantized implementations of standard PyTorch layers (Conv1d/2d, RNN, LSTM, MultiheadAttention).
- Granular control over quantization settings for weights and activations.
- Compatible with Windows, Linux, and macOS.
相关
- 项目
- 项目
- 项目
- 项目
- 项目