Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文 Emebedding & Reranker 模型选型 #111

Open
ninehills opened this issue Dec 28, 2023 · 9 comments
Open

中文 Emebedding & Reranker 模型选型 #111

ninehills opened this issue Dec 28, 2023 · 9 comments
Labels

Comments

@ninehills
Copy link
Owner

ninehills commented Dec 28, 2023

结论

选型建议:

  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

基于 xlm-roberta 模型。

alime-reranker-large-zh

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

信息很少。也是基于 xlm-roberta 模型。

C-MTEB

我们只关心 Rerank 和 Retrieval 评测,结果见 mteb

@ninehills ninehills added the blog label Dec 28, 2023
@dushaobindoudou
Copy link

正需要,感谢分享,mark

@kanseaveg
Copy link

mark.

@onesuper
Copy link

谢谢分享

@bjfk2006
Copy link

网易的bce-rerank也不错,官方支持到128k,可以试试

@ninehills
Copy link
Owner Author

网易的bce-rerank也不错,官方支持到128k,可以试试

他家的rerank 支持128K其实是多次计算的结果。

@qazwsx042
Copy link

Mark

@guijuzhejiang
Copy link

感谢分享,在reranking榜单上也有embedding模型,请问embedding模型也可以用作reranking吗?
image

@zkailinzhang
Copy link

感谢分享,在reranking榜单上也有embedding模型,请问embedding模型也可以用作reranking吗? image
你好问下哪里榜单

@Bella722
Copy link

感谢分享,在reranking榜单上也有embedding模型,请问embedding模型也可以用作reranking吗? image
你好问下哪里榜单

我找到一个 https://huggingface.co/spaces/mteb/leaderboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants