/ Модель

Характеристики

Лицензия
Apache 2.0
Базовая модель
MiniLM-L6-v2
Опубликована
18 сен 2025

mdbr-leaf-ir-asym

ЭмбеддингиТекст → embedding6 профессий

Компактная модель MongoDB Research кодирует запросы в эмбеддинги для асимметричного информационного поиска и RAG.

0скачиваний за 30 дней5лайковвеса обновлены29 сен 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

mdbr-leaf-ir-asym — модель эмбеддингов текста для информационного поиска, разработанная командой MongoDB Research. Она предназначена для асимметричного кодирования запросов и документов в поисковых системах и конвейерах RAG: запросы кодируются этой компактной моделью, а документы — Snowflake/snowflake-arctic-embed-m-v1.5. В README указано, что модель основана на Microsoft MiniLM-L6-v2; размер семейства mdbr-leaf-ir составляет 23 млн параметров.

Векторы поддерживают усечение по MRL и квантование, включая int8 и binary, что позволяет экономить место при хранении. Для модели заявлены сильные результаты на BEIR, включая первое место среди компактных моделей до 100 млн параметров. Она предназначена для текстового поиска и выдаёт векторные представления; заявленный язык — английский. Лицензия Apache-2.0. MongoDB отмечает, что на момент публикации модель не использовалась в её коммерческих продуктах или сервисах.

Сценарии применения

  • поиск документов по пользовательскому запросу
  • поиск контекста для RAG-системы
  • кодирование поисковых запросов в векторы
  • сопоставление запросов с коллекцией документов
  • хранение поисковых эмбеддингов с усечением или квантованием

Ограничения

Модель ориентирована на информационный поиск; README рекомендует mdbr-leaf-mt для классификации, кластеризации и других задач. Для асимметричного режима документы кодируются отдельной более крупной моделью Snowflake Arctic Embed.

Для каких профессий подходит6

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Content

  1. Introduction
  2. Technical Report
  3. Highlights
  4. Benchmarks
  5. Quickstart
  6. Citation

Introduction

mdbr-leaf-ir-asym is a high-performance text embedding model specifically designed for information retrieval (IR) tasks, e.g., the retrieval stage of Retrieval-Augmented Generation (RAG) pipelines.

This model is the asymmetric variant of mdbr-leaf-ir, which uses MongoDB/mdbr-leaf-ir for queries and Snowflake/snowflake-arctic-embed-m-v1.5 for documents.

The model is robust to vector quantization and MRL truncation.

If you are looking to perform other tasks such as classification, clustering, semantic sentence similarity, summarization, please check out our mdbr-leaf-mt model.

[!Note]
Note: this model has been developed by the ML team of MongoDB Research. At the time of writing it is not used in any of MongoDB's commercial product or service offerings.

Technical Report

A technical report detailing our proposed LEAF training procedure is available here.

Highlights

  • State-of-the-Art Performance: mdbr-leaf-ir-asym achieves state-of-the-art results for compact embedding models, ranking #1 on the public BEIR benchmark leaderboard for models with ≤100M parameters.
  • Flexible Architecture Support: mdbr-leaf-ir-asym uses an asymmetric retrieval architecture enabling even greater retrieval results.
  • MRL and Quantization Support: embedding vectors generated by mdbr-leaf-ir-asym compress well when truncated (MRL) and can be stored using more efficient types like int8 and binary. See below for more information.

Benchmark Comparison

The table below shows the average BEIR benchmark scores (nDCG@10) for mdbr-leaf-ir-asym compared to other retrieval models.

mdbr-leaf-ir ranks #1 on the BEIR public leaderboard, and when run in asymmetric "(asym.)" mode, the results improve even further.

ModelSizeBEIR Avg. (nDCG@10)
OpenAI text-embedding-3-largeUnknown55.43
mdbr-leaf-ir (asym.)23M54.03
mdbr-leaf-ir23M53.55
snowflake-arctic-embed-s32M51.98
bge-small-en-v1.533M51.65
OpenAI text-embedding-3-smallUnknown51.08
granite-embedding-small-english-r247M50.87
snowflake-arctic-embed-xs23M50.15
e5-small-v233M49.04
SPLADE++110M48.88
MiniLM-L6-v223M41.95
BM25–41.14

Quickstart

Sentence Transformers

