ldwang commited on
Commit
00b261d
β€’
1 Parent(s): 65c6be8
Files changed (1) hide show
  1. README.md +9 -6
README.md CHANGED
@@ -2604,12 +2604,15 @@ pipeline_tag: sentence-similarity
2604
  ---
2605
 
2606
 
 
 
2607
  <h1 align="center">FlagEmbedding</h1>
2608
 
2609
 
2610
  <h4 align="center">
2611
  <p>
2612
  <a href=#model-list>Model List</a> |
 
2613
  <a href=#usage>Usage</a> |
2614
  <a href="#evaluation">Evaluation</a> |
2615
  <a href="#train">Train</a> |
@@ -2629,8 +2632,8 @@ And it also can be used in vector databases for LLMs.
2629
 
2630
  ************* 🌟**Updates**🌟 *************
2631
  - 09/12/2023: New Release:
2632
- - **New reranker model**: release a cross-encoder model bge-reranker-base, which is more powerful than embedding model. We recommend to use/fine-tune it to re-rank top-k documents returned by embedding models.
2633
- - **update embedding model**: release bge-*-v1.5 embedding model to alleviate the issue of the similarity distribution, and enhance its retrieval ability without instruction.
2634
  - 09/07/2023: Update [fine-tune code](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md): Add script to mine hard negatives and support adding instruction during fine-tuning.
2635
  - 08/09/2023: BGE Models are integrated into **Langchain**, you can use it like [this](#using-langchain); C-MTEB **leaderboard** is [available](https://huggingface.co/spaces/mteb/leaderboard).
2636
  - 08/05/2023: Release base-scale and small-scale models, **best performance among the models of the same size πŸ€—**
@@ -2662,7 +2665,7 @@ And it also can be used in vector databases for LLMs.
2662
 
2663
  \*: If you need to search the relevant passages to a query, we suggest to add the instruction to the query; in other cases, no instruction is needed, just use the original query directly. In all cases, **no instruction** needs to be added to passages.
2664
 
2665
- \**: To balance the accuracy and time cost, cross-encoder is widely used to re-rank top-k documents retrieved by other simple models.
2666
  For examples, use bge embedding model to retrieve top 100 relevant documents, and then use bge reranker to re-rank the top 100 document to get the final top-3 results.
2667
 
2668
 
@@ -2674,7 +2677,7 @@ For examples, use bge embedding model to retrieve top 100 relevant documents, an
2674
  <!-- ### How to fine-tune bge embedding model? -->
2675
  Following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) to prepare data and fine-tune your model.
2676
  Some suggestions:
2677
- - Mine hard negatives following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune#data-format), which can improve the retrieval performance.
2678
  - If you pre-train bge on your data, the pre-trained model cannot be directly used to calculate similarity, and it must be fine-tuned with contrastive learning before computing similarity.
2679
  - If the accuracy of the fine-tuned model is still not high, it is recommended to use/fine-tune the cross-encoder model (bge-reranker) to re-rank top-k results. Hard negatives also are needed to fine-tune reranker.
2680
 
@@ -2958,8 +2961,8 @@ Cross-encoder will perform full-attention over the input pair,
2958
  which is more accurate than embedding model (i.e., bi-encoder) but more time-consuming than embedding model.
2959
  Therefore, it can be used to re-rank the top-k documents returned by embedding model.
2960
  We train the cross-encoder on a multilingual pair data,
2961
- The data format is the same as embedding model, so you can fine-tune it easily following our example.
2962
- More details pelease refer to [./FlagEmbedding/reranker/README.md](./FlagEmbedding/reranker/README.md)
2963
 
2964
 
2965
  ## Contact
 
2604
  ---
2605
 
2606
 
2607
+ **Recommend switching to newest bge-small-en-v1.5, which has more reasonable similarity distribution and same method of usage.**
2608
+
2609
  <h1 align="center">FlagEmbedding</h1>
2610
 
2611
 
2612
  <h4 align="center">
2613
  <p>
2614
  <a href=#model-list>Model List</a> |
2615
+ <a href=#frequently-asked-questions>FAQ</a> |
2616
  <a href=#usage>Usage</a> |
2617
  <a href="#evaluation">Evaluation</a> |
2618
  <a href="#train">Train</a> |
 
2632
 
2633
  ************* 🌟**Updates**🌟 *************
2634
  - 09/12/2023: New Release:
2635
+ - **New reranker model**: release cross-encoder models `BAAI/bge-reranker-base` and `BAAI/bge-reranker-large`, which are more powerful than embedding model. We recommend to use/fine-tune them to re-rank top-k documents returned by embedding models.
2636
+ - **update embedding model**: release `bge-*-v1.5` embedding model to alleviate the issue of the similarity distribution, and enhance its retrieval ability without instruction.
2637
  - 09/07/2023: Update [fine-tune code](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md): Add script to mine hard negatives and support adding instruction during fine-tuning.
2638
  - 08/09/2023: BGE Models are integrated into **Langchain**, you can use it like [this](#using-langchain); C-MTEB **leaderboard** is [available](https://huggingface.co/spaces/mteb/leaderboard).
2639
  - 08/05/2023: Release base-scale and small-scale models, **best performance among the models of the same size πŸ€—**
 
2665
 
2666
  \*: If you need to search the relevant passages to a query, we suggest to add the instruction to the query; in other cases, no instruction is needed, just use the original query directly. In all cases, **no instruction** needs to be added to passages.
2667
 
2668
+ \**: Different embedding model, reranker is a cross-encoder, which cannot be used to generate embedding. To balance the accuracy and time cost, cross-encoder is widely used to re-rank top-k documents retrieved by other simple models.
2669
  For examples, use bge embedding model to retrieve top 100 relevant documents, and then use bge reranker to re-rank the top 100 document to get the final top-3 results.
2670
 
2671
 
 
2677
  <!-- ### How to fine-tune bge embedding model? -->
2678
  Following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) to prepare data and fine-tune your model.
2679
  Some suggestions:
2680
+ - Mine hard negatives following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune#hard-negatives), which can improve the retrieval performance.
2681
  - If you pre-train bge on your data, the pre-trained model cannot be directly used to calculate similarity, and it must be fine-tuned with contrastive learning before computing similarity.
2682
  - If the accuracy of the fine-tuned model is still not high, it is recommended to use/fine-tune the cross-encoder model (bge-reranker) to re-rank top-k results. Hard negatives also are needed to fine-tune reranker.
2683
 
 
2961
  which is more accurate than embedding model (i.e., bi-encoder) but more time-consuming than embedding model.
2962
  Therefore, it can be used to re-rank the top-k documents returned by embedding model.
2963
  We train the cross-encoder on a multilingual pair data,
2964
+ The data format is the same as embedding model, so you can fine-tune it easily following our [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker).
2965
+ More details pelease refer to [./FlagEmbedding/reranker/README.md](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker)
2966
 
2967
 
2968
  ## Contact