Hugging Face Introduces Token Pooling-Aware Training Method
Hugging Face has developed a new training approach to improve retrieval quality, according to Hugging Face. This method helps preserve useful information when compressing document vectors.
Original reporting · huggingface.co
Original: “Token Pooling-Aware Training for Multi-Vector Embedding Models”
Read “Token Pooling-Aware Training for Multi-Vector Embedding Models” at Hugging Face →
How this was written. Content Memory wrote this article with a language model from Hugging Face’s reporting (model: @cf/meta/llama-3.3-70b-instruct-fp8-fast); it describes that reporting rather than adding to it. The original, linked above, is the full story.
Key points from Hugging Face’s report
- Hugging Face has developed a new training approach called pooling-aware training to improve retrieval quality.
- The technique teaches the encoder to preserve important information when its vectors are merged, helping improve retrieval quality at the same storage budget.
- Pooling-aware training builds on previous studies and has potential applications in search and information retrieval.
- Hugging Face's implementation, called HierarchicalTokenPooling, offers several controls for choosing a pooling budget.
- The technique has been demonstrated to be effective, with a retention of 97.8% of the original model's quality at the same storage budget.
Hugging Face reported that multi-vector embedding models are effective for search, but they can be storage-intensive. A large corpus can contain hundreds of millions of vectors, making storage a concern.
Token pooling is a technique used to reduce the size of these representations by combining similar token vectors. However, aggressive compression can lead to loss of useful information.
Hugging Face's new approach, called pooling-aware training, teaches the encoder to preserve important information when its vectors are merged. This helps improve retrieval quality at the same storage budget.
The technique builds on previous studies, including Stefan Josef's Learn to Pool and LightOn's pooling regularization study. Hugging Face's method focuses on understanding the approach and applying it with a Sentence Transformers example.
Multi-vector models, such as ColBERT, use a collection of contextual token vectors to represent documents. This allows different parts of a query to match different parts of a document, making them more expressive for search.
Token pooling works by grouping similar token embeddings using a hierarchical clustering method. The resulting groups are then represented by their mean, reducing the number of vectors needed to represent a document.
Hugging Face's implementation, called HierarchicalTokenPooling, offers several controls for choosing a pooling budget. These include setting a maximum number of vectors per document, a pool factor, or a distance threshold.
Adaptive pooling uses a shared distance threshold to calibrate the merging of similar embeddings. This approach can be used with any multi-vector model, including those trained without a pooling-aware objective.
Pooling-aware training improves retrieval quality by teaching the model to work with compressed representations. The training objective is applied to both the original and compressed document embeddings, helping the model learn to preserve useful information.
Hugging Face's example demonstrates the effectiveness of pooling-aware training, with a retention of 97.8% of the original model's quality at the same storage budget. The technique has potential applications in search and information retrieval.
The implementation is available in Sentence Transformers, making it easy to apply pooling-aware training to existing models. The code and models are also available for further research and development.
Questions and answers
What is token pooling?
Token pooling is a technique used to reduce the size of document vector representations by combining similar token vectors.
How does pooling-aware training work?
Pooling-aware training teaches the encoder to preserve important information when its vectors are merged, helping improve retrieval quality at the same storage budget.
What are the benefits of pooling-aware training?
Pooling-aware training improves retrieval quality by teaching the model to work with compressed representations, and has potential applications in search and information retrieval.

