Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
ninehills authored Dec 28, 2023
1 parent 68ca346 commit d766043
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 九原山
## Posts
- #111 [中文 Emebedding & Reranker 模型选型](articles/111.md) 2023-12-28 `blog`
- #109 [Gemini Pro Vision 作为 表格 OCR 解决方案的简单测试](articles/109.md) 2023-12-20 `blog`
- #107 [大语言模型(LLM)推理性能优化以及推理框架、后端的评测](articles/107.md) 2023-12-19 `blog`
- #104 [Embedding 模型在 RAG 场景下的评估和微调](articles/104.md) 2023-11-03 `blog`
Expand Down
97 changes: 97 additions & 0 deletions articles/111.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# 中文 Emebedding & Reranker 模型选型

> Author: **ninehills**
> Labels: **blog**
> Created: **2023-12-28T04:58:44Z**
> Link and comments: <https://github.com/ninehills/blog/issues/111>

### 结论

选型建议:

1. 大部分模型的序列长度是 512 tokens。 8192 可尝试 tao-8k,1024 可尝试 stella。
2. 在专业数据领域上,嵌入模型的表现不如 BM25,但是微调可以大大提升效果。
3. 有微调需求且对模型训练了解较少的,建议选择 bge 系列(完善的训练脚本、负例挖掘等)。但多数模型都基于BERT,训练脚本也通用,其他模型也可以参考。
4. 重排模型选择很少,推荐使用 bge-reranker,也支持微调。reranker 模型因为单次输入较多,只能通过 GPU 部署。


## Embedding 模型

### PEG

作者:腾讯
模型地址: https://huggingface.co/TownsWu/PEG
论文: https://arxiv.org/pdf/2311.11691.pdf

重点优化检索能力。
### GTE 系列

作者:阿里巴巴
模型地址: https://huggingface.co/thenlper/gte-large-zh
论文: https://arxiv.org/abs/2308.03281

### picolo 系列

作者:商汤
地址: https://huggingface.co/sensenova/piccolo-large-zh

有一些微调的小tips

### stella 系列

地址:https://huggingface.co/infgrad/stella-large-zh-v2
博客文章: https://zhuanlan.zhihu.com/p/655322183

基于piccolo 模型fine-tuning,支持1024 序列长度。博客文章记录了一些训练思路。

### BGE 系列


作者:智源研究院
地址:https://huggingface.co/BAAI/bge-large-zh-v1.5
论文:https://arxiv.org/pdf/2309.07597.pdf
Github:https://github.com/FlagOpen/FlagEmbedding

开放信息最多的模型,也提供了fine-tuning 示例代码。同时也是 C-MTEB 榜单的维护者。

### m3e 系列

作者:MokaAI
地址:https://huggingface.co/moka-ai/m3e-large
Github:https://github.com/wangyuxinwhy/uniem

研究的比较早,算是中文通用 Embedding 模型、数据集以及评测比较早的开拓者。

### multilingual-e5-large

地址:https://huggingface.co/intfloat/multilingual-e5-large
论文:https://arxiv.org/pdf/2212.03533.pdf

多语言支持。

### tao-8k

地址: https://huggingface.co/amu/tao-8k

支持8192 序列长度,但是信息很少。

## Reranker 模型

### bge-reranker 系列

作者:智源研究院
地址:https://huggingface.co/BAAI/bge-reranker-large
Github:[GitHub - FlagOpen/FlagEmbedding: Dense Retrieval and Retrieval-augmented LLMs](https://github.com/FlagOpen/FlagEmbedding)

基于 [xlm-roberta](https://huggingface.co/models?other=xlm-roberta) 模型。
### alime-reranker-large-zh

地址: https://huggingface.co/Pristinenlp/alime-reranker-large-zh

信息很少。也是基于 [xlm-roberta](https://huggingface.co/models?other=xlm-roberta) 模型。


### C-MTEB

我们只关心 Rerank 和 Retrieval 评测,结果见 [mteb](https://huggingface.co/spaces/mteb/leaderboard)

0 comments on commit d766043

Please sign in to comment.