Back to Home Compare All 8-bit Quantization
🔢

IVF_SQ8 Index

Converts 32-bit floats to 8-bit integers · 75% less memory, minimal accuracy loss

SQ8 maps each 32-bit float to an 8-bit integer (0–255) using the global min/max range. 4x less memory per value, similarity is approximate but very close.

Formula: round( (v − min) ÷ (max − min) × 255 )
🎯

Query Vector

Editable
Quantized →

📏 Global Value Range

Min/max across ALL values, sets the 0–255 mapping scale.

Min: Max:

💾 Memory Comparison

Original (32-bit floats × 3)12 bytes
SQ8 (8-bit ints × 3)3 bytes (75% saved!)
🗃️

Stored Vectors

Edit any float. 8-bit integers and scores update instantly.

📊

Approximate Ranked Results

Live

Similarity computed using 8-bit quantized values.

💡 Key Idea

4 bytes → 1 byte per value. 75% memory saved, minimal accuracy loss.

✅ Best For

Large datasets needing 75% less RAM with near-original accuracy.

Scalar quantization shrinks memory. Converting 32-bit floats to 8-bit integers cuts storage by roughly 75%.
The accuracy loss is usually small, quantization introduces tiny rounding errors, but rankings stay close to the original.
Great option when you need to fit many more vectors in the same RAM and can tolerate a slight accuracy trade-off.
💡
Key Takeaway

IVF_SQ8 combines cluster search with 8-bit compression, cutting memory use by ~75% with only a minor accuracy loss.