Fairseq(-py) is a sequence modeling toolkit that allows researchers and developers to train custom models for translation, summarization, language modeling and other text generation tasks. We provide reference implementations of various sequence modeling papers. Recent work by Microsoft and Google has shown that data parallel training can be made significantly more efficient by sharding the model parameters and optimizer state across data parallel workers. These ideas are encapsulated in the new FullyShardedDataParallel (FSDP) wrapper provided by fairscale. Fairseq can be extended through user-supplied plug-ins. Models define the neural network architecture and encapsulate all of the learnable parameters. Criterions compute the loss function given the model outputs and targets. Tasks store dictionaries and provide helpers for loading/iterating over Datasets, initializing the Model/Criterion and calculating the loss.

Features

  • Multi-GPU training on one machine or across multiple machines (data and model parallel)
  • Fast generation on both CPU and GPU with multiple search algorithms implemented
  • Gradient accumulation enables training with large mini-batches even on a single GPU
  • Mixed precision training (trains faster with less GPU memory on NVIDIA tensor cores)
  • Easily register new models, criterions, tasks, optimizers and learning rate schedulers
  • Flexible configuration based on Hydra allowing a combination of code, command-line and file based configuration

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Fairseq

Fairseq Web Site

You Might Also Like
Achieve perfect load balancing with a flexible Open Source Load Balancer Icon
Achieve perfect load balancing with a flexible Open Source Load Balancer

Take advantage of Open Source Load Balancer to elevate your business security and IT infrastructure with a custom ADC Solution.

Boost application security and continuity with SKUDONET ADC, our Open Source Load Balancer, that maximizes IT infrastructure flexibility. Additionally, save up to $470 K per incident with AI and SKUDONET solutions, further enhancing your organization’s risk management and cost-efficiency strategies.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Fairseq!

Additional Project Details

Programming Language

Python

Related Categories

Python Artificial Intelligence Software, Python Neural Network Libraries

Registered

2021-05-14