transformers  by huggingface

ML library for pretrained model inference and training

Created 6 years ago
149,917 stars

Top 0.0% on SourcePulse

GitHubView on GitHub
Project Summary

🤗 Transformers provides state-of-the-art pretrained models for natural language understanding, generation, computer vision, audio, video, and multimodal tasks. It targets researchers, engineers, and developers, offering a unified API to fine-tune models, build inference applications, and leverage generative AI across various modalities, with over 500K+ models available on the Hugging Face Hub.

How It Works

The library offers a unified API for a vast array of pretrained models, abstracting away complex preprocessing and model loading. Its core strength lies in its accessibility and flexibility, allowing users to easily switch between PyTorch, TensorFlow, and JAX frameworks for training, evaluation, and production. The design prioritizes rapid iteration for researchers by exposing model internals with minimal abstraction, while the high-level pipeline API simplifies inference for developers.

Quick Start & Requirements

  • Installation: pip install transformers or uv pip install transformers. For development: git clone https://github.com/huggingface/transformers.git && cd transformers && pip install .
  • Prerequisites: Python 3.9+, PyTorch 2.1+, TensorFlow 2.6+, or Flax 0.4.1+.
  • Resources: Specific model requirements (GPU, VRAM) vary.
  • Links: Quickstart, Documentation, Demo

Highlighted Details

  • Supports over 500K+ pretrained model checkpoints across multiple modalities.
  • Unified API for PyTorch, TensorFlow, and JAX.
  • High-level pipeline API for simplified inference across tasks.
  • Extensive examples for reproducing research results and custom adaptation.

Maintenance & Community

The project is actively maintained by Hugging Face and a large community. Links to community resources are available via the Hugging Face Hub.

Licensing & Compatibility

The library is typically distributed under the Apache 2.0 license, facilitating commercial use and integration with closed-source projects.

Limitations & Caveats

The library is not intended as a modular toolbox for general neural network building blocks; for generic ML loops, libraries like Accelerate are recommended. Example scripts may require adaptation for specific use cases.

Health Check
Last Commit

12 hours ago

Responsiveness

1 day

Pull Requests (30d)
612
Issues (30d)
227
Star History
1,626 stars in the last 30 days

Explore Similar Projects

Starred by François Chollet François Chollet(Author of Keras; Cofounder of Ndea, ARC Prize) and Omar Sanseviero Omar Sanseviero(DevRel at Google DeepMind).

keras-hub by keras-team

0.6%
932
Pretrained model hub for Keras 3
Created 5 years ago
Updated 1 day ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Lewis Tunstall Lewis Tunstall(Research Engineer at Hugging Face), and
13 more.

torchtitan by pytorch

0.7%
4k
PyTorch platform for generative AI model training research
Created 1 year ago
Updated 19 hours ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake), and
4 more.

Awesome-pytorch-list by bharathgs

0.1%
16k
Curated list of PyTorch content on GitHub
Created 8 years ago
Updated 1 year ago
Feedback? Help us improve.