shrinkvec report
glove-100. GloVe word vectors, 1.18M words (ann-benchmarks). PDDL (GloVe).
vectors 1,183,514dimensions 100metric cosinequeries 1,000k 10seed 42
Recommendation for recall@10 ≥ 0.95
tq-mse-3>tq-mse-8 keeps recall@10 at 0.986 with 42 bytes per vector to search (9.5x smaller than float32). The rerank reads more precise data for each candidate, so 146 bytes per vector stay stored; only the searched part has to be in memory. In Postgres: pg_turbovec.
Codec lab: what the codes can do
Every option scans all codes exactly, so recall reflects the compression itself, not an index. Ground truth is exact search in float64. Hollow markers rerank the best candidates with a more precise codec.
| pipeline | what it is | recall@10 | true top-10 in candidates | bytes/vector searched | bytes/vector stored | vs float32 | in Postgres |
|---|---|---|---|---|---|---|---|
float32 | Full precision (float32) | 1.000 | 400 | 400 | 1.0x | pgvector vector | |
halfvec | Half precision (float16) | 0.999 | 200 | 200 | 2.0x | pgvector halfvec | |
int8 | 8-bit scalar, per-dimension range | 0.981 | 100 | 100 | 4.0x | not in pgvector | |
tq-mse-4 | TurboQuant 4-bit (mse) | 0.855 ± 0.003 | 54 | 54 | 7.4x | pg_turbovec | |
tq-prod-4 | TurboQuant 4-bit (prod) | 0.631 ± 0.003 | 55 | 55 | 7.3x | pg_turbovec | |
tq-mse-3 | TurboQuant 3-bit (mse) | 0.737 ± 0.002 | 42 | 42 | 9.5x | pg_turbovec | |
tq-mse-2 | TurboQuant 2-bit (mse) | 0.539 ± 0.003 | 29 | 29 | 13.8x | pg_turbovec | |
rabitq-4 | RaBitQ 4-bit (extended) | 0.878 ± 0.001 | 72 | 72 | 5.6x | VectorChord vchordrq | |
rabitq-1 | RaBitQ 1-bit | 0.329 ± 0.003 | 24 | 24 | 16.7x | VectorChord vchordrq | |
binary | 1 sign bit per dimension, Hamming distance | 0.136 | 13 | 13 | 30.8x | pgvector binary_quantize | |
tq-mse-3>tq-mse-8 | TurboQuant 3-bit (mse), rerank top 100 with TurboQuant 8-bit (mse) | 0.986 ± 0.000 | 0.999 | 42 | 146 | 9.5x | pg_turbovec |
rabitq-1>float32 | RaBitQ 1-bit, rerank top 100 with Full precision (float32) | 0.736 ± 0.001 | 0.736 | 24 | 424 | 16.7x | VectorChord vchordrq |
binary>float32 | 1 sign bit per dimension, Hamming distance, rerank top 100 with Full precision (float32) | 0.348 | 0.348 | 13 | 413 | 30.8x | pgvector binary_quantize |
Reproduce
pip install 'shrinkvec[pg,datasets]'
shrinkvec lab --dataset glove-100 --repeats 3 --out docs/results/glove-100