Sentence Similarity
sentence-transformers
ONNX
Safetensors
Transformers
Transformers.js
English
bert
feature-extraction
text-embeddings-inference
information-retrieval
knowledge-distillation
Instructions to use MongoDB/mdbr-leaf-ir with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use MongoDB/mdbr-leaf-ir with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("MongoDB/mdbr-leaf-ir") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use MongoDB/mdbr-leaf-ir with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("MongoDB/mdbr-leaf-ir") model = AutoModel.from_pretrained("MongoDB/mdbr-leaf-ir") - Transformers.js
How to use MongoDB/mdbr-leaf-ir with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'MongoDB/mdbr-leaf-ir'); - Inference
- Notebooks
- Google Colab
- Kaggle
Upload README.md
Browse files
README.md
CHANGED
|
@@ -40,13 +40,13 @@ If you are looking to perform other tasks such as classification, clustering, se
|
|
| 40 |
|
| 41 |
# Technical Report
|
| 42 |
|
| 43 |
-
A technical report detailing our proposed `LEAF` training procedure
|
| 44 |
|
| 45 |
# Highlights
|
| 46 |
|
| 47 |
-
* **State-of-the-Art Performance**: `mdbr-leaf-ir` achieves new state-of-the-art results for compact embedding models, ranking <span style="color:red">#TBD</span> on the public [BEIR benchmark leaderboard](https://huggingface.co/spaces/mteb/leaderboard) for models <100M parameters with an average nDCG@10 score of <span style="color:red">[TBD
|
| 48 |
* **Flexible Architecture Support**: `mdbr-leaf-ir` supports asymmetric retrieval architectures enabling even greater retrieval results. [See below](#asymmetric-retrieval-setup) for more information.
|
| 49 |
-
* **MRL and Quantization Support**: embedding vectors generated by `mdbr-leaf-ir` compress well when truncated (MRL) and
|
| 50 |
|
| 51 |
# Quickstart
|
| 52 |
|
|
|
|
| 40 |
|
| 41 |
# Technical Report
|
| 42 |
|
| 43 |
+
A technical report detailing our proposed `LEAF` training procedure will be available soon.
|
| 44 |
|
| 45 |
# Highlights
|
| 46 |
|
| 47 |
+
* **State-of-the-Art Performance**: `mdbr-leaf-ir` achieves new state-of-the-art results for compact embedding models, ranking <span style="color:red">#TBD</span> on the public [BEIR benchmark leaderboard](https://huggingface.co/spaces/mteb/leaderboard) for models <100M parameters with an average nDCG@10 score of <span style="color:red">[TBD]</span>.
|
| 48 |
* **Flexible Architecture Support**: `mdbr-leaf-ir` supports asymmetric retrieval architectures enabling even greater retrieval results. [See below](#asymmetric-retrieval-setup) for more information.
|
| 49 |
+
* **MRL and Quantization Support**: embedding vectors generated by `mdbr-leaf-ir` compress well when truncated (MRL) and can be stored using more efficient types like `int8` and `binary`. [See below](#mrl) for more information.
|
| 50 |
|
| 51 |
# Quickstart
|
| 52 |
|