lucidrains/vector-quantize-pytorch

Vector (and Scalar) Quantization, in Pytorch

61
/ 100
Established

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.

generative-ai image-synthesis audio-generation deep-learning-research data-quantization
No Package No Dependents
Maintenance 16 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 19 / 25

How are scores calculated?

Stars

3,878

Forks

320

Language

Python

License

MIT

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.