How to obtain similarity values from embeddings?

I’m trying to use the model in this url:

However, in the webpage nothing is said about how we can compute the similarity values, i.e. which mathematical functions we use.

How are they computed for that webpage?

Hello and welcome to our forum :hugs:

Sentence transformers use cosine similarity for inference, you can find the function here. Indeed it would be nice to document what’s used, I noted it down :slight_smile:

Thanks Merve :wink:

A quinta, 28/04/2022, 14:46, Merve Noyan via Hugging Face Forums <notifications@hellohellohello.discoursemail.com> escreveu: