FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

请问embedding模型或者reranker模型是否可以做相关性模型

Open mechigonft opened this issue 2 years ago • 2 comments

相关性任务,判断两个seq是否相关 三个参数 seq1,seq2,flag flag为1表示相关,flag为0表示不相关

mechigonft avatar Nov 24 '23 09:11 mechigonft

可以使用reranker模型进行微调,增加flag输入,将loss改为二元分类损失。 直接使用的话只能通过输出相似度,根据阈值进行判断,但可能存在一些bad case。

staoxiao avatar Nov 24 '23 13:11 staoxiao

“可以使用reranker模型进行微调,增加flag输入,将loss改为二元分类损失。”这块是需要自己改代码实现?

mechigonft avatar Nov 27 '23 07:11 mechigonft