Skip to main content

Module sparse_vector

Module sparse_vector 

Source
Expand description

Sparse vector type for learned sparse retrieval (SPLADE, SPLADE++).

Internal representation: sorted Vec<(u32, f32)> — (dimension_index, weight). Only nonzero entries stored — storage proportional to nnz, not total dimensions.

Structs§

SparseVector
A sparse vector: a set of (dimension_index, weight) pairs.

Enums§

SparseVectorError
Errors from sparse vector construction or parsing.