Favicon of Sentence Transformers

Sentence Transformers

An open-source Python library runs embedding and reranker models locally for semantic and multimodal search, with training support and Apache 2.0 licensing.

Screenshot of Sentence Transformers website

Sentence Transformers is a Python library for developers building search and document retrieval on their own hardware. It helps match content by meaning and rank results against a query.

  • Semantic search: Dense embeddings compare meaning across texts, while sparse encoders such as SPLADE provide vocabulary-based representations for search and similarity matching.
  • Reranking: Cross-Encoder models score candidate results for relevance; Qwen3-VL rerankers can rank text, images and documents that combine both.
  • Text and visual document retrieval: Multi-Vector Encoder models support ColBERT-style token-level matching and ColPali-style search over document images, with compatibility for ColBERT, PyLate and ColPali models.
  • Multimodal embeddings: Models with the relevant input support can encode text, images, audio or video; Qwen3-VL embeddings can compare text queries with images.
  • Custom model training: Train or fine-tune embedding models, rerankers, sparse encoders and multi-vector encoders on your own data, with evaluation support for multi-vector models.

The library is open source under Apache 2.0 and runs models locally using PyTorch. It supports CUDA and has ONNX and OpenVINO options. Hugging Face hosts pretrained models such as all-MiniLM-L6-v2, alongside multilingual and task-specific choices. Supported languages and input types depend on the model you choose.

Similar to Sentence Transformers