lucidrains/vector-quantize-pytorch
Vector (and Scalar) Quantization, in Pytorch
This project helps researchers and machine learning engineers working on generative AI models to efficiently transform continuous data, like raw images or audio, into a discrete, compressed representation. You input high-dimensional feature maps (e.g., from an image encoder), and it outputs a quantized version of that data along with indices representing the closest codebook entries. This is for those building advanced generative models for tasks like image or music creation.
3,878 stars. Actively maintained with 3 commits in the last 30 days.
Use this if you are developing generative models and need to effectively quantize continuous data into a fixed set of codes, especially for applications like high-quality image or audio synthesis.
Not ideal if you are looking for a pre-trained model or a simple data compression tool without involvement in the underlying generative model architecture.
Stars
3,878
Forks
320
Language
Python
License
MIT
Category
Last pushed
Mar 26, 2026
Commits (30d)
3
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/lucidrains/vector-quantize-pytorch"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related frameworks
open-mmlab/mmengine
OpenMMLab Foundational Library for Training Deep Learning Models
Xilinx/brevitas
Brevitas: neural network quantization in PyTorch
google/qkeras
QKeras: a quantization deep learning library for Tensorflow Keras
fastmachinelearning/qonnx
QONNX: Arbitrary-Precision Quantized Neural Networks in ONNX
tensorflow/model-optimization
A toolkit to optimize ML models for deployment for Keras and TensorFlow, including quantization...