Instructions to use DataScience-UIBK/Reason-mxbai-colbert-v0.1-32m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use DataScience-UIBK/Reason-mxbai-colbert-v0.1-32m 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="DataScience-UIBK/Reason-mxbai-colbert-v0.1-32m") queries_emb = model.encode(queries, is_query=True) docs_emb = model.encode(documents, is_query=False) - Notebooks
- Google Colab
- Kaggle
Add Sentence Transformers usage
Hello!
As of Sentence Transformers v6.0.0, this checkpoint loads directly as a multi-vector (ColBERT-style late interaction) retriever through the new MultiVectorEncoder. This PR adds a Sentence Transformers usage section to the model card and the multi-vector tag. The weights and the existing usage are untouched. The example query keeps the instruction plus Query: format from your PyLate example.
from sentence_transformers import MultiVectorEncoder
model = MultiVectorEncoder("DataScience-UIBK/Reason-mxbai-colbert-v0.1-32m")
query = "Given a Psychology post, retrieve relevant passages that help answer the post.\nQuery: why do I procrastinate?"
documents = [
"Procrastination is often driven by difficulty regulating negative emotions around a task, not laziness, since delaying provides short term relief.",
"The hippocampus plays a central role in consolidating short term memories into long term storage.",
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings[0].shape)
# torch.Size([28, 128]) torch.Size([31, 128])
# MaxSim late-interaction scoring (higher is more relevant)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[25.2429, 24.4635]], device='cuda:0')
Verified against a PyLate reference: the snippet reproduces exactly, and the token embeddings match with per-token cosine similarity above 0.999 and matching MaxSim scores. For reference, loaded through this integration the model scores 0.6486 mean nDCG@10 on NanoBEIR.
- Tom Aarsen
Hello Tom,
Thank you for submitting this update. The integration of MultiVectorEncoder in Sentence Transformers v6.0.0 is a great addition, and we appreciate you ensuring our model card reflects this new capability.
Thank you also for sharing the NanoBEIR verification metrics.
This looks perfect—merging now.