Python framework for embeddings, semantic search, retrieval, reranking, and model fine-tuning
- Stars18.8k
- Forks2.8k
- Open Issues1.3k
Apache-2.0
- Python
- Makefile

About Sentence Transformers
Sentence Transformers is a Python framework for computing embeddings, similarity scores, and sparse embeddings. It supports Sentence Transformer embedding models, Cross-Encoder reranker models, and Sparse Encoder models for applications such as semantic search, semantic textual similarity, and paraphrase mining.
The framework can use pretrained models from Hugging Face, including over 15,000 Sentence Transformers models and models for more than 100 languages. It also supports training and fine-tuning embedding models, reranker models, and sparse encoder models, with multilingual and multi-task learning, evaluation during training, and multiple loss functions.
Sentence Transformers is developed under Hugging Face and works with Python 3.10+, PyTorch 1.11.0+, and transformers v4.41.0+. It is a library for local model use and training rather than a hosted service, with package installation through PyPI and source access through GitHub.
Key features
- Computes dense sentence embeddings with Sentence Transformer models
- Calculates similarity scores with Cross-Encoder reranker models
- Generates sparse embeddings with Sparse Encoder models
- Supports semantic search, textual similarity, and paraphrase mining
- Fine-tunes embedding, reranker, and sparse encoder models
Details
- First released
- 2019
- Language
- Python
- Models
- 15,000+ on Hugging Face
- Languages
- 100+
- Requirements
- Python 3.10+ · PyTorch 1.11+
- Dependency
- transformers v4.41.0+
