FlagOpen / FlagEmbedding

Retrieval and Retrieval-augmented LLMs
MIT License
6.8k stars 487 forks source link

bge-reranker-v2-minicpm-layerwise 重排效率很低 #794

Open ChengRuiLiang opened 3 months ago

ChengRuiLiang commented 3 months ago

在A5000的显卡上,对100条数据进行重排序,需要5s才能完成

ChengRuiLiang commented 3 months ago

有什么方法能够对它进行性能优化,有没有适合重排模型的推理加速框架

545999961 commented 3 months ago

想减少运行时间的话可以尝试使用低层输出、减少rerank的范围或使用bge-reranker-v2-m3 关于推理加速框架方面我们没有具体探究过

ChengRuiLiang commented 3 months ago

想减少运行时间的话可以尝试使用低层输出、减少rerank的范围或使用bge-reranker-v2-m3 关于推理加速框架方面我们没有具体探究过

非常感谢

yzspku commented 3 months ago

rerankerllm.compute_score 的use_dataloader=False 试试呢,我跑起来还挺快

newfyu commented 3 months ago

同求一个推理加速方案

ycjcl868 commented 3 weeks ago

rerankerllm.compute_score 的use_dataloader=False 试试呢,我跑起来还挺快

默认就是 False

https://github.com/FlagOpen/FlagEmbedding/blob/399d12f3e238f7d5c82c86939691f195041e0159/FlagEmbedding/flag_reranker.py#L334