AI product Open source · Apache-2.0
Transformers is Hugging Face's open-source model-definition framework and Python library for inference and training with pretrained text, computer vision, audio, video, and multimodal machine-learning models. It centralizes model definitions behind a unified API and provides the Pipeline interface, which preprocesses inputs and returns task-specific outputs for applications such as text generation, automatic speech recognition, image classification, and visual question answering. Models can be downloaded and cached from the Hugging Face Hub, and the library supports moving models between PyTorch, JAX, and TensorFlow workflows while exposing model internals for customization. It requires Python 3.10 or later and PyTorch 2.5 or later for the documented installation.