from sentence_transformers import SentenceTransformer  

# Load the model  
model = SentenceTransformer("MongoDB/mdbr-leaf-ir-asym")  

# Example queries and documents
queries = [
    "What is machine learning?", 
    "How does neural network training work?",
]

documents = [
    "Machine learning is a subset of artificial intelligence that focuses on algorithms that can learn from data.",
    "Neural networks are trained through backpropagation, adjusting weights to minimize prediction errors.",
]

# Encode queries and documents
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)

# Compute similarity scores
scores = model.similarity(query_embeddings, document_embeddings)

# Print results
for i, query in enumerate(queries):
    print(f"Query: {query}")
    for j, doc in enumerate(documents):
        print(f" Similarity: {scores[i, j]:.4f} | Document {j}: {doc[:80]}...")
Query: What is machine learning?
 Similarity: 0.6729 | Document 0: Machine learning is a subset of artificial intelligence that focuses on algorith...
 Similarity: 0.4472 | Document 1: Neural networks are trained through backpropagation, adjusting weights to minimi...

Query: How does neural network training work?
 Similarity: 0.4080 | Document 0: Machine learning is a subset of artificial intelligence that focuses on algorith...
 Similarity: 0.5477 | Document 1: Neural networks are trained through backpropagation, adjusting weights to minimi...

Transformers Usage

See full example notebook here.

Asymmetric Retrieval Setup

mdbr-leaf-ir is aligned to snowflake-arctic-embed-m-v1.5, the model it has been distilled from. This enables flexible architectures in which, for example, documents are encoded using the larger model, while queries can be encoded faster and more efficiently with the compact leaf model. This generally outperforms the symmetric setup in which both queries and documents are encoded with leaf.

To use exclusively the leaf model, use mdbr-leaf-ir.

MRL Truncation

Embeddings have been trained via MRL and can be truncated for more efficient storage:

query_embeds = model.encode_query(queries, truncate_dim=256)
doc_embeds = model.encode_document(documents, truncate_dim=256)

similarities = model.similarity(query_embeds, doc_embeds)

print('After MRL:')
print(f"* Embeddings dimension: {query_embeds.shape[1]}")
print(f"* Similarities:\n{similarities}")
* Embeddings dimension: 256
* Similarities:
tensor([[0.7027, 0.4943],
        [0.4388, 0.5820]])

Vector Quantization

Vector quantization, for example to int8 or binary, can be performed as follows:

Note: For vector quantization to types other than binary, we suggest performing a calibration to determine the optimal ranges, see here. Good initial values, according to the teacher model's documentation, are:

  • int8: -0.3 and +0.3
  • int4: -0.18 and +0.18
from sentence_transformers.quantization import quantize_embeddings
import torch

query_embeds = model.encode_query(queries)
doc_embeds = model.encode_document(documents)

# Quantize embeddings to int8 using -0.3 and +0.3 as calibration ranges
ranges = torch.tensor([[-0.3], [+0.3]]).expand(2, query_embeds.shape[1]).cpu().numpy()
query_embeds = quantize_embeddings(query_embeds, "int8", ranges=ranges)
doc_embeds = quantize_embeddings(doc_embeds, "int8", ranges=ranges)

# Calculate similarities; cast to int64 to avoid under/overflow
similarities = query_embeds.astype(int) @ doc_embeds.astype(int).T

print('After quantization:')
print(f"* Embeddings type: {query_embeds.dtype}")
print(f"* Similarities:\n{similarities}")
After quantization:
* Embeddings type: int8
* Similarities:
   [[115524  76757]
    [ 69887  94140]]

Evaluation

Please see here.

Citation

If you use this model in your work, please cite:

@misc{mdbr_leaf,
      title={LEAF: Knowledge Distillation of Text Embedding Models with Teacher-Aligned Representations}, 
      author={Robin Vujanic and Thomas Rueckstiess},
      year={2025},
      eprint={2509.12539},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      url={https://arxiv.org/abs/2509.12539}, 
}

License

This model is released under Apache 2.0 License.

Contact

For questions or issues, please open an issue or pull request. You can also contact the MongoDB ML research team at robin.vujanic@mongodb.com.

Acknowledgments

This model version was created by @tomaarsen - we thank him for his contribution to this project.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Ревизия весов
f0091bc

0 моделей