transformers
Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
Decision gist · record as of 2026-08-14
Yes. Transformers is the de facto standard for working with modern pretrained models in Python. It has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and integrates with the broader ML ecosystem. Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10+ and PyTorch 2.5+ (or JAX/TensorFlow 2.0+ for alternative backends); models are downloaded and cached on first use.
- Low friction installation via pip or uv.
- Active maintenance with a release 4 days old and continuous commits; the library is in Production/Stable status with 164081 repository stars and over a decade of development history since its first release in 2016.
License · maintenance · safety
Apache 2.0 License (permissive) — Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for proprietary and open-source projects alike.
last release 2026-08-10 (4 days) · last repo commit 2026-08-13 · 164,081 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 186,611,834 downloads/mo, #220 on PyPI
Alternatives
Verify before relying
pip install transformers[torch]
from transformers import pipeline
pipeline = pipeline(task="text-generation", model="Qwen/Qwen2.5-1.5B")
output = pipeline("the secret to baking a really good cake is ")- Exact memory footprint and inference speed for different model sizes and hardware configurations.
- Whether all model checkpoints on Hugging Face Hub are equally well-supported or if some have known compatibility issues.
- Performance characteristics across different PyTorch, JAX, and TensorFlow versions.
What it is and what it does
Transformers is the standard Python framework for working with state-of-the-art pretrained models in machine learning. It acts as a model-definition layer that bridges multiple training frameworks and inference engines, ensuring a model defined in transformers will work across the ecosystem. The library centralizes model definitions so researchers and engineers can share a single implementation rather than maintaining separate versions for each framework.
It provides high-level APIs like Pipeline for common tasks (text generation, image classification, automatic speech recognition, visual question answering) and lower-level classes for fine-tuning and custom training. You can load a pretrained model and run inference in a few lines of code, or customize and train it on your own data. The library supports modern Python versions (3.10+) and works with PyTorch, JAX, and TensorFlow, letting you pick the right framework for each stage of your model's lifecycle.
Use it for
- Build a text generation application by loading a pretrained model and running inference via the Pipeline API.
- Fine-tune a pretrained model on your own labeled dataset for custom NLP tasks like sentiment analysis or named-entity recognition.
- Deploy multimodal models for tasks like visual question answering or image classification without writing framework-specific code.
- Integrate pretrained models into production systems using compatible inference engines without rewriting model definitions.
- Experiment with different model architectures and training frameworks by swapping PyTorch, JAX, or TensorFlow backends on the same model.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Transformers is the de facto standard for working with modern pretrained models in Python. It has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and integrates with the broader ML ecosystem. Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
Install
transformers on PyPI
Before you install
Low friction installation via pip or uv. Active maintenance with a release 4 days old and continuous commits; the library is in Production/Stable status with 164081 repository stars and over a decade of development history since its first release in 2016.
Requires Python 3.10+ and PyTorch 2.5+ (or JAX/TensorFlow 2.0+ for alternative backends); models are downloaded and cached on first use.
License in practice
Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for proprietary and open-source projects alike.
Quickstart
pip install transformers[torch]
from transformers import pipeline
pipeline = pipeline(task="text-generation", model="Qwen/Qwen2.5-1.5B")
output = pipeline("the secret to baking a really good cake is ")
Verify before relying
- Exact memory footprint and inference speed for different model sizes and hardware configurations.
- Whether all model checkpoints on Hugging Face Hub are equally well-supported or if some have known compatibility issues.
- Performance characteristics across different PyTorch, JAX, and TensorFlow versions.
Package facts
| License | Apache 2.0 License permissive |
| Python support | Supports the current Python release >=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 9 packageshuggingface-hubnumpypackagingpyyamlregextokenizerstypersafetensorstqdm |
| Maintenance | Actively maintained 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 186,611,834 / month, #220 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: transformers-5.15.0-py3-none-any.whl
Tags
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 › “pretrained transformer models”
- transformersTransformers provides a unified framework for loading, fine-tuning,…
- spacy-transformersIntegrates pretrained transformer models (BERT, RoBERTa, XLNet,…
- spark-nlpSpark NLP provides distributed natural language processing on Apache…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
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.
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.
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.
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.
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.
LangChain Core provides the foundational abstractions and interfaces for building LLM applications, enabling modular composition of language model chains, agents, and tools across the LangChain ecosystem.
Install it if you are building any LLM application that benefits from modular abstractions and ecosystem interoperability.
See also spacy-transformers · transformers-stream-generator · diffusers · sentence-transformers · modelscope · setfit · qwen-omni-utils · curated-transformers · timm · trl