Sentence Transformers

Python library for computing and fine-tuning text and image embeddings, plus cross-encoder rerankers, for semantic search and RAG.

Sentence Transformers (SBERT) turns sentences, paragraphs and images into dense vectors that can be compared with cosine similarity. It ships training losses for building domain-specific embedding models and supports rerankers and sparse encoders. Originally from UKP Lab at TU Darmstadt, it is now maintained by Hugging Face.

Type
Library
Category
AI & ML
Maintainer
Hugging Face (originally UKP Lab)
First released
2019
License
Open source (Apache-2.0)
Pricing
Open source — Library is Apache-2.0; embedding models carry their own licences.
Level
Intermediate
Technologies
python, pytorch, nlp, embeddings, rag
GitHub stars
19,339
Weekly downloads
5,407,344 (pypi)
Latest release
[object Object]
Last verified
26 Nov 2026

What Sentence Transformers is used for

  • Semantic search
  • Retrieval for RAG
  • Clustering and deduplication
  • Reranking search results

Strengths

  • Simple encode() API
  • Fine-tuning tools for embeddings
  • Runs locally

Limitations

  • You manage vector storage separately
  • Model choice matters for multilingual text

Sentence Transformers alternatives

How it relates to other tools

Built with the same technologies

Learn Sentence Transformers

Official links

Sources

Explore