tqvector
turboquant-pro · Compressed vector type with quantization and distance functions
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102010 | tqvector | turboquant-pro | 0.1.0 | RAG | MIT | Rust |
PostgreSQL · 14, 15, 16, 17
Usage
Sources:
tqvector 0.1.0 is a Rust component of TurboQuant Pro that stores scalar-quantized embeddings. It declares PostgreSQL 14–17 build features and uses no Python runtime. The control declares superuser=false, but the install script creates native C types/functions requiring elevated privileges. No shared preload is declared.
Core workflow
Operations and limits
tq_compress accepts 2, 3 or 4 bits; tq_decompress reconstructs an approximate float array. Inspect values with tq_dim, tq_bits, tq_norm, tq_ratio and tq_size_bytes. tq_cosine_sim and tq_cosine_dist compare equal-dimensional vectors; <=> is cosine distance and <-> is Euclidean distance. Quantization is lossy, so validate retrieval quality on your own data.
The installed SQL defines distance operators, not an index access method. Ordering by distance therefore does not itself create an ANN index. Treat table/column names passed to tq_bulk_compress as trusted administrative input. The optional GPU build feature is separate from the basic SQL workflow.