Update README.md

This commit is contained in:
Xiao 2024-01-31 17:31:43 +00:00 committed by system
parent 84790c1a60
commit 3806044eb8
No known key found for this signature in database
GPG Key ID: 6A528E38E0733467

@ -83,7 +83,10 @@ pip install -U FlagEmbedding
```python ```python
from FlagEmbedding import BGEM3FlagModel from FlagEmbedding import BGEM3FlagModel
model = BGEM3FlagModel('BAAI/bge-m3', use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation model = BGEM3FlagModel('BAAI/bge-m3',
batch_size=12, #
max_length=8192, # If you don't need such a long length, you can set a smaller value to speed up the encoding process.
use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation
sentences_1 = ["What is BGE M3?", "Defination of BM25"] sentences_1 = ["What is BGE M3?", "Defination of BM25"]
sentences_2 = ["BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.", sentences_2 = ["BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.",
@ -183,8 +186,10 @@ print(model.compute_score(sentence_pairs))
![avatar](./imgs/mkqa.jpg) ![avatar](./imgs/mkqa.jpg)
- Long Document Retrieval - Long Document Retrieval
- MLDR:
![avatar](./imgs/long.jpg) ![avatar](./imgs/long.jpg)
- NarritiveQA:
![avatar](./imgs/nqa.jpg)
## Training ## Training