Expand description
MaxSim scoring for ColBERT-style late interaction models.
MaxSim computes similarity between multi-vector embeddings by taking the maximum similarity for each query token across all document tokens:
MaxSim(Q, D) = sum_{q_i in Q} max_{d_j in D} (q_i · d_j)This module provides:
maxsim- Compute MaxSim score between two multi-vectorsmaxsim_batch- Compute MaxSim scores against multiple documentsMaxSimScorer- Reusable scorer with pre-computed query data- [
MaxSimScan] - Operator for multi-vector similarity search
Structs§
- MaxSim
Scorer - A reusable MaxSim scorer with pre-computed query data.
Functions§
- distance_
to_ maxsim - Convert a distance back to MaxSim score.
- maxsim
- Compute the MaxSim score between a query and document multi-vector.
- maxsim_
batch - Compute MaxSim scores between a query and multiple documents.
- maxsim_
cosine - Compute MaxSim with normalized vectors (for cosine-like similarity).
- maxsim_
to_ distance - Convert MaxSim score to a distance (lower is more similar).