Getting Started
- Install the library — Run
pip install transformersto install the package, optionally alongsidetorch,tensorflow, orjaxdepending on your preferred backend. - Pick a model — Browse the Hugging Face Hub to find a pretrained model suited to your task (e.g.,
meta-llama/Llama-3,openai/whisper-large,google/vit-base-patch16-224). - Run inference — Use the
pipeline()API for quick inference:from transformers import pipeline; pipe = pipeline('text-generation', model='gpt2'); pipe('Hello, world!'). - Fine-tune or customize — Load model weights with
AutoModelandAutoTokenizerclasses and plug them into your own training loop or use the built-inTrainerAPI.
Key Features
- Unified Model Hub — Access over 500,000 pretrained model checkpoints directly from the Hugging Face Hub with a single line of code.
- Latest release (early March 2026) — The most recent release adds support for new model architectures, hardware backends, and continued refinements to the pipeline API.
- Multi-framework support — Works seamlessly with PyTorch, TensorFlow, and JAX, with easy model conversion between backends.
- Pipeline API — High-level
pipeline()abstraction lets you run inference for text generation, classification, summarization, translation, image recognition, and more without boilerplate. - Fine-tuning tools — Includes a
Trainerclass and integration with PEFT, making it straightforward to fine-tune large models with minimal memory overhead. - Broad modality coverage — Supports text, vision, audio, video, and multimodal models under a single consistent API.
- Latest release (early March 2026) — The most recent release continues to expand model coverage, framework compatibility, and inference performance.
- Local and private inference — Models run entirely on your own hardware with no data sent to external servers, suitable for sensitive or offline workloads.
- Latest release (early March 2026) — The most recent release continues to expand model compatibility, hardware optimizations, and support for the latest architectures on the Hub.
// related tools
Aider
AI / AI Coding Tools
Terminal-based AI pair programmer that edits code in your git repo
oss
web git
AutoGPT
AI / Agents & Automation
Open-source platform to build, deploy, and run autonomous AI agents
oss
web git
Bolt.new
AI / AI Coding Tools
Full-stack web app builder — prompt to deployed app in minutes
freemium
web git