Product quantisation budget arithmetic
NumericalBeginner⏱ 30 minRAGproduct quantisationcompressionmemorycodebook
Problem
For float32 vectors, documents:
- Compute the raw storage.
- Compute the storage with product quantisation at subvectors and bits each, and the compression ratio.
- Compute the number of representable points and the codebook size.
- Estimate the cost of one asymmetric distance computation.
Compute the requested quantities and say what they mean. A number without an interpretation is not an answer.
Solution
Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.
Related problems
All problems| Solved | Problem | Field | Type | Difficulty | Time |
|---|---|---|---|---|---|
| KV cache sizing with MHA and GQA | LLM Ops | Numerical | 30 min | ||
| Recall composes multiplicatively | RAG | Numerical | 15 min | ||
| When activations dominate | Fine-Tuning | Numerical | 30 min | ||
| When does attention dominate the MLP? | Deep Learning | Numerical | 30 min | ||
| Will this fine-tune fit? | Fine-Tuning | Numerical | 30 min |