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
|
@@ -28,7 +28,7 @@ Enabling even greater efficiency, `mdbr-leaf-ir` supports [flexible asymmetric a
|
|
| 28 |
|
| 29 |
If you are looking to perform other tasks such as classification, clustering, semantic sentence similarity, summarization, please check out our [`mdbr-leaf-mt`](https://huggingface.co/MongoDB/mdbr-leaf-mt) model.
|
| 30 |
|
| 31 |
-
**Note**: this model has been developed by MongoDB Research and is not part of MongoDB's commercial offerings.
|
| 32 |
|
| 33 |
## Technical Report
|
| 34 |
|
|
@@ -254,7 +254,7 @@ print(f"* Similarities:\n{similarities}")
|
|
| 254 |
|
| 255 |
## Evaluation
|
| 256 |
|
| 257 |
-
Please refer to this <span style="color:red">TBD</span> script to replicate results
|
| 258 |
The checkpoint used to produce the scores presented in the paper [is here](https://huggingface.co/MongoDB/mdbr-leaf-ir/commit/ea98995e96beac21b820aa8ad9afaa6fd29b243d).
|
| 259 |
|
| 260 |
## Citation
|
|
|
|
| 28 |
|
| 29 |
If you are looking to perform other tasks such as classification, clustering, semantic sentence similarity, summarization, please check out our [`mdbr-leaf-mt`](https://huggingface.co/MongoDB/mdbr-leaf-mt) model.
|
| 30 |
|
| 31 |
+
<span style="color:LightGray">**Note**: this model has been developed by MongoDB Research and is not part of MongoDB's commercial offerings.</span>
|
| 32 |
|
| 33 |
## Technical Report
|
| 34 |
|
|
|
|
| 254 |
|
| 255 |
## Evaluation
|
| 256 |
|
| 257 |
+
Please refer to this <span style="color:red">TBD</span> script to replicate results.
|
| 258 |
The checkpoint used to produce the scores presented in the paper [is here](https://huggingface.co/MongoDB/mdbr-leaf-ir/commit/ea98995e96beac21b820aa8ad9afaa6fd29b243d).
|
| 259 |
|
| 260 |
## Citation
|