Libraries/Python

Hugging Face Transformers

State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow.

Python
AI & Machine Learning
Apache-2.0
v4.46.2
Open source
Trending
Stars
134.0K
Forks
26.8K
Downloads
700.0M
Maintainer
Hugging Face

Installation

Install on any operating system — Windows, macOS, or Linux.

Pick your OS tab below and copy the command for your preferred package manager. We cover language tools (pip, npm, cargo, gem, Maven, NuGet, …) and OS-level managers like winget / choco on Windows, brew on macOS, and apt / dnf / pacman / apk on Linux.

  1. Open a terminal (PowerShell on Windows, Terminal on macOS/Linux).
  2. Make sure the relevant runtime is installed (e.g. Node.js, Python, Rust).
  3. Click the copy icon on a command below, paste, and run.
pip
pip install transformers
pip3
pip3 install transformers
conda
conda install -c conda-forge transformers

Tags

#nlp
#llm
#ai

Quick start

After installing, head to the official documentation for a guided quick start. Most projects include a getting-started orexamples section with copy-pasteable code.

Browse the source on GitHub for issues, releases, and contribution guidelines.