$npx skillfedfor your agent

sentence-transformers

Embeddings, Retrieval, and Reranking

Worth itPyPI Artificial IntelligenceReleased Aug 202630.6M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sentence_transformers-5.7.0-py3-none-any.whl
v5.7.0 · released 2026-08-06 · Python >=3.10 · 9 runtime deps: transformers, tokenizers, huggingface-hub, torch, numpy, scikit-learn, scipy, typing_extensions

Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and provides a well-established interface to state-of-the-art embedding and reranking models. It's the standard choice for semantic search and text similarity tasks in Python. Install it if you need embeddings or reranking; the only gotcha is ensuring your environment has torch and the required Python version (3.10+).AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10+, PyTorch 1.11.0+, and transformers v4.41.0+; models are downloaded from Hugging Face Hub on first use.
  • Low friction install with a pure-Python wheel.
  • Active maintenance with a recent release and strong community backing.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research contexts.

last release 2026-08-06 (8 days) · last repo commit 2026-08-13 · 19,000 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 30,596,728 downloads/mo, #798 on PyPI

Verify before relying

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
embeddings = model.encode(["Hello world", "Hi there"])
similarities = model.similarity(embeddings, embeddings)
  • Whether pre-trained models are automatically cached locally or require explicit download management
  • GPU memory requirements for different model sizes and batch processing
  • Performance characteristics when encoding large document collections
Same gist for agents: .md · .json

What it is and what it does

Sentence Transformers is a framework for computing dense embeddings and reranking scores from text using transformer-based models. It wraps the transformers library to provide three main workflows: encoding text into fixed-size embeddings via SentenceTransformer models, scoring query-passage pairs via CrossEncoder reranker models, and generating sparse embeddings via SparseEncoder models. The framework ships with access to pre-trained models hosted on Hugging Face, covering many languages and specialized use cases.

The package is built on top of transformers, tokenizers, torch, and scikit-learn, handling model loading, batching, and similarity computation. It's designed for tasks like semantic search (finding similar documents), semantic textual similarity (measuring how alike two texts are), and paraphrase mining. You can also fine-tune models on your own data for task-specific embeddings. The framework abstracts away much of the boilerplate around tokenization and tensor operations, making it accessible for developers who need embeddings but don't want to write low-level transformer code.

Use it for

  • Build a semantic search engine to find documents similar to a query by encoding a corpus and comparing embeddings
  • Rank search results or passages by relevance using a CrossEncoder reranker model to refine initial retrieval
  • Compute semantic similarity scores between pairs of texts for deduplication, clustering, or matching tasks
  • Fine-tune a model on labeled text pairs to create domain-specific embeddings for specialized use cases
  • Mine paraphrases or near-duplicate texts by encoding a large corpus and finding high-similarity pairs

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no known vulnerabilities, installs with low friction, and provides a well-established interface to state-of-the-art embedding and reranking models. It's the standard choice for semantic search and text similarity tasks in Python. Install it if you need embeddings or reranking; the only gotcha is ensuring your environment has torch and the required Python version (3.10+).

Install

sentence-transformers on PyPI

Before you install

Low friction install with a pure-Python wheel. Active maintenance with a recent release and strong community backing. Requires torch and transformers as runtime dependencies, which are substantial but standard for deep learning work.

Requires Python 3.10+, PyTorch 1.11.0+, and transformers v4.41.0+; models are downloaded from Hugging Face Hub on first use.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research contexts.

Quickstart

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
embeddings = model.encode(["Hello world", "Hi there"])
similarities = model.similarity(embeddings, embeddings)

Verify before relying

  • Whether pre-trained models are automatically cached locally or require explicit download management
  • GPU memory requirements for different model sizes and batch processing
  • Performance characteristics when encoding large document collections

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
9 packages
transformerstokenizershuggingface-hubtorchnumpyscikit-learnscipytyping_extensionstqdm
MaintenanceActively maintained 8 days since the last release
Last repo commit
First released
Downloads30,596,728 / month, #798 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Artificial Intelligence

Evidence: sentence_transformers-5.7.0-py3-none-any.whl

Tags

Capabilities
text embeddings transformersemantic search embeddingssentence similarity scoringcross-encoder rerankingBERT embeddings frameworksemantic textual similarityembedding models huggingface
Topics
embeddingssemantic-searchtransformers
PyPI keywords
Transformer NetworksBERTXLNetsentence embeddingPyTorchNLPdeep learning

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “semantic search embeddings”

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also bert-score · flair · InstructorEmbedding · model2vec · pinecone-text · spacy-transformers · voyageai · mteb · transformer-smaller-training-vocab · fair-esm

Further reading