Skip to main content

Module binary

Module binary 

Source
Expand description

Binary Quantization — 32x compression (1 bit per dimension).

Used for the Cold (Tier 2) tier. Encodes only the sign of each dimension and uses Hamming distance for comparison.

Functions§

decode_binary
Decode binary codes back to an approximate float vector.
encode_binary
Encode a float vector to binary: 1 bit per dimension (sign bit).
hamming_distance
Compute the Hamming distance between two binary-encoded vectors.