fairseq is a sequence-to-sequence toolkit by Facebook AI Research, written in PyTorch. It provides reference implementations of various models for machine translation, language modeling, and other sequence generation tasks. Current version: 0.12.2. Release cadence is irregular, with the last significant release in 2021.
pip install fairseqVerified import paths — ran on the pinned version, not inferred.
Quickstart: load a pretrained translation model and translate a sentence.
Update model checkpoints or adjust code to match new parameter structure.
Replace .generate() with .translate() in your code.
Refer to the latest documentation and avoid using deprecated APIs.
For new projects, consider using fairseq2 or other actively maintained toolkits.
Use pip install fairseq to get prebuilt wheels or carefully match PyTorch version when building from source.