Instructions to use VAGOsolutions/SauerkrautLM-Multi-Reason-ModernColBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use VAGOsolutions/SauerkrautLM-Multi-Reason-ModernColBERT with sentence-transformers:
from pylate import models queries = [ "Which planet is known as the Red Planet?", "What is the largest planet in our solar system?", ] documents = [ ["Mars is the Red Planet.", "Venus is Earth's twin."], ["Jupiter is the largest planet.", "Saturn has rings."], ] model = models.ColBERT(model_name_or_path="VAGOsolutions/SauerkrautLM-Multi-Reason-ModernColBERT") queries_emb = model.encode(queries, is_query=True) docs_emb = model.encode(documents, is_query=False) - Notebooks
- Google Colab
- Kaggle
Add `do_query_expansion: false` to load without query expansion
Hello!
Heads up, this PR was AI-generated and human-reviewed.
Pull Request overview
- Add
"do_query_expansion": falsetoconfig_sentence_transformers.json, so the model loads without ColBERT-style[MASK]query expansion.
Details
When this model is loaded through PyLate or Sentence Transformers' MultiVectorEncoder, a ColBERT config with no explicit do_query_expansion flag defaults to query expansion being on. That pads every query out to query_length with [MASK] tokens. If the model was trained without query expansion, those never-trained expansion vectors dominate the MaxSim score for short queries and pull retrieval quality down.
Adding do_query_expansion: false restores the behavior the model was trained with. On the 13 NanoBEIR datasets (mean nDCG@10) this raises the mean score from 0.527 to 0.662.
The change is a single key in config_sentence_transformers.json, nothing else is touched. Happy to adjust the wording or approach if you had something else in mind.
- Tom Aarsen