Downloads · 30 days
0
stephantulkens/NIFE-gte-modernbert-base
NIFE-gte-modernbert-base is a machine learning model from stephantulkens. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a NIFE model finetuned from Alibaba-NLP/gte-modernbert-base. It is fully aligned with its base model Alibaba-NLP/gte-modernbert-base, and can be used to perform Inference Free querying using an index made by t…
Downloads · 30 days
0
Access
Public
Updated Nov 19, 2025
Parameters
76.8M
903 MB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors307 MB · 99%
From the Hugging Face model README
This is a NIFE model finetuned from Alibaba-NLP/gte-modernbert-base. It is fully aligned with its base model Alibaba-NLP/gte-modernbert-base, and can be used to perform Inference Free querying using an index made by this model. It can also be used in standalone mode.
SentenceTransformer(
(0): TrainableStaticEmbedding(
(embedding): EmbeddingBag(100003, 768, mode='mean')
)
(1): Normalize()
)
First install the NIFE library
pip install -U pynife
Then you can run the model as follows:
from nife import load_as_router
model = load_as_router("stephantulkens/NIFE-gte-modernbert-base")
query = "What is the capital of France?"
query_embeddings = model.encode_query(query)
# Five locales near France
index_doc = model.encode_document(["Paris is the largest city in France", "Lyon is pretty big", "Antwerp is really great, and in Belgium", "Berlin is pretty gloomy in winter", "France is a country in Europe"])
similarity = model.similarity(query_vec, index_doc)
print(similarity)
# It correctly retrieved the document containing the statement about paris.
# tensor([[0.7065, 0.5012, 0.3596, 0.2765, 0.6648]])
@software{Tulkens2025pyNIFE,
author = {St\'{e}phan Tulkens},
title = {pyNIFE: nearly inference free embeddings in python},
year = {2025},
publisher = {Zenodo},
doi = {10.5281/zenodo.17512919},
url = {https://github.com/stephantulkens/pynife},
license = {MIT},
}