Sentence Transformers
Sentence transformers (a.k.a. bi-encoder) models calculate a fixed-size vector representation (embedding) given texts, images, audio, or video.
Using embeddings is typically efficient. Especially, similarity calculations are fast.
Embedings can be used for tasks such as
- semantic textual similarity,
- semantic search,
- clustering,
- classification,
- paraphrase mining,
- and more.
Calculating the embedding is often the first step in a retrieval environment (where a cross-encoder, a.k.a. reranker model is used to find the top-k results from the be-encoder).
See also the Python library sentence-transformer.