Deduplication integrated in CachedGISTEmbedLoss
yjoonjang opened this issue · 2 comments
yjoonjang commented
Hello @tomaarsen , I'm a student who loves using sentence-transformers library.
While looking at the codes, I thought that deduplication could be integrated in CachedGISTEmbedLoss (or just GISTEmbedLoss) by revising the code from
ap_sim[guided_ap_sim > guided_sim] = -torch.inf
aa_sim[guided_aa_sim > guided_sim] = -torch.inf
pp_sim[guided_pp_sim > guided_sim] = -torch.inf
to
ap_sim[guided_ap_sim >= guided_sim] = -torch.inf
aa_sim[guided_aa_sim >= guided_sim] = -torch.inf
pp_sim[guided_pp_sim >= guided_sim] = -torch.inf
Just adding the equal sign. How do you think about this?
tomaarsen commented
cc @JINO-ROHIT
JINO-ROHIT commented
Hi @yjoonjang @tomaarsen we are experimenting with the same in the issue #2756 , do have a look at my comments