
fairseq
A sequence modeling toolkit for research and production.
A model-definition framework for state-of-the-art machine learning models.

Transformers is a centralized model definition framework supporting state-of-the-art machine learning models across text, computer vision, audio, video, and multimodal domains. It facilitates both inference and training, acting as a pivot across various frameworks, including Axolotl, Unsloth, DeepSpeed, and inference engines like vLLM, SGLang, and TGI. The library ensures compatibility with adjacent modeling libraries such as llama.cpp and mlx. Transformers simplifies model definition, making it customizable and efficient for developers, machine learning engineers, and researchers. It supports pre-trained models, reducing computational costs and carbon footprint. Key features include Pipelines for optimized inference, a comprehensive Trainer with mixed precision and distributed training, and fast text generation with LLMs and VLMs.
Transformers is a centralized model definition framework supporting state-of-the-art machine learning models across text, computer vision, audio, video, and multimodal domains.
Explore all tools that specialize in centralized framework support. This domain focus ensures Transformers delivers optimized results for this specific requirement.
Explore all tools that specialize in cross-framework pivot. This domain focus ensures Transformers delivers optimized results for this specific requirement.
Explore all tools that specialize in efficient resource utilization. This domain focus ensures Transformers delivers optimized results for this specific requirement.
Simplified inference class optimized for various machine learning tasks. Supports text generation, image segmentation, and speech recognition.
Comprehensive training module with mixed precision, torch.compile, and FlashAttention support. Enables distributed training for PyTorch models.
Fast text generation with large language models (LLMs) and vision language models (VLMs). Supports streaming and multiple decoding strategies.
Access to 1M+ model checkpoints on the Hugging Face Hub. Models are reproduced closely to the original and offer state-of-the-art performance.
Compatible with various training frameworks (Axolotl, Unsloth, DeepSpeed) and inference engines (vLLM, SGLang, TGI).
Install the Transformers library using pip: `pip install transformers`
Import necessary modules: `from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer`
Load a pre-trained model and tokenizer: `model_name = 'bert-base-uncased'; model = AutoModelForCausalLM.from_pretrained(model_name); tokenizer = AutoTokenizer.from_pretrained(model_name)`
Use the Pipeline for inference: `classifier = pipeline('sentiment-analysis'); result = classifier('This is a great tool!')`
Fine-tune the model using the Trainer class: `trainer = Trainer(model=model, ...)`
Explore available models on the Hugging Face Hub.
Customize model configurations using configuration classes.
Implement distributed training with DeepSpeed or FSDP (Fully Sharded Data Parallel).
All Set
Ready to go
Verified feedback from other users.
"Highly regarded for its ease of use, comprehensive features, and extensive model library."
Post questions, share tips, and help other users.

A sequence modeling toolkit for research and production.

Run and fine-tune machine learning models with a production-ready API.

PostgresML is a Postgres extension that enables you to run machine learning models directly within your database.
The AI community building the future through collaboration on models, datasets, and applications.

An end-to-end open source platform for machine learning.

Simple and efficient tools for predictive data analysis.

Advanced Machine Learning for Neuroimaging Data and Functional Connectivity Analysis.
Continual is an end-to-end AI platform that enables data and analytics teams to build and deploy predictive models in the cloud without writing code.