💾
IVF_PQ Index
Compresses vectors into short codes · huge memory savings, slight accuracy trade-off
IVF_PQ compresses each vector into short codes using a codebook. Huge memory savings with slight accuracy trade-off, adjustable via compression level.
Flow:
📥 Vector
→
✂️ Split
→
📚 Quantize
→
🔢 Code
→
🏆 Approx Match
🎯
Query Vector
Editable🗜️
Compression Level
Memory used
50%
Original: 12 bytes
≈ 6 bytes
🗃️
Stored Vectors
Edit values · change compression · watch scores shift.
📊
Approximate Ranked Results
LiveSimilarity is computed using compressed vectors. Higher compression may change the ranking.
💡 Key Idea
Codebook replacement. only short codes stored. High compression = less memory, less accuracy.
✅ Best For
Large datasets with tight RAM budgets, edge devices, mobile.
🎓
Tips
3 tips
Product quantization compresses harder. Vectors are split into sub-vectors and each is replaced with a short code, saving far more memory than SQ8.
The trade-off is a slightly larger accuracy drop than IVF_SQ8, since compression is more aggressive.
IVF_PQ is popular for billion-scale datasets where memory is the biggest constraint.
💡
Key Takeaway
IVF_PQ compresses vectors into short codes, giving huge memory savings for very large datasets at the cost of a bit more accuracy.