Sentence Transformers

Sentence Transformers

โ˜… 4.2 ๐Ÿ”– 4000 saves ๐Ÿ’ฐ Free GitHub

Sentence Transformers is Hugging Face’s Python framework for state-of-the-art text embeddings, retrieval and reranking. It makes it easy to turn sentences, paragraphs and even images into dense vectors that capture semantic meaning, powering applications such as semantic search, clustering and recommendation. First released alongside the Sentence-BERT research in 2019, it has grown to about 19,200 stars on GitHub and remains one of the most used embedding libraries in the world.

Overview

The framework covers the full retrieval stack: dense embedding models, cross-encoder rerankers, sparse encoders for SPLADE-style retrieval, and multi-vector encoders for ColBERT-style late interaction. More than 15,000 pre-trained models are available on the Hugging Face Hub, including many leaders of the MTEB benchmark, covering over 100 languages and multimodal use cases. Just as importantly, Sentence Transformers is a training framework too, with dozens of loss functions and documented recipes for fine-tuning embedding, reranking and sparse models on your own data, including efficiency techniques such as Matryoshka embeddings and quantization.

Key Features

  • Dense, sparse and multi-vector embeddings plus cross-encoder reranking in one framework
  • Access to 15,000+ pre-trained models on Hugging Face, including MTEB leaderboard leaders
  • Built for semantic search, textual similarity, clustering, paraphrase and duplicate mining
  • Full training support with 20+ loss functions for embedding models and extensive examples
  • Multilingual and multimodal models for text, image, audio and video retrieval
  • Efficiency options including Matryoshka embeddings and binary or scalar quantization

๐Ÿ’ณ Pricing

Sentence Transformers is completely free and open source under the Apache-2.0 license. Models run locally on your own hardware, so there are no per-query API costs.

Who Is It For

Sentence Transformers is for developers and data scientists building search, RAG, recommendation or clustering systems who want production-quality embeddings and the option to fine-tune them.

๐Ÿš€ Visit Sentence Transformers Official Site

๐Ÿšฉ Report an issue