Sentence Transformers
Python library for embedding and reranker models.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkWhat it is
Sentence Transformers (SBERT) computes embeddings from text, images, audio or video, scores pairs of inputs with cross-encoder rerankers, and produces sparse embeddings with sparse encoders. It loads models from the Hugging Face Hub and can fine-tune embedding, reranker and sparse models on your own data. UKP Lab created it; Hugging Face now maintains it under the Apache 2.0 licence.
Best for
Python developers running or fine-tuning open embedding and reranking models.
Skills it helps with
Learn Sentence Transformers by doing
- Hybrid search and reranking in Postgres
Combine Postgres full-text search and pgvector with reciprocal rank fusion in one SQL query, rerank the top results with a cross-encoder, and measure the gain.
Related tools
Chroma
Open-source embedding database that is quick to start locally, plus a hosted cloud.
Faiss
Meta's library for vector similarity search and clustering.
LanceDB
Embedded, open-source vector and multimodal database on the Lance columnar format.
Milvus
Open-source vector database built for large collections, from the team at Zilliz.
pgvector
Postgres extension for vector similarity search with HNSW and IVFFlat indexes.
Pinecone
Fully managed vector database with serverless indexes and built-in embedding models.