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
- Sentence Transformers built on Hugging Face Transformers
- Sentence Transformers works with FAISS
- Sentence Transformers works with Qdrant
- Sentence Transformers works with Chroma
- Sentence Transformers works with pgvector
Built with the same technologies
Learn Sentence Transformers
Official links
- Official website
- Documentation
- Source code (huggingface/sentence-transformers)
- pypi: sentence-transformers