MyGit

facebookresearch/fairseq

Fork: 6401 Star: 30394 (更新于 2024-10-29 13:40:03)

license: MIT

Language: Python .

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.

最后发布版本: v0.12.2 ( 2022-06-28 03:32:58)

GitHub网址



Support Ukraine MIT License Latest Release Build Status Documentation Status CicleCI Status


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:

List of implemented papers

What's New:

Previous updates

Features:

We also provide pre-trained models for translation and language modeling with a convenient torch.hub interface:

en2de = torch.hub.load('pytorch/fairseq', 'transformer.wmt19.en-de.single_model')
en2de.translate('Hello world', beam=5)
# 'Hallo Welt'

See the PyTorch Hub tutorials for translation and RoBERTa for more examples.

Requirements and Installation

  • PyTorch version >= 1.10.0
  • Python version >= 3.8
  • For training new models, you'll also need an NVIDIA GPU and NCCL
  • To install fairseq and develop locally:
git clone https://github.com/pytorch/fairseq
cd fairseq
pip install --editable ./

# on MacOS:
# CFLAGS="-stdlib=libc++" pip install --editable ./

# to install the latest stable release (0.10.x)
# pip install fairseq
  • For faster training install NVIDIA's apex library:
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" \
  --global-option="--deprecated_fused_adam" --global-option="--xentropy" \
  --global-option="--fast_multihead_attn" ./
  • For large datasets install PyArrow: pip install pyarrow
  • If you use Docker make sure to increase the shared memory size either with --ipc=host or --shm-size as command line options to nvidia-docker run .

Getting Started

The full documentation contains instructions for getting started, training new models and extending fairseq with new model types and tasks.

Pre-trained models and examples

We provide pre-trained models and pre-processed, binarized test sets for several tasks listed below, as well as example training and evaluation commands.

We also have more detailed READMEs to reproduce results from specific papers:

Join the fairseq community

License

fairseq(-py) is MIT-licensed. The license applies to the pre-trained models as well.

Citation

Please cite as:

@inproceedings{ott2019fairseq,
  title = {fairseq: A Fast, Extensible Toolkit for Sequence Modeling},
  author = {Myle Ott and Sergey Edunov and Alexei Baevski and Angela Fan and Sam Gross and Nathan Ng and David Grangier and Michael Auli},
  booktitle = {Proceedings of NAACL-HLT 2019: Demonstrations},
  year = {2019},
}

最近版本更新:(数据更新于 2024-10-04 23:54:19)

2022-06-28 03:32:58 v0.12.2

2022-06-13 23:07:55 v0.12.1

2022-06-10 22:45:28 v0.12.0

2021-01-06 04:26:03 v0.10.2

2020-11-22 04:52:27 v0.10.1

2020-11-12 22:22:05 v0.10.0

2019-12-04 22:31:56 v0.9.0

2019-08-14 20:16:38 v0.8.0

2019-07-19 21:41:44 v0.7.2

2019-06-20 23:24:10 v0.7.1

主题(topics):

artificial-intelligence, python, pytorch

facebookresearch/fairseq同语言 Python最近更新仓库

2024-11-06 03:34:16 home-assistant/core

2024-11-05 16:16:26 Guovin/TV

2024-11-05 15:03:24 Cinnamon/kotaemon

2024-11-04 23:11:11 DS4SD/docling

2024-11-04 10:56:18 open-compass/opencompass

2024-11-04 08:51:21 yt-dlp/yt-dlp