We built a vector search engine that lets you choose precision at query time (clickhouse.com)

🤖 AI Summary
ClickHouse added QBit, a new column type that stores floating-point embeddings as bit planes so you can pick precision at query time. Instead of permanently quantising vectors or keeping separate low-precision copies, QBit transposes each float into groups of bit-planes (one group per bit position) stored as FixedString subcolumns. At query time ClickHouse reads only the top N bit-planes you request (e.g., reading 16 of 64 bits), reconstructs truncated values and computes distances with functions like L2DistanceTransposed. That lets you explore the precision vs. throughput trade-off on the fly—faster, lower-I/O searches at reduced precision—without changing stored data. Technically, QBit preserves original data layout while enabling selective I/O: reading 16/64 Float64 planes skips 75% of stored bits, cutting disk reads and CPU unpacking. It remains a brute-force (O(n)) method—so HNSW indexes are still faster when they fit in RAM—but QBit avoids duplicated storage and irreversible downcasting required by traditional quantisation and reduces HNSW’s memory pressure when used instead of building a large in-memory index. ClickHouse also optimises computation by downcasting the query vector in compatible cases (e.g., treating top 16 Float32 bits as BFloat16), while noting Float64→Float32 conversions require full IEEE-754 rounding. QBit is useful for RAG, recommendations and any workload that benefits from flexible, cost-aware vector retrieval.
Loading comments...
loading comments...