Skip to content
New this week26 prompts for Sora, Veo and Runway video workflows.
Explore video prompts→
AIPrompt123Prompt library

Search AIPrompt123

Search prompts, categories, platforms and repositories

Models & inferencePythonApache-2.0

huggingface/transformers

Transformers provides model architectures, tokenizers and training utilities with a consistent API across thousands of pretrained checkpoints. It is the foundation of much of the open model ecosystem. The library is large; use task-specific pipelines for inference and the Trainer API for fine-tuning.

149.0k stars30.2k forks4.1k contributors1100 open issuesUpdated

What it does

  • Loads and runs thousands of pretrained models locally.
  • Provides tokenizers, pipelines and training utilities.
  • Supports PyTorch, TensorFlow and JAX backends.

Key features

  • Model hub integration with the Hugging Face Hub.
  • Pipelines for common tasks with minimal code.
  • Quantisation, PEFT and device-map support.
  • Extensive documentation and examples.

How to install it

Commands are copied from the project documentation at the time of review. Check the repository for the current version.

Python
pip install -U transformers torch

Install accelerate for device placement.

Alternatives to consider

transformers is a strong default for models & inference, but the right choice depends on your stack, licence constraints and how much control you need. These are the projects we compare most often.

vLLMllama.cppOllama

Prompts that pair with it

All prompts →
Verified Knowledge · FAQ

transformers FAQ

Adoption questions we hear most often about this project.

Related repositories

Models & inference · Go

Run open models locally with a single command and a simple local API.

152.0k13.2kMIT

Models & inference · C++

Efficient C/C++ inference for Llama-family models on CPUs, GPUs and edge devices.

89.0k13.1kMIT

Models & inference · Python

A high-throughput inference and serving engine for LLMs, built around PagedAttention.

58.0k9.7kApache-2.0