Bbq
Source header: cuvs/preprocessing/quantize/bbq.h
C API for Better Binary Quantization datasets
cuvsBbqCodeLayout_t
Storage layout of BBQ/OSQ quantized component codes in each dataset row.
Values
cuvsBbqQuantizer
Better Binary Quantization (BBQ) is a vector-quantization approach used in Elasticsearch and Apache Lucene. It builds on ideas introduced in RaBitQ([Gao and Long](https://arxiv.org/pdf/2405.12497, Gao et al.): residual binary codes around a centroid, corrective factors, and efficient bitwise comparison of codes at different bit widths. Lucene implements this as optimized scalar quantization (OSQ) with packed and bit-plane layouts; Elasticsearch exposes it as BBQ.
BBQ in cuVS designed to be compatible with the Lucene/Elasticsearch dataset: a single shared centroid, no random rotation, and OSQ codes.
RaBitQ and BBQ in cuVS both compress centroid-relative vectors to low-bit codes and retain additional per-vector information so search is better than naïve sign-bit comparison. They differ in transformation and scale representation. RaBitQ commonly separates residual magnitude from direction, then applies a random orthogonal rotation before binary coding; BBQ uses per-vector scalar intervals to interpret the compressed residual codes.
Fields
cuvsBbqQuantizerCreateView
Create a BBQ quantizer view from caller-owned device tensors.
Tensors are not copied and must remain valid while a derived dataset is in use.
Parameters
Returns
cuvsBbqQuantizerDestroy
Destroy a BBQ quantizer without destroying its caller-owned tensors.
Parameters
Returns
cuvsDatasetMakeBbqView
Create a non-owning device BBQ dataset view.
Accepts one symmetric quantizer or two compatible asymmetric quantizers.
Parameters
Returns