Feature Extraction
sentence-transformers
ONNX
Safetensors
Transformers
Transformers.js
English
bert
sentence-similarity
text-embeddings-inference
information-retrieval
knowledge-distillation
Instructions to use MongoDB/mdbr-leaf-mt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use MongoDB/mdbr-leaf-mt with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("MongoDB/mdbr-leaf-mt") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use MongoDB/mdbr-leaf-mt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="MongoDB/mdbr-leaf-mt")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("MongoDB/mdbr-leaf-mt") model = AutoModel.from_pretrained("MongoDB/mdbr-leaf-mt", device_map="auto") - Transformers.js
How to use MongoDB/mdbr-leaf-mt with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'MongoDB/mdbr-leaf-mt'); - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -286,14 +286,24 @@ Please [see here](https://huggingface.co/MongoDB/mdbr-leaf-mt/blob/main/evaluate
|
|
| 286 |
If you use this model in your work, please cite:
|
| 287 |
|
| 288 |
```bibtex
|
| 289 |
-
@
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 297 |
}
|
| 298 |
```
|
| 299 |
|
|
|
|
| 286 |
If you use this model in your work, please cite:
|
| 287 |
|
| 288 |
```bibtex
|
| 289 |
+
@inproceedings{vujanic-ruckstiess-2026-leaf,
|
| 290 |
+
title = "{LEAF}: Knowledge Distillation of Text Embedding Models with Teacher-Aligned Representations",
|
| 291 |
+
author = {Vujanic, Robin and
|
| 292 |
+
R{\"u}ckstie{\ss}, Thomas},
|
| 293 |
+
editor = "Liakata, Maria and
|
| 294 |
+
Moreira, Viviane P. and
|
| 295 |
+
Zhang, Jiajun and
|
| 296 |
+
Jurgens, David",
|
| 297 |
+
booktitle = "Proceedings of the 64th Annual Meeting of the {A}ssociation for {C}omputational {L}inguistics (Volume 1: Long Papers)",
|
| 298 |
+
month = jul,
|
| 299 |
+
year = "2026",
|
| 300 |
+
address = "San Diego, California, United States",
|
| 301 |
+
publisher = "Association for Computational Linguistics",
|
| 302 |
+
url = "https://aclanthology.org/2026.acl-long.2008/",
|
| 303 |
+
doi = "10.18653/v1/2026.acl-long.2008",
|
| 304 |
+
pages = "43362--43383",
|
| 305 |
+
ISBN = "979-8-89176-390-6",
|
| 306 |
+
abstract = "We present a knowledge distillation framework for text embedding models. A key distinguishing feature is that our distilled models are compatible with their teacher, enabling flexible asymmetric architectures where documents are encoded with the larger teacher model, while queries use smaller student models. We also show that our models automatically inherit MRL and robustness to output quantization whenever these properties are present in the teacher model, without explicitly training for them. To demonstrate the effectiveness of our framework we publish leaf-ir, a 23M parameters information retrieval oriented model that, besides being teacher-compatibile, sets a new state-of-the-art (SOTA) on BEIR, ranking no.1 on the public leaderboard for models of its size. Asymmetric mode further increases its retrieval performance. Our scheme is however not restricted to information retrieval. We demonstrate its wider applicability by synthesizing the multi-task leaf-mt model. This also sets a new SOTA, achieving no.1 on the public MTEB v2 (English) leaderboard for models of its size. Our technique is applicable to black-box models, requires no judgments nor hard negatives, and training can be conducted using small batch sizes. Thus, dataset and training infrastructure requirements for our framework are modest. We make our models publicly available under a permissive Apache 2.0 license."
|
| 307 |
}
|
| 308 |
```
|
| 309 |
|