v0.10.0
版本发布时间: 2020-11-12 22:22:05
facebookresearch/fairseq最新发布版本:v0.12.2(2022-06-28 03:32:58)
It's been a long time since our last release (0.9.0) nearly a year ago! There have been numerous changes and new features added since then, which we've tried to summarize below. While this release carries the same major version as our previous release (0.x.x), if you have code that relies on 0.9.0, it is likely you'll need to adapt it before updating to 0.10.0.
Looking forward, this will also be the last significant release with the 0.x.x numbering. The next release will be 1.0.0 and will include a major migration to the Hydra configuration system, with an eye towards modularizing fairseq to be more usable as a library.
Changelog:
New papers:
- Reducing Transformer Depth on Demand with Structured Dropout (Fan et al., 2019)
- MBART: Multilingual Denoising Pre-training for Neural Machine Translation ({Liu*,Gu*,Goyal*} et al., 2020)
- Neural Machine Translation with Byte-Level Subwords (Wang et al., 2019)
- Training with Quantization Noise for Extreme Model Compression ({Fan*,Stock*} et al., 2019)
- Monotonic Multihead Attention (Ma et al., 2020)
- Unsupervised Quality Estimation for Neural Machine Translation (Fomicheva et al., 2020)
- wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations (Baevski et al., 2020)
- Lexically constrained decoding with dynamic beam allocation
- Generating Medical Reports from Patient-Doctor Conversations Using Sequence-to-Sequence Models (Enarvi et al., 2020)
- Linformer: Self-Attention with Linear Complexity (Wang et al., 2020)
- Cross-lingual Retrieval for Iterative Self-Supervised Training (Tran et al., 2020)
- Deep Transformers with Latent Depth (Li et al., 2020)
- Better Fine-Tuning by Reducing Representational Collapse (Aghajanyan et al. 2020)
Major new features:
- TorchScript support for Transformer and SequenceGenerator (PyTorch 1.6+ only)
- Model parallel training support (see Megatron-11b)
- TPU support via
--tpu
and--bf16
options (775122950d145382146e9120308432a9faf9a9b8) - Added VizSeq (a visual analysis toolkit for evaluating fairseq models)
- Migrated to Python logging (fb76dac1c4e314db75f9d7a03cb4871c532000cb)
- Added “SlowMo” distributed training backend (0dac0ff3b1d18db4b6bb01eb0ea2822118c9dd13)
- Added Optimizer State Sharding (ZeRO) (5d7ed6ab4f92d20ad10f8f792b8703e260a938ac)
- Added several features to improve speech recognition support in fairseq: CTC criterion, external ASR decoder support (currently only wav2letter decoder) with KenLM and fairseq language model fusion
Minor features:
- Added
--patience
for early stopping - Added
--shorten-method=[none|truncate|random_crop]
to language modeling (and other) tasks - Added
--eval-bleu
for computing BLEU scores during training (60fbf64f302a825eee77637a0b7de54fde38fb2c) - Added support for training huggingface models (e.g.
hf_gpt2
) (2728f9b06d9a3808cc7ebc2afa1401eddef35e35) - Added FusedLAMB optimizer (
--optimizer=lamb
) (f75411af2690a54a5155871f3cf7ca1f6fa15391) - Added LSTM-based language model (
lstm_lm
) (9f4256edf60554afbcaadfa114525978c141f2bd) - Added dummy tasks and models for benchmarking (91f05347906e80e6705c141d4c9eb7398969a709; a541b19d853cf4a5209d3b8f77d5d1261554a1d9)
- Added tutorial and pretrained models for paraphrasing (630701eaa750efda4f7aeb1a6d693eb5e690cab1)
- Support quantization for Transformer (6379573c9e56620b6b4ddeb114b030a0568ce7fe)
- Support multi-GPU validation in fairseq-validate (2f7e3f33235b787de2e34123d25f659e34a21558)
- Support batched inference in hub interface (3b53962cd7a42d08bcc7c07f4f858b55bf9bbdad)
- Support for language model fusion in standard beam search (5379461e613263911050a860b79accdf4d75fd37)
Breaking changes:
- Updated requirements to Python 3.6+ and PyTorch 1.5+
-
--max-sentences
renamed to--batch-size
- Main entry point scripts (eval_lm.py, generate.py, etc.) removed from root directory into
fairseq_cli
- Changed format for generation output;
H-
now corresponds to tokenized system outputs and newly addedD-
lines correspond to detokenized outputs (f353913420b6ef8a31ecc55d2ec0c988178698e0) - We now log the stats from the log-interval (displayed as
train_inner
) instead of a rolling average over each epoch. - SequenceGenerator/Scorer does not print alignment by default, re-enable with
--print-alignment
- Print base 2 scores in generation scripts (660d69fd2bdc4c3468df7eb26b3bbd293c793f94)
- Incremental decoding interface changed to use
FairseqIncrementalState
(4e48c4ae5da48a5f70c969c16793e55e12db3c81; 88185fcc3f32bd24f65875bd841166daa66ed301) - Refactor namespaces in Criterions to support library usage (introduce
LegacyFairseqCriterion
for BC) (46b773a393c423f653887c382e4d55e69627454d) - Deprecate
FairseqCriterion::aggregate_logging_outputs
interface, useFairseqCriterion::reduce_metrics
instead (86793391e38bf88c119699bfb1993cb0a7a33968) - Moved
fairseq.meters
tofairseq.logging.meters
and added new metrics aggregation module (fairseq.logging.metrics
) (1e324a5bbe4b1f68f9dadf3592dab58a54a800a8; f8b795f427a39c19a6b7245be240680617156948) - Reset mid-epoch stats every log-interval steps (244835d811c2c66b1de2c5e86532bac41b154c1a)
- Ignore duplicate entries in dictionary files (dict.txt) and support manual overwrite with
#fairseq:overwrite
option (dd1298e15fdbfc0c3639906eee9934968d63fc29; 937535dba036dc3759a5334ab5b8110febbe8e6e) - Use 1-based indexing for epochs everywhere (aa79bb9c37b27e3f84e7a4e182175d3b50a79041)
Minor interface changes:
- Added
FairseqTask::begin_epoch
hook (122fc1db49534a5ca295fcae1b362bbd6308c32f) -
FairseqTask::build_generator
interface changed (cd2555a429b5f17bc47260ac1aa61068d9a43db8) - Change
RobertaModel
base class toFairseqEncoder
(307df5604131dc2b93cc0a08f7c98adbfae9d268) - Expose
FairseqOptimizer.param_groups
property (8340b2d78f2b40bc365862b24477a0190ad2e2c2) - Deprecate
--fast-stat-sync
and replace withFairseqCriterion::logging_outputs_can_be_summed
interface (fe6c2edad0c1f9130847b9a19fbbef169529b500) -
--raw-text
and--lazy-load
are fully deprecated; use--dataset-impl
instead - Mixture of expert tasks moved to
examples/
(8845dcf5ff43ca4d3e733ade62ceca52f1f1d634)
Performance improvements:
- Use cross entropy from apex for improved memory efficiency (5065077dfc1ec4da5246a6103858641bfe3c39eb)
- Added buffered dataloading (
--data-buffer-size
) (411531734df8c7294e82c68e9d42177382f362ef)