Skip to content

Commit ddad0f9

Browse files
committed
create tutorials
1 parent e22aaad commit ddad0f9

9 files changed

Lines changed: 2799 additions & 2 deletions

File tree

FlagEmbedding/baai_general_embedding/finetune/eval_msmarco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def evaluate(preds,
183183
for pred, label in zip(preds, labels):
184184
for k, cutoff in enumerate(cutoffs):
185185
recall = np.intersect1d(label, pred[:cutoff])
186-
recalls[k] += len(recall) / len(label)
186+
recalls[k] += len(recall) / max(min(len(recall), len(label)), 1)
187187
recalls /= len(preds)
188188
for i, cutoff in enumerate(cutoffs):
189189
recall = recalls[i]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ FlagEmbedding focuses on retrieval-augmented LLMs, consisting of the following p
4141
- **Reranker Model**: [llm rerankers](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/llm_reranker), [BGE Reranker](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker)
4242
- **Benchmark**: [C-MTEB](https://github.com/FlagOpen/FlagEmbedding/tree/master/C_MTEB), [AIR-Bench](https://github.com/AIR-Bench/AIR-Bench), [MLVU](https://github.com/JUNJIE99/MLVU)
4343

44-
## News
44+
## News
45+
- 9/2/2024: Start to maintain the [tutorials](./Tutorials/). The contents within will be actively updated and eariched, stay tuned! :books:
4546
- 7/26/2024: Release a new embedding model [bge-en-icl](https://huggingface.co/BAAI/bge-en-icl), an embedding model that incorporates in-context learning capabilities, which, by providing task-relevant query-response examples, can encode semantically richer queries, further enhancing the semantic representation ability of the embeddings. :fire:
4647
- 7/26/2024: Release a new embedding model [bge-multilingual-gemma2](https://huggingface.co/BAAI/bge-multilingual-gemma2), a multilingual embedding model based on gemma-2-9b, which supports multiple languages and diverse downstream tasks, achieving new SOTA on multilingual benchmarks (MIRACL, MTEB-fr, and MTEB-pl). :fire:
4748
- 7/26/2024: Release a new lightweight reranker [bge-reranker-v2.5-gemma2-lightweight](https://huggingface.co/BAAI/bge-reranker-v2.5-gemma2-lightweight), a lightweight reranker based on gemma-2-9b, which supports token compression and layerwise lightweight operations, can still ensure good performance while saving a significant amount of resources. :fire:

README_zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ FlagEmbedding专注于检索增强llm领域,目前包括以下项目:
4242
- **Benchmark**: [C-MTEB](https://github.com/FlagOpen/FlagEmbedding/tree/master/C_MTEB), [AIR-Bench](https://github.com/AIR-Bench/AIR-Bench), [MLVU](https://github.com/JUNJIE99/MLVU)
4343

4444
## 更新
45+
- 9/2/2024: 开始维护更新[教程](./Tutorials/),教程文件夹中的内容会在未来不断丰富,欢迎持续关注! :books:
4546
- 7/26/2024:发布[bge-en-icl](https://huggingface.co/BAAI/bge-en-icl)。这是一个结合了上下文学习能力的文本检索模型,通过提供与任务相关的查询-回答示例,可以编码语义更丰富的查询,进一步增强嵌入的语义表征能力。 :fire:
4647
- 7/26/2024: 发布[bge-multilingual-gemma2](https://huggingface.co/BAAI/bge-multilingual-gemma2)。这是一个基于gemma-2-9b的多语言文本向量模型,同时支持多种语言和多样的下游任务,在多语言检索数据集 MIRACL, MTEB-fr, MTEB-pl 上取得了迄今最好的实验结果。 :fire:
4748
- 7/26/2024:发布新的轻量级重排器[bge-reranker-v2.5-gemma2-lightweight](https://huggingface.co/BAAI/bge-reranker-v2.5-gemma2-lightweight)。这是一个基于gemma-2-9b的轻量级重排器,支持令牌压缩和分层轻量操作,在节省大量资源的同时,仍能确保良好的性能。:fire:

0 commit comments

Comments
 (0)