Technology updates
Hugging Face Publishes Token Pooling-Aware Training for Compressed Multi-Vector Embeddings
A Hugging Face post shows how pooling-aware training in Sentence Transformers raises NanoBEIR nDCG@10 retention from 94.6% to 97.8% at a 4x document-vector reduction.
Hugging Face published a technical post on November 11, 2026, describing token pooling-aware training for multi-vector embedding models, together with a reproducible Sentence Transformers training script, a loss wrapper and evaluation results. Author Tom Aarsen frames the work as a way to retrieve better from the same storage budget when document vectors are merged.
Multi-vector retrieval models such as ColBERT keep a contextual vector for each document token and score with MaxSim, so different parts of a query can match different parts of a document. The cost adds up: the post estimates that even with Fast-PLAID 4-bit residual quantization, 200 vectors of 128 dimensions need about 12.8 KB per document, or 12.8 GB across a million documents. Pooling each document to 50 vectors would cut that to 3.2 GB.
Sentence Transformers now offers HierarchicalTokenPooling, which uses Ward hierarchical clustering to repeatedly merge the groups of similar token vectors whose combination increases spread the least, then represents each group by its mean and renormalizes. Three controls set the budget: pool_factor compresses proportionally; max_tokens caps vectors per document; distance_threshold applies a shared Ward merge threshold for adaptive pooling, which can be calibrated on a document sample to hit a target average vector count. By default the first token is protected and pooling applies only to document embeddings, leaving queries unchanged.
The central idea is a training change. MultiVectorTokenPoolingLoss wraps an existing multi-vector retrieval loss and applies it to both the unpooled representation and a roughly quarter-size pooled one in each batch, averaging the two losses so the encoder learns to arrange token embeddings such that useful matches survive merging. A straight-through estimator passes gradients from pooled vectors back to member tokens without differentiating the discrete cluster assignments. The author compares the principle to Matryoshka embeddings, which apply a retrieval objective at several embedding widths.
In the evaluation, two models start from ModernBERT-base with a fresh 128-dimensional projection and train one epoch on the same 120,000 MS MARCO triplets with identical settings; only the loss differs. On NanoBEIR@13, at pool_factor=4 the ordinary model reaches 49.03 mean nDCG@10 versus 51.23 for the pooling-aware model, while storing 74.8% fewer document vectors than unpooled retrieval; score retention rises from 94.6% to 97.8%, and unpooled retrieval also improves from 51.84 to 52.39. Gains carry over to fixed caps and calibrated thresholds: at an average of about 29.58 vectors per document, adaptive pooling keeps 97.3% of the pooling-aware model's unpooled score versus 93.3% for the ordinary model. The author notes no hyperparameter search was run.
On the engineering side, optional kernels accelerate MaxSim (requiring CUDA and Triton) and Ward clustering, which the author says runs roughly 30 to 150 times faster than SciPy on CUDA depending on settings. Training can run locally with uv or through Hugging Face Jobs on an A10G GPU with a four-hour limit, uploading the model to the Hub. For index size, the author suggests embedding quantization first, then token pooling, then Matryoshka token embeddings. These figures come from a single self-reported training setup rather than independent evaluation, and the work improves compression and training of existing encoders rather than launching a new base model.