Contents

transformers 5.2.0

0

Transformers: the model-definition framework for state-of-the-art machine learning models in text, v

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.

Stars: 156589, Watchers: 156589, Forks: 32121, Open Issues: 2282

The huggingface/transformers repo was created 7 years ago and the last code push was 5 hours ago.
The project is extremely popular with a mindblowing 156589 github stars!

How to Install transformers

You can install transformers using pip

pip install transformers

or add it to a project with poetry

poetry add transformers

Package Details

Author
The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)
License
Apache 2.0 License
Homepage
https://github.com/huggingface/transformers
PyPi:
https://pypi.org/project/transformers/
GitHub Repo:
https://github.com/huggingface/transformers

Classifiers

  • Scientific/Engineering/Artificial Intelligence
No  transformers  pypi packages just yet.

Errors

A list of common transformers errors.

Code Examples

Here are some transformers code examples and snippets.

GitHub Issues

The transformers package has 2282 open issues on GitHub

  • Add pytest-random-order for reproducible test randomization
  • Fix Llama4 vision attention scaling for TP compatibility
  • fix(config): Fix incorrect default vision/audio config initialization in Phi4MultimodalConfig
  • Phi4MultimodalConfig incorrectly initializes default vision/audio configs when passed as None
  • refactor: use BatchLinear in Qwen2Moe to enable PEFT/LoRA support
  • Remove stale TODO comments in UDOP tied weights
  • Fix: AutoVideoProcessor returns incorrect shape for batched tensor inputs (#43450)
  • [SAM 3 Video] Sam3VisionEncoderOutput object has no attribute 'fpn_position_embeddings'
  • [SAM3 Video] get_text_features returns CLIPTextModelOutput but code expects tensor
  • Fix Apertus model loading (NotImplementedError: Cannot copy out of meta tensor; no data!)
  • Introduce standardized BatchLinear module for MoE architectures to facilitate PEFT and Quantization
  • cli: Improve serve missing dependency error
  • Fix MusicgenForConditionalGeneration config_class inheritance
  • argparser: Allow optional bool flags without values
  • RagTokenizer: add encode and patch_token(_id) forwarding

See more issues on GitHub

Related Packages & Articles

thinc 9.1.1

A refreshing functional take on deep learning, compatible with your favorite libraries

nlp 0.4.0

HuggingFace/NLP is an open library of NLP datasets.

spacy 3.8.11

Industrial-strength Natural Language Processing (NLP) in Python

keras 3.13.2

Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow. The core data structures of Keras are layers and models. The philosophy is to keep simple things simple, while allowing the user to be fully in control when they need to (the ultimate control being the easy extensibility of the source code via subclassing).

tensorflow 2.20.0

TensorFlow is an open source machine learning framework for everyone.

gensim 4.4.0

Python framework for fast Vector Space Modelling