Sentence Similarity
Safetensors
sentence-transformers
English
PyLate
modernbert
ColBERT
multi-vector
embeddings
retrieval
feature-extraction
Generated from Trainer
dataset_size:238998494
loss:CachedContrastive
Eval Results (legacy)
text-embeddings-inference
🇪🇺 Region: EU
Instructions to use lightonai/ColBERT-Zero-unsupervised-noprompts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use lightonai/ColBERT-Zero-unsupervised-noprompts 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="lightonai/ColBERT-Zero-unsupervised-noprompts") queries_emb = model.encode(queries, is_query=True) docs_emb = model.encode(documents, is_query=False) - Notebooks
- Google Colab
- Kaggle
Add Sentence Transformers usage
#1
by tomaarsen HF Staff - opened
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 usage section to the model card and the multi-vector tag. The weights and the existing files are untouched.
from sentence_transformers import MultiVectorEncoder
model = MultiVectorEncoder("lightonai/ColBERT-Zero-unsupervised-noprompts")
query = "What is the capital of France?"
documents = [
"Paris is the capital and largest city of France.",
"Berlin is the capital of Germany.",
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings[0].shape)
# torch.Size([10, 128]) torch.Size([12, 128])
# MaxSim late-interaction scoring (higher is more relevant)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[7.2047, 5.4773]], 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.6430 mean nDCG@10 on NanoBEIR.
- Tom Aarsen
tomaarsen changed pull request status to open
ameliechatelain changed pull request status to merged