FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

关于beg_emdedding 微调loss计算

Open YJSoooooo opened this issue 1 year ago • 1 comments

baai_general_embedding.finetune

您好,我在早先issue里看到 https://github.com/FlagOpen/FlagEmbedding/issues/58 1.如果传参--normlized True \,训练得时候使用余弦相似度来计算score ,同时使用temperature来放缩score 2. 否则就是用内积来计算socre

但是现在我看modeling.py中forward image 而compute_similarity函数现在用的是内积 image 现在您是弃用了余弦相似度来计算socre了吗

YJSoooooo avatar Jan 23 '24 06:01 YJSoooooo

您好,normlized之后向量计算内积就等于计算余弦相似度。

staoxiao avatar Jan 23 '24 09:01 staoxiao