rvo commited on
Commit
b8e68a7
·
verified ·
1 Parent(s): 1767e56

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -12
README.md CHANGED
@@ -29,21 +29,21 @@ Enabling even greater efficiency, `mdbr-leaf-ir` supports [flexible asymmetric a
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]
32
- > **Note**: this model is the result of MongoDB Research's ML team. At the time of writing it is not used in any of MongoDB's commercial product or service offerings.
33
 
34
  # Technical Report
35
 
36
  A technical report detailing our proposed `LEAF` training procedure is [available here (TBD)](http://FILL_HERE_ARXIV_LINK).
37
 
38
- ## Highlights
39
 
40
  * **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 for models <30M parameters with an average nDCG@10 score of <span style="color:red">[TBD HERE]</span>.
41
  * **Flexible Architecture Support**: `mdbr-leaf-ir` supports asymmetric retrieval architectures enabling even greater retrieval results. [See below](#asymmetric-retrieval-setup) for more information.
42
  * **MRL and quantization support**: embedding vectors generated by `mdbr-leaf-ir` compress well when truncated (MRL) and/or are stored using more efficient types like `int8` and `binary`. [See below](#mrl) for more information.
43
 
44
- ## Quickstart
45
 
46
- ### Sentence Transformers
47
 
48
  ```python
49
  from sentence_transformers import SentenceTransformer
@@ -84,11 +84,11 @@ for i, query in enumerate(queries):
84
  # Similarity: 0.5723 | Document 1: Neural networks are trained ...
85
  ```
86
 
87
- ### Transformers Usage
88
 
89
  See [here](https://huggingface.co/MongoDB/mdbr-leaf-ir/blob/main/transformers_example.ipynb).
90
 
91
- ### Asymmetric Retrieval Setup
92
 
93
  `mdbr-leaf-ir` is *aligned* to [`snowflake-arctic-embed-m-v1.5`](https://huggingface.co/Snowflake/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:
94
  ```python
@@ -105,7 +105,7 @@ scores = query_model.similarity(query_embeddings, document_embeddings)
105
  ```
106
  Retrieval results from asymmetric mode are usually superior to the [standard mode above](#sentence-transformers).
107
 
108
- ### MRL
109
 
110
  Embeddings have been trained via [MRL](https://arxiv.org/abs/2205.13147) and can be truncated for more efficient storage:
111
  ```python
@@ -131,7 +131,7 @@ print(f"* Similarities:\n\t{similarities}")
131
  # [0.4567, 0.6022]])
132
  ```
133
 
134
- ### Vector Quantization
135
  Vector quantization, for example to `int8` or `binary`, can be performed as follows:
136
 
137
  **Note**: For vector quantization to types other than binary, we suggest performing a calibration to determine the optimal ranges, [see here](https://sbert.net/examples/sentence_transformer/applications/embedding-quantization/README.html#scalar-int8-quantization).
@@ -164,12 +164,12 @@ print(f"* Similarities:\n{similarities}")
164
  # [ 72961 98333]]
165
  ```
166
 
167
- ## Evaluation
168
 
169
  Please refer to this <span style="color:red">TBD</span> script to replicate results.
170
  The checkpoint used to produce the scores presented in the paper [is here](https://huggingface.co/MongoDB/mdbr-leaf-ir/commit/ea98995e96beac21b820aa8ad9afaa6fd29b243d). The current model has been trained further to achieve higher scores.
171
 
172
- ## Citation
173
 
174
  If you use this model in your work, please cite:
175
 
@@ -185,10 +185,10 @@ If you use this model in your work, please cite:
185
  }
186
  ```
187
 
188
- ## License
189
 
190
  This model is released under Apache 2.0 License.
191
 
192
- ## Contact
193
 
194
  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.
 
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]
32
+ > **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.
33
 
34
  # Technical Report
35
 
36
  A technical report detailing our proposed `LEAF` training procedure is [available here (TBD)](http://FILL_HERE_ARXIV_LINK).
37
 
38
+ # Highlights
39
 
40
  * **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 for models <30M parameters with an average nDCG@10 score of <span style="color:red">[TBD HERE]</span>.
41
  * **Flexible Architecture Support**: `mdbr-leaf-ir` supports asymmetric retrieval architectures enabling even greater retrieval results. [See below](#asymmetric-retrieval-setup) for more information.
42
  * **MRL and quantization support**: embedding vectors generated by `mdbr-leaf-ir` compress well when truncated (MRL) and/or are stored using more efficient types like `int8` and `binary`. [See below](#mrl) for more information.
43
 
44
+ # Quickstart
45
 
46
+ ## Sentence Transformers
47
 
48
  ```python
49
  from sentence_transformers import SentenceTransformer
 
84
  # Similarity: 0.5723 | Document 1: Neural networks are trained ...
85
  ```
86
 
87
+ ## Transformers Usage
88
 
89
  See [here](https://huggingface.co/MongoDB/mdbr-leaf-ir/blob/main/transformers_example.ipynb).
90
 
91
+ ## Asymmetric Retrieval Setup
92
 
93
  `mdbr-leaf-ir` is *aligned* to [`snowflake-arctic-embed-m-v1.5`](https://huggingface.co/Snowflake/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:
94
  ```python
 
105
  ```
106
  Retrieval results from asymmetric mode are usually superior to the [standard mode above](#sentence-transformers).
107
 
108
+ ## MRL
109
 
110
  Embeddings have been trained via [MRL](https://arxiv.org/abs/2205.13147) and can be truncated for more efficient storage:
111
  ```python
 
131
  # [0.4567, 0.6022]])
132
  ```
133
 
134
+ ## Vector Quantization
135
  Vector quantization, for example to `int8` or `binary`, can be performed as follows:
136
 
137
  **Note**: For vector quantization to types other than binary, we suggest performing a calibration to determine the optimal ranges, [see here](https://sbert.net/examples/sentence_transformer/applications/embedding-quantization/README.html#scalar-int8-quantization).
 
164
  # [ 72961 98333]]
165
  ```
166
 
167
+ # Evaluation
168
 
169
  Please refer to this <span style="color:red">TBD</span> script to replicate results.
170
  The checkpoint used to produce the scores presented in the paper [is here](https://huggingface.co/MongoDB/mdbr-leaf-ir/commit/ea98995e96beac21b820aa8ad9afaa6fd29b243d). The current model has been trained further to achieve higher scores.
171
 
172
+ # Citation
173
 
174
  If you use this model in your work, please cite:
175
 
 
185
  }
186
  ```
187
 
188
+ # License
189
 
190
  This model is released under Apache 2.0 License.
191
 
192
+ # Contact
193
 
194
  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.