Model reference · open weights
GTE-ModernColBERT is an open-weight embedding model from lightonai. GTE-ModernColBERT-v1 (FP32) weighs 298 MB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the lightonai/GTE-ModernColBERT-v1 model card, 2026-10-01
What it is
| Released by | lightonai |
|---|---|
| Released | 2025-04-30 |
| Parameters | 149M |
| VRAM | 298 MB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
This is a multi-vector (ColBERT-style late interaction) embedding model trained on the ms-marco-en-bge-gemma dataset. It maps sentences & paragraphs to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
GTE-ModernColBERT has been trained with knowledge distillation on MS MARCO with a document length of 300 tokens, explaining its default value for documents length.
However, as illustrated in the ModernBERT paper, ColBERT models can generalize to documents lengths way beyond their training length and GTE-ModernColBERT actually yields results way above SOTA in long-context embedding benchmarks, see LongEmbed results.
Simply change adapt the document length parameter to your needs when loading the model:
model = models.ColBERT(
model_name_or_path=lightonai/GTE-ModernColBERT-v1,
document_length=8192,
)
ModernBERT itself has only been trained on 8K context length, but it seems that GTE-ModernColBERT can generalize to even bigger context sizes, though it is not guaranteed so please perform your own benches!
ColBERT(
(0): Transformer({'max_seq_length': 299, 'do_lower_case': False}) with Transformer model: ModernBertModel
(1): Dense({'in_features': 768, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
)
This model can be used with Sentence Transformers as a multi-vector (ColBERT-style late interaction) retriever via the MultiVectorEncoder:
pip install "sentence-transformers>=6.0.0"
from sentence_transformers import MultiVectorEncoder
model = MultiVectorEncoder("lightonai/GTE-ModernColBERT-v1")
query = "Which planet is known as the Red Planet?"
documents = [
"Venus is often called Earth's twin because of its similar size and proximity.",
"Mars, known for its reddish appearance, is often referred to as the Red Planet.",
"Jupiter, the largest planet in our solar system, has a prominent red spot.",
"Saturn, famous for its rings, is sometimes mistaken for the Red Planet.",
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings[0].shape)
# (12, 128) (18, 128)
# MaxSim late-interaction scoring (higher is more relevant)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[11.2577, 11.5113, 11.3457, 11.4518]])
First install the PyLate library:
pip install -U pylate
PyLate provides a streamlined interface to index and retrieve documents using ColBERT models. The index leverages the Voyager HNSW index to efficiently handle document embeddings and enable fast retrieval.
First, load the ColBERT model and initialize the Voyager index, then encode and index your documents:
from pylate import indexes, models, retrieve
# Step 1: Load the ColBERT model
model = models.ColBERT(
model_name_or_path=pylate_model_id,
)
# Step 2: Initialize the Voyager index
index = indexes.Voyager(
index_folder="pylate-index",
index_name="index",
override=True, # This overwrites the existing index if any
)
# Step 3: Encode the documents
documents_ids = ["1", "2", "3"]
documents = ["document 1 text", "document 2 text", "document 3 text"]
documents_embeddings = model.encode(
documents,
batch_size=32,
is_query=False, # Ensure that it is set to False to indicate that these are documents, not queries
show_progress_bar=True,
)
# Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
index.add_documents(
documents_ids=documents_ids,
documents_embeddings=documents_embeddings,
)
Note that you do not have to recreate the index and encode the documents every time. Once you have created an index and added the documents, you can re-use the index later by loading it:
# To load an index, simply instantiate it with the correct folder/name and without overriding it
index = indexes.Voyager(
index_folder="pylate-index",
index_name="index",
)
Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries. To do so, initialize the ColBERT retriever with the index you want to search in, encode the queries and then retrieve the top-k documents to get the top matches ids and relevance scores:
# Step 1: Initialize the ColBERT retriever
retriever = retrieve.ColBERT(index=index)
# Step 2: Encode the queries
queries_embeddings = model.encode(
["query for document 3", "query for document 1"],
batch_size=32,
is_query=True, # # Ensure that it is set to False to indicate that these are queries
show_progress_bar=True,
)
# Step 3: Retrieve top-k documents
scores = retriever.retrieve(
queries_Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Accuracy@1 | 0.360 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Accuracy@3 | 0.620 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Accuracy@5 | 0.780 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Accuracy@10 | 0.860 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Precision@1 | 0.360 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Precision@3 | 0.233 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Precision@5 | 0.208 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Precision@10 | 0.128 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Recall@1 | 0.183 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Recall@3 | 0.289 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Recall@5 | 0.416 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Recall@10 | 0.496 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Ndcg@10 | 0.415 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Mrr@10 | 0.527 |
| Py Late Information Retrieval | NanoClimateFEVER | Maxsim Map@100 | 0.335 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Accuracy@1 | 0.880 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Accuracy@3 | 0.940 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Accuracy@5 | 0.960 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Accuracy@10 | 0.980 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Precision@1 | 0.880 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Precision@3 | 0.713 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Precision@5 | 0.656 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Precision@10 | 0.572 |
| Py Late Information Retrieval | NanoDBPedia | Maxsim Recall@1 | 0.118 |