-
I have models that are trained for cosine sim. and others are trained for dot product. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
For some tasks it is automatically computed with both e.g. here & hereI think we should do that for all other tasks where it's only cos sim right now (& maybe also make it configurable). It looks like it's Reranking & Retrieval where it's always cos sim right now 🤔 Do you want to open a PR to fix it? |
Beta Was this translation helpful? Give feedback.
-
I found multiple locations, where one can set a similarity function. The one at the very bottom I tried out myself, but could not tell if it had any effect, since I was using normalized embeddings anyway. You can choose the similarity function when initialising the Evaluator. The two in question would be Or the one I tried was in mteb/mteb/abstasks/AbsTaskRetrieval.py Line 41 in 2341c48 For this you would need to pass the kwarg here: Line 271 in 2341c48 So basically in your run-Script (see examples), as |
Beta Was this translation helpful? Give feedback.
I found multiple locations, where one can set a similarity function. The one at the very bottom I tried out myself, but could not tell if it had any effect, since I was using normalized embeddings anyway.
You can choose the similarity function when initialising the Evaluator. The two in question would be
RetrievalEvaluator.py
andRerankingEvaluator.py
.mteb/mteb/evaluation/evaluators/RetrievalEvaluator.py
Line 36 in 2341c48
mteb/mteb/evaluation/evaluators/RerankingEvaluator.py
Line 31 in 2341c48
Or the one I tried was in
evaluate()
ofAbsTaskRetrieval.py