fairseq: A Fast, Extensible Toolkit for Sequence Modeling
Paper · 2019 · Myle Ott, Sergey Edunov, Alexei Baevski et al.
Summary
When a researcher changes how a system learns to translate, much of the experiment can stay the same. The sentences still have to be loaded, GPUs still have to share the work, and a decoder still has to turn a series of predictions into a complete translation. Fairseq is an open-source PyTorch toolkit that makes those common operations available across experiments. The paper explains how its design lets researchers replace the neural architecture, the loss calculation, the task, the optimizer, or the learning-rate schedule. The loss calculation can invoke the network itself, which allows an experiment to generate text as part of training. During decoding, a separate interface gives search procedures access to a prediction at each step. Text generation
The toolkit groups sequences of similar lengths so that less of each batch consists of padding. Across GPUs and machines, it trains synchronously, combining the workers’ gradients for a shared update. Fast workers spend less time waiting when the toolkit exchanges ready gradients during back-propagation and lets devices accumulate work across local batches. In mixed-precision training, computation and gradient exchange use FP16, while parameter updates use FP32. A trained system can also decode in FP16. On the WMT'14 English–German test workload with a big Transformer, the authors report 54% higher decoding speed on a V100 GPU and unchanged measured accuracy. With the toolkit, a decoder can also reuse states calculated for prior tokens and use any of three supported methods: top-k sampling, beam search, or diverse beam search. GPU & parallel computing
The application experiments put these capabilities to work on different prediction problems. Big Transformers trained for English–German and English–French translation improve on earlier Transformer BLEU results under a recipe that combines a larger batch with a higher learning rate. The authors evaluate decoder-only Transformers with adaptive input representations by test perplexity on WikiText-103 and One Billion Word. For CNN-DailyMail summarization, they evaluate a base Transformer and a configuration that feeds its encoder representations learned through pretraining on 193M sentences from newscrawl and CNN-DailyMail. The experiments illustrate how the same toolkit can support generating a translation, scoring observed text, and condensing an article. Machine translation · Transformer and attention · BLEU score · Language models & pretraining · Text summarization
Fairseq is distributed under a BSD license and includes pretrained systems. Its checkpoints preserve the state of the network, optimizer, and data loader so that interrupted training can resume from a saved point. The authors also describe automatic conversion of older checkpoints for use by newer releases. The paper’s contribution is a software design for running and extending sequence experiments, together with implementations of the training and inference operations those experiments have in common.
Deep dive: fairseq: A Fast, Extensible Toolkit for Sequence Modeling
Fairseq brings reusable components and fast training and decoding to sequence research, with examples in translation, language modeling, and summarization. · about 74 minutes to read
The problem and its context
What changes when the prediction problem changes
A translation experiment starts from two texts with a defined relationship. One sentence is supplied as a source, and its counterpart in the other language supplies a target. Summarization also has a source and a target, but the source is a document and the target selects and condenses information from it. For next-token prediction, the text itself supplies the target. A system can read a prefix and learn by attempting to predict the token that follows. These problems all use ordered sequences, while the examples have different structures and the predictions serve different purposes.
The differences are visible before any learning happens. A reader for parallel text has to deliver the corresponding sentences together. An article and its summary can occupy quite different amounts of space in a batch. In next-token prediction, the shift from a position in the input to the position being predicted is already defined by the order of the text. Data loading has to preserve these relationships. The computation that receives a batch depends on knowing which text is context and which text is used to determine how well the system predicted.
Other parts of an experiment recur. Text units need identifiers the network can process. Examples need to be assembled into batches so that devices can work on them together. Gradients need to be calculated and passed to an update rule. If several devices are participating, their contributions have to reach the same update. The paper addresses researchers who may want to change just one of these decisions without taking responsibility for the surrounding implementation. It also addresses developers who need available implementations to run efficiently on the hardware they use.
The training objective is an example of a decision with implications beyond choosing a formula for a score. A simple objective can evaluate predictions for examples that already have targets. Other objectives need the system to produce a candidate sequence before the loss can be calculated. In a mixture of experts, the objective can compare several alternatives and give the learning signal to the one it selects. Which of these experiments a toolkit can express depends on what information it provides to the code that calculates the loss.
Generating a finished sequence poses a related design question. A predictor may give strong scores to several possible next words in a translation. The program producing the translation has to decide whether to pursue one possibility immediately or keep alternatives under consideration. The choice of search procedure belongs to the process that builds the output. The scores it uses belong to the network’s calculation. Making the connection through a prediction for each step lets an experiment change how a candidate is scored or change how those scores guide its selection.
These considerations help explain why an architecture, even with its trained weights available, describes only part of a reproducible result. The result also depends on the data used to learn those weights, the objective and update settings, and the way the system produces text for evaluation. If an experiment is interrupted during training, its data loader and optimizer also have a state at the point where it stopped. The toolkit paper makes those responsibilities explicit because they affect how reference experiments can be reused.
Where the work goes during training and generation
One cost of handling sequences arises from their unequal lengths. A computation on a batch can use arrays in which each example has the same amount of space. A shorter example is padded to fit. If a sentence sits beside a much longer one, it occupies a row sized to accommodate more content than the sentence contains. Translation has variable length on the target side as well as on the source side. The way sentence pairs are grouped therefore determines how much of each array holds text and how much is padding.
Adding devices introduces a coordination cost. Each GPU can process a portion of the examples, but synchronous optimization requires the portions to contribute to a common update. A fast worker may finish while another device is still calculating its gradients. The authors observe differences in processing time even when the workers have similar numbers of tokens. A batching policy can balance the count of units assigned to the devices and still leave differences in when the work is ready.
The placement of communication matters because a backward pass produces its results over time. A backward pass computes gradients, which express how the loss changes with the network parameters. The gradient for one layer can be available while the gradient for another is still being calculated. A schedule that exchanges gradients only after the entire backward pass places all the communication at the end. As soon as an earlier part is complete, there is an opportunity to begin some of the transfer while another part of the network is still doing useful work.
Worker delays are also tied to how frequently the devices have to coordinate. If an exchange follows every local batch, a slow batch can cause a separate wait each time it occurs. When a device can process another batch after finishing its current one, the interval between shared steps covers more of each worker’s activity. This gives training more room to handle variation in local processing times. It changes the amount of data that contributes to the next update, so the scheduling decision also enters the learning procedure.
The paper addresses the numerical cost of computation as a separate issue. The authors describe GPUs that can handle half-precision floating-point operations efficiently. A smaller representable range makes it easier to lose small values needed for learning. There is a design choice about where to use the faster arithmetic and where to retain full precision. There is also an ordering question. The signal used in training has to survive the lower-precision part of the calculation before a higher-precision update can use it.
After training, the source of repeated work changes. A decoder adds a token and then uses the resulting prefix to decide what could follow. Much of that prefix was present at the previous step. When a computation for the earlier tokens continues to apply, saving it can reduce the work in the next prediction. Search can keep several candidate prefixes active at once, so reuse depends on keeping the right internal information with each candidate. A decoder’s architecture determines which intermediate results can be carried forward.
These costs appear at several scales. Padding occurs within a batch, delays arise among workers, and repeated calculations occur along a candidate’s history. An efficient toolkit needs access to different information at each scale. The batch builder sees the lengths of the examples. The training implementation knows when gradients are ready. The decoder knows what it previously calculated for the prefix. Fairseq’s design places each operation where that information is available.
How the authors describe earlier tools
The authors situate fairseq among toolkits with much of the same basic purpose and different emphases. OpenNMT is their example of a community-built toolkit with extensibility as a priority and implementations in several programming languages. MarianNMT takes performance as a priority and uses a C++ backend for fast automatic differentiation, the process that works out derivatives from the operations in a computation. In the authors’ account, the choice of backend serves the work that has to happen during learning.
OpenSeq2Seq provides reference implementations for distributed training and for work in mixed precision. That emphasis meets the same practical questions about communication and arithmetic that fairseq addresses. The paper associates Tensor2Tensor and Sockeye with readiness for production. These descriptions establish how the authors place the toolkit among its contemporaries. They are descriptions of design priorities. Fairseq’s own goal is to bring adaptable research interfaces, efficient execution, and trained systems that developers can use into one PyTorch implementation.
The paper also acknowledges an earlier version of fairseq written for Lua/Torch. In the PyTorch implementation discussed here, the neural network follows the framework’s conventions for a module. This lets the implementation participate in a fairseq experiment and be called from other PyTorch code. The toolkit supplies the surrounding machinery for tasks and generation while retaining the network’s identity as a PyTorch component.
Research on sequence architectures supplies several of fairseq’s reference implementations. The attention-based LSTM work gives an example of translation using a recurrent network, where a state carries information through successive positions. Convolutional sequence-to-sequence work supplies an example that combines information across positions with convolutional operations. The Transformer relies on attention, which lets computation for a position draw on information associated with other positions. The choice of architecture changes how predictions are made. Fairseq provides a common way for the rest of an experiment to request them. Effective Approaches to Attention-based Neural Machine Translation · Convolutional Sequence to Sequence Learning · Attention Is All You Need
Earlier work also provides choices about the course of optimization. The Transformer paper supplies the inverse square-root schedule named in the toolkit description. Another example, based on warm restarts, gives the rate a cyclic pattern. A researcher can use a proposed schedule with an existing optimizer, which is one reason for giving the schedule a separate interface. The update rule can continue to process gradients in the same way while the rate supplied to it follows a different pattern. SGDR
Search provides an additional place to make a choice already available in the field. Ordinary beam search keeps a group of partial outputs and extends them using the next-token scores. Diverse beam search aims for more variety among the candidates that survive. Top-k sampling draws from a restricted set of strongly scored next-token options. Support for these procedures is part of the software’s scope. Their common dependency is access to a prediction at the current step, even though each procedure uses that prediction differently.
The authors cite applications in story generation, grammatical error correction, multilingual sentence embeddings, and dialogue alongside the tasks evaluated in detail. A story generator has to continue text. A correction system starts from text to be revised. Work on sentence embeddings uses a learned representation of a sentence, while dialogue gives output a role in an exchange. Each application gives a different meaning to input, prediction, or target. The examples help explain why the paper emphasizes the availability of reusable components across tasks. Hierarchical Neural Story Generation · Massively Multilingual Sentence Embeddings · Wizard of Wikipedia
The method, step by step
Following a batch through training
Consider a batch of aligned sentences for translation. Each sentence is represented as a sequence of tokens, the units that stand for the text in the computation. A token can be part of a word, and a dictionary maps it to the identifier used by the network. The task loads the paired examples and makes them available for grouping. Once the batch is assembled, the criterion can use it and the network to obtain a loss. Tokenization
The loss is the quantity the training procedure seeks to reduce. The forward calculation produces what the criterion uses to obtain it. Back-propagation starts from the loss and follows the computations backward to find gradients. The optimizer uses those gradients to update the parameters. The scheduler determines the learning rate used as training progresses. A training step connects these roles, while the architecture and the criterion determine which operations are necessary to obtain the loss.
For distributed training, consider the batch behind an update as the work contributed by all participating workers. A worker is a device processing its share of the data with a copy of the network. It runs the computations for its local examples and contributes gradients. Several local passes can contribute to one update if the gradients are accumulated. When the exchange takes place, each worker needs the result of combining contributions across the group.
The mixed-precision path adds temporary scaling between the forward and backward passes. The criterion still determines the quantity from which gradients are obtained. The toolkit scales that quantity for the half-precision part of the calculation and restores the original gradient scale before the full-precision update. The flow shows an update with distributed training, overlap, and accumulation in use. Gradient exchange starts when the accumulated values for part of the network are ready during the final backward pass.
A distributed fairseq update in mixed precision
The steps in order.
The part of the procedure that calculates the loss can vary substantially from task to task. The distributed implementation acts on the gradients this calculation produces. After training, much of that pipeline gives way to a forward procedure that repeatedly predicts what could come next. The architecture participates in both stages, which is why the paper specifies what the network must make available to both training and generation.
Defining a network and exposing its predictions
The architecture plug-in owns the parameters that can be learned. It also determines how inputs and those parameters enter the computations inside the network. A trained set of weights is one possible state of that architecture. This distinction gives the toolkit a way to offer reference configurations before training as well as pretrained instances whose parameter values are already available.
In code, the network extends BaseFairseqModel, which extends torch.nn.Module. The PyTorch base class supplies the convention for using the network as a module. A fairseq implementation can therefore be used within other PyTorch code. This property is different from the conventions needed by the toolkit’s task or its generator. The module provides the architecture, and those surrounding components provide ways to work with it for a particular purpose.
The architecture plug-in can also give a name to a common group of settings. The authors mention embedding dimensions and layer counts. An embedding is a learned numerical representation of a text unit. Its dimension gives the number of values in that representation. A layer count describes how many stages of a specified kind participate in the architecture. A named configuration makes these decisions available together. Other choices, including the data and learning procedure, still belong to the rest of the experiment.
For generation, the common convention is a stepwise prediction interface. A search procedure working on a prefix can ask the network what could follow. The architecture computes the prediction using whatever internal representation it defines. In an encoder–decoder translation system, that prediction can draw on the encoded source and on the target prefix. The search code receives information suitable for deciding which candidates to carry forward.
A useful way to see the boundary is to imagine replacing the method of computing the next-token scores. A convolutional decoder and a Transformer can process context differently while answering the same kind of request from search. Conversely, given a set of scores, a search procedure can sample an extension or compare extensions from multiple candidates. The prediction interface makes these changes possible at different points in the system. The internal representation stays with the architecture that creates it.
This division also explains why a generic interface for generation leaves room for specialized execution. The search procedure can tell which prefix should be extended. It needs the architecture to say what information from the previous computation will be useful again. When that information is cached, its contents depend on how the network produces the next prediction. Fairseq’s fast decoding combines the common prediction interface with implementations of that reuse inside the relevant components.
Giving the criterion access to the network
The paper calls the loss component a criterion. Its interface is deliberately broad. It gets a batch and access to the network that processes it. The authors express the relationship schematically.
loss = criterion(model, batch)
Here loss is the value used to obtain a training signal. The equals sign says that the expression on the right produces that value. criterion is the callable component that calculates it. The parentheses contain the arguments of the call, with the comma separating them. model denotes the neural network available for computation, and batch denotes the examples being processed. The expression specifies the inputs and the result while leaving the loss calculation to the chosen criterion.
For an objective that needs a completed output, the criterion can initiate generation. The generator might extend candidates over many steps before returning a sequence. That sequence can then be used in the computation of the loss. The important point about the interface is where this happens. The criterion can decide to obtain a candidate while it evaluates the batch, because the network is available to it at that point. This is how the authors describe using the design for sequence-level training.
Online backtranslation uses generation to supply training material. The procedure takes text on the desired target side and uses translation in the reverse direction to create text on the source side. That creates a pair the training procedure can use. The online variant carries out generation during training, so the available predictor can take part in the preparation of an example for an update. The criterion’s access to the network gives it a place to do that work as part of its loss calculation.
The mixture-of-experts example uses the same access for a different purpose. An expert is a trainable part of the system that can be considered for an example. The criterion can evaluate what each expert yields, find the one that produces the lowest loss, and arrange for gradients to pass through that expert. The authors describe this as EM-style training. In their example, choosing the expert and updating the chosen computation are distinct parts of how the objective is evaluated.
These uses make different demands on the shared training loop. A sequence-level objective needs a generated candidate, online backtranslation needs generated text to form training material, and expert selection needs to determine which computation will receive a gradient. In each case the criterion has to do some work before the final loss exists. The interface gives it the network it needs for that work. Once the backward pass produces gradients, the optimizer can operate on them through the same surrounding training structure.
Connecting the task, optimizer, and rate schedule
The task is the component that defines the training loop, holds dictionaries, and supplies routines for loading and batching data. The authors intend it to be immutable. Its principal role is to connect the other components. A dictionary establishes the relationship between the text units in an experiment and the identifiers used in computation. The loading and batching routines give the training loop a source of examples in the format the criterion expects.
Different tasks can establish different relationships between input and target. Translation uses paired sequences. A task for language modeling uses the possible continuations within observed text to define what the system predicts. The supplied classification task makes a category the target. The task expresses these differences where the data and training loop meet, so the details of an example can vary while the rest of the loop still calls a criterion and ultimately makes an update.
The optimizer carries out the update from the gradients. The gradient gives local information about how the loss depends on a parameter. The optimizer’s rule decides how to use that information to change the parameter values. Fairseq provides wrappers for most of the optimizers available in PyTorch. It also implements Adafactor, described by the authors as an Adam variant designed to use memory efficiently. These are different ways to implement the same role in the loop.
A scheduler supplies the rate that applies at a given point in a run. That rate helps determine the size of the optimizer’s steps. Fairseq includes an inverse square-root schedule associated with the earlier Transformer work and cyclic schedules based on warm restarts. In a cyclic schedule, the rate can begin a new cycle during an ongoing training run. The scheduler governs that progression even when the rule for converting gradients into updates stays the same.
A useful distinction follows between the amount of data informing a gradient and the rate used to act on it. Accumulation changes how many examples are represented in an update. The learning rate changes how the optimizer uses the gradient in taking a step. The experiment can choose these settings together, as the authors do for translation. Their software roles remain distinct, with the training implementation organizing the contributions and the optimizer acting at the rate it is supplied.
Grouping sequences by shape and shuffling the batches
Suppose two source sentences are similar in length. Those sentences can fit together in an array without one requiring much extra space. Their translations might still have very different lengths. A group that is compact on the source side can consequently need substantial padding on the target side. Fairseq’s batching considers the lengths of source and target sequences when forming groups. The method aims to keep both sides compact for the examples that share a batch.
Grouping affects what the examples have in common. A batch formed this way can contain sentences in a narrow range of lengths even when the data contain many kinds of sentences. The paper says that once the mini-batches are formed, their membership stays fixed. Randomness is introduced by shuffling those batches at each epoch, a pass through the training data. The sequence of groups seen during training changes, while the examples within a group keep the length relationship used to assemble them.
The word batch describes a few related units in the distributed setup. A sub-batch is the portion a GPU processes locally. The sub-batches assigned across GPUs contribute to a shared mini-batch for synchronous optimization. If several local passes are accumulated before the optimizer advances, the effective batch for the update includes their combined examples as well. Which unit is meant matters when discussing padding, because padding is applied to the sequences processed together, and when discussing learning, because an update can reflect work from many such groups.
Locally compact batches can contribute a wider mix of lengths after the workers combine their gradients. The authors expect workers to receive sub-batches with differing average sentence lengths. The combined update can therefore use examples from several of those length ranges. This is the basis for their suggestion that the updates can be more representative when training across devices. It is a statement about how local grouping and distributed aggregation interact.
Batch size is also a way to describe workload. Similar token counts suggest that the workers have received similar amounts of text. The authors report appreciable variation in processing time despite this consideration. The operation of grouping and assigning examples can address padding and the distribution of text between devices. The time each worker takes to produce its gradients then gives rise to a separate scheduling problem.
Overlapping the gradient exchange with computation
The distributed implementation uses NCCL2 and torch.distributed for communication between GPUs. Each GPU processes its sub-batch with a replica of the network. The gradients produced by the backward pass are combined through an all-reduce, a collective operation that provides the participants with the combined result. The training update is synchronous because the devices wait for the gradient information required for that update.
The first schedule in the paper’s timing figure shows what happens if the exchange is deferred until backward computation is complete. The devices can take different amounts of time for their local forward and backward passes. A device that finishes early has gradients ready and has to wait for the final worker. Synchronization then occupies a further interval. The next round of work begins after the shared step.
Fairseq makes use of gradients as they become available. When a layer’s backward computation is complete, its gradients go into a buffer. The buffer groups ready values for transfer. Once its size reaches a threshold, the toolkit begins exchanging those values in a background thread. Back-propagation continues on the remaining layers. The layer gradients eligible for communication at that moment are the ones already produced and grouped for exchange.
The timing figure’s overlap panel places the exchange partly alongside the backward pass. This placement is possible because the gradient from a completed layer can be exchanged without having to wait for a later layer’s computation to produce its own gradient. The optimizer still needs the combined result for the update. Starting the exchange earlier moves some communication into time during which there was already computation to perform. How much remains afterwards depends on when the transfer starts and how far it proceeds during that interval.
The buffer threshold governs when the exchange gets underway. A layer finishing is the event that makes its new values eligible to join the buffer. Reaching the threshold is the event that launches communication. This distinction explains why the mechanism is described in terms of both a layer’s progress and the amount of data ready to transfer. The paper’s figure gives the order and overlap of the operations without attaching measured durations to the segments.
The readiness of a local gradient and the readiness of a shared gradient are also distinct. The local value is the result of computation on a worker’s own examples. The optimizer uses the combined gradient after the relevant exchange. Other local gradients can still be in progress when communication begins for that earlier group of values. This lets the implementation use work as soon as its dependencies permit, with the synchronization requirement retained for the update itself.
Accumulating local gradients before the next shared step
The final schedule depicted in the paper allows devices to continue through several local batches before synchronizing. When a GPU completes one local backward pass, it keeps the gradient contribution and can begin the next forward computation. Other workers may reach that point earlier or later. A common exchange is needed for the accumulated gradients at the end of the interval, so the individual boundaries between batches do not each impose a wait across all devices.
Consider a worker that has a slow first batch and a fast subsequent one. Another device might show the reverse order. With synchronization between the batches, the workers can encounter two waits, each determined by whichever device is slower at that point. With accumulation, their progress up to the eventual exchange depends on the combined local work. Opposing differences in local duration can partly offset each other. This is the reason the authors give for expecting less variation in timing between workers over the accumulation interval.
The paper’s last panel shows that the techniques can be used together. Once the final backward pass starts yielding the gradients needed for the accumulated contribution, the exchange can proceed for ready groups of values while that pass continues. The earlier local passes have proceeded without a separate exchange after each one. The schedule thus changes both the number of occasions on which workers synchronize and the position of the eventual communication relative to calculation.
An accumulated update covers more training data. That creates a relationship between the execution mechanism and the optimization recipe. The optimizer takes a step after contributions from a larger effective batch have been formed. The authors cite their work on scaling translation as evidence that effective training is possible with such batches. Their account of distributed execution explains how the data are combined. The translation recipe also makes a choice about learning rate, which enters when the resulting gradients determine the update. Scaling Neural Machine Translation
The changes are easiest to interpret in terms of the work being timed. An update that incorporates several local batches represents more examples than an update after each local pass. The communication benefit comes from sharing an exchange across that work and doing some of it during a backward pass. The quality of the resulting network depends on the learning process that uses the accumulated gradients. The paper’s timing diagram explains the former through the placement of operations, and the translation configuration gives a concrete use of the latter.
Scaling the loss for mixed-precision training
Fairseq supports FP32 and FP16 for training and inference. FP32 is the full-precision format in the paper’s comparison, and FP16 is the half-precision format. The formats differ in the values they can represent. A gradient that has very small magnitude can underflow in half precision. Underflow means the format cannot adequately retain a value that small, which can remove part of the signal the optimizer would otherwise use.
The mixed-precision procedure divides the training operations by role. Forward and backward computation run in FP16. The reduction of gradients across devices also uses FP16. The parameter update is performed in FP32. The authors give preservation of accuracy as the reason for keeping the update in full precision. The arithmetic used for most of the calculation and for inter-device communication can thereby be different from the arithmetic used to change the weights.
Dynamic loss scaling intervenes after the forward pass. The loss has already been calculated. The toolkit scales it before differentiation so that the backward computation starts from a value in the intended range. Differentiating a scaled loss produces gradients with the corresponding scale. This allows small gradient signals to be carried at a more useful magnitude during the lower-precision stages. Back-propagation otherwise proceeds through the usual dependencies of the computation.
After the gradients have been synchronized, fairseq converts them to FP32 and restores their original scale. The optimizer then acts on those restored gradients. The temporary scaling is used to carry values through the lower-precision calculation and exchange. The learning rate enters the subsequent update rule and has its own role in determining the change to the parameters. The order of conversion, unscaling, and updating keeps those two decisions distinct.
The point at which gradients are converted is consequential in a distributed run. The exchange takes place while the gradients are still scaled and represented in FP16. The combined gradients are converted once the synchronization stage is complete. This is how the paper’s design places both gradient calculation and all-reduce on the half-precision side of the procedure while preserving a full-precision update.
For inference, the precision choice applies when a trained network makes predictions. There are forward calculations, and generation can call for a series of them. The operations involved in learning, such as back-propagation and updating weights, have already finished. The paper’s decoding comparison accordingly tests what changes when the prediction and generation workload runs with a different numerical format. Dynamic loss scaling belongs to the training path described above.
Turning predictions into a sequence
In an encoder–decoder system, the encoder first processes the input and gives the decoder a representation it can consult. The decoder makes a prediction for the next token using the source information and the output prefix available so far. Search can act on that prediction, extend a candidate, and ask again at the next step. When a decoder learns to predict continuations from text alone, the preceding text supplies the predictive context without requiring a separate source encoder.
Beam search maintains a limited set of possible outputs as they grow. It compares candidates after extensions and keeps a set for further consideration. The beam width sets the size of that set. A promising continuation can survive while a competing one is explored, so the first strongly scored choice need not settle the remainder of the sequence. The procedure ultimately ranks completed candidates based on the information gathered along their paths.
The translation configuration includes a length penalty as part of this ranking. Two completed candidates can differ in length, and the penalty setting governs how length affects their comparison. That choice can affect which sentence is actually returned even when the predictor scores every extension in the same way as before. For this reason the paper reports beam width and length penalty as settings of the evaluated translation system.
The other search modes use stepwise scores in their own ways. Diverse beam search aims to keep alternatives that differ from one another, giving the generator a set of candidates with more variety. Top-k sampling first restricts the available next tokens by score. It then samples within that set. The symbol k denotes the size of the restricted set. These choices live on the generation side of the interface. The paper uses ordinary beam search for its reported translation evaluation.
Reusing computations for an unfinished output
As the decoder adds a token, it still needs information about the text already generated. A straightforward implementation can calculate that information from the prefix again at each step. Incremental decoding retains intermediate states from earlier steps and brings them to the next prediction. The architecture then calculates the new states needed for the latest token while using the stored results for the earlier tokens.
The saved states correspond to a candidate in the beam. Each live candidate has a prefix, and the states derived from that history have to stay associated with it. A different candidate can take a different extension and hence differ in the states needed for future predictions. Maintaining a cache for each active candidate lets the decoder reuse the appropriate history as the search keeps some candidates and discards others.
A cache holds the results of computations on earlier tokens. The spelling of the prefix identifies the sequence, while the cached internal quantities contain information the architecture has already derived from it. The paper identifies multi-head attention in the Transformer as a component that requires its own caching implementation. The relevant code has to know what can be retained across steps and how to use it when processing a new token. The prediction interface and the component’s implementation together make that reuse possible.
The authors discuss incremental decoding for non-recurrent architectures. Their claim of a possible speed gain is relative to a naive implementation that repeatedly recomputes prefix states. The saving comes from reducing work inside a series of predictions. Its source is the continued validity of the cached information as the prefix grows. This is a separate mechanism from grouping several inputs for decoding at once.
Inference batches are built using a user-specified token limit. An inference batch can contain varying numbers of examples under that limit. A batch with long inputs can accommodate fewer examples than a batch of shorter inputs under the same budget. The examples inside a batch can then be processed together, while each active beam carries the states relevant to its own generated prefix. Batching determines how distinct examples share the computation. Caching determines what a continuing candidate can reuse.
Saving the state of a run
A checkpoint contains more than the weights used to make predictions. Fairseq saves the state of the network, the optimizer, and the data loader. The optimizer needs the information its update rule has retained. The data loader needs the state that governs which training examples it presents as the run continues. Restoring these together is intended to let a run continue from its saved position after an interruption.
The distinction is visible if a network is used for two purposes at the checkpoint. For prediction, the parameter values determine the trained computation that will be called. For continued training, the next use of those values includes a particular optimizer state and a point in the sequence of training work. A checkpoint that preserves all of these captures the circumstances of the next update as well as the network’s current predictions.
The authors describe a further use of saved state across releases of the toolkit. Older checkpoints are automatically upgraded for use by newer code. A checkpoint written by one version can have a representation that a newer version needs to interpret differently. The upgrade provides the conversion needed to make the trained system usable in the newer release. Fairseq is distributed through GitHub under a BSD license, and the authors supply pretrained systems for its reference applications.
Experiments and results
What each benchmark measures
The experiments examine trained systems for translation, next-token prediction, and summarization. Translation and summarization both produce outputs for comparison with references. In translation, BLEU assesses matches between generated sentences and reference translations under a specified scoring protocol. In summarization, ROUGE measures forms of overlap with reference summaries. The language benchmarks ask how much probability the trained system assigns to observed text and report that assessment as perplexity. A separate translation test times the work of decoding.
These quantities answer different questions about an end-to-end system. A decoding rate identifies how quickly a set of translations can be generated. A score based on those translations measures their relationship to the references. Perplexity concerns prediction of the tokens actually present in a corpus. Each result therefore has to travel with the corresponding data, split, architecture, and, where a system generates text, the choices made by the search procedure.
Translation from English into German and French
The translation runs evaluate the big Transformer configuration. The encoder reads the source, and the decoder uses the source representation to generate a target sequence. The authors train and evaluate separate systems for the two language directions. Their German and French setups draw on different earlier experiments, so the corpora and vocabulary settings are specified independently.
For English–German, the training material comes from WMT'16 and contains 4.5M parallel sentence pairs. The authors follow the earlier Transformer’s setup. They validate on newstest13 and evaluate the trained system on newstest14. The validation set is the material reserved for decisions during development. The test set is the material to which the reported benchmark result refers. The German system’s training corpus and its test-set name identify different parts of the experiment. Attention Is All You Need
The English–German vocabulary has 32K entries and is built from the source and target sides jointly by byte pair encoding, or BPE. In this use of BPE, recurring neighboring units are merged to create tokens that can represent parts of words. A word can then be expressed as a sequence of available units. The joint procedure learns the vocabulary from text on both sides of the translation data. The stated count describes the resulting vocabulary used in the experiment. Subword tokenization · Neural Machine Translation of Rare Words with Subword Units
For English–French, training uses 36M sentence pairs from WMT'14. The authors adopt the data setup from the earlier convolutional sequence-to-sequence work, with newstest12+13 for validation and newstest14 for testing. Joint BPE on the source and target supplies a 40K vocabulary. The historical convolutional work is the source for the data preparation in this case. The system evaluated by fairseq under that preparation is the big Transformer. Convolutional Sequence to Sequence Learning
Both translation systems generate outputs using beam search with a width of 4 and a length penalty of 0.6. The authors take these settings from the earlier Transformer work. The width controls how many alternatives search keeps under consideration, and the penalty governs the role of length in ranking. A score reported for this experiment thus measures output from a trained Transformer under the stated search procedure. Keeping the earlier search settings also identifies where the authors’ explanation for the quality gain lies, namely in the training recipe.
BLEU conventions and the translation baselines
Fairseq reports case-sensitive, tokenized BLEU using multi-bleu. The metric compares strings of tokens with corresponding strings in reference translations. Tokenization influences which strings are compared, and case sensitivity retains distinctions in capitalization. An evaluation on already tokenized output therefore carries the preparation of that text into the score.
The authors also use SacreBLEU with detokenized translations. Detokenization restores ordinary text formatting so the scoring package can apply its specified protocol. The paper records a SacreBLEU signature identifying settings such as case handling, reference count, smoothing, test set, tokenization, and package version. Together these settings describe how the score was produced. They let a reader identify the convention needed for comparison with another evaluation. A Call for Clarity in Reporting BLEU Scores
The translation results caption refers to evaluation on news2014 and gives relevant training-data information for the systems compared. WMT'14 is the general training-data designation for its rows. It marks English–German entries (b), (c), and (d) as WMT'16 cases alongside the fairseq English–German setup described in the experiment. The French setup uses WMT'14. Within a language direction the benchmark can provide a common comparison of translations, while the training-corpus labels identify differences among the runs that generated them.
The stated quality result is improved BLEU relative to the earlier Transformer work. The authors attribute the improvement to pairing a larger training batch with a higher learning rate and point to their work on scaling translation for this recipe. More examples contribute to the gradient in the larger batch, and the rate helps set the step taken from that gradient. The result concerns the joint choice. The discussion gives the direction of the BLEU change, with the scoring protocols and the German and French evaluation sets defining how quality is judged. Scaling Neural Machine Translation
The translation table identifies V100 GPUs as the basis for its training times. Those times concern the work of fitting the system. The inference test instead starts from a trained Transformer and measures the rate at which it can generate translations. The distinction matters because the training time includes the forward and backward computations and the parameter updates, while the decoding test exercises the prediction and search path.
Translation throughput in full and half precision
The timed decoding comparison uses a V100 GPU and the big Transformer on the English–German test set of the standard WMT'14 benchmark. FP32 decoding supplies the baseline. Running inference in FP16 produces 54% higher decoding speed for that workload. The authors report that accuracy is unchanged. This is a relative throughput gain on the specified hardware and test, measured while the system generates the translations.
The workloads in the precision comparison are described at the level of decoding a test set. The system has to execute forward computations and make the successive choices that produce full sentences. The speed result measures the rate of that work under the two precision settings. The accompanying accuracy observation concerns the benchmark outcome. The paper gives these as properties of the inference run, while its account of training assigns precision settings to gradients and parameter updates as well.
The incremental-decoding comparison has a different baseline. In that discussion the authors compare reusing earlier states with a naive decoder that computes those states again on each step. They report that reuse can yield up to an order of magnitude in speedup. The precision experiment compares numerical formats, and the caching claim describes how much repeated computation can be removed. Each gain belongs to the conditions of its own comparison.
Predicting observed continuations on the language benchmarks
Fairseq supports both gated convolutional and Transformer architectures for language modeling. The authors also describe standard token embeddings, convolutional character embeddings, adaptive inputs, and adaptive softmax among the supported representation choices. Token embeddings associate learned numerical representations with vocabulary items. Character convolutions provide a way to derive representations using characters. Adaptive input embeddings vary the way items are represented across the vocabulary, while adaptive softmax concerns the output computation used to assign probabilities to tokens. Language Modeling with Gated Convolutional Networks · Character-Aware Neural Language Models
The systems evaluated here are decoder-only Transformers with adaptive input embeddings. The decoder uses preceding text to assign probabilities to possible continuations. For a test in perplexity, the observed continuation supplies the event on which the system is scored. Better probability assignments to the observed text produce lower perplexity within the same evaluation setup. A generated candidate selected by search is unnecessary for this measurement, because the observed token is already available to the scorer. Language model
The WikiText-103 decoder has 16 blocks, an inner dimension of 4K, and an embedding dimension of 1K. A block is a repeated stage of the architecture. Its inner dimension describes the width of the computation inside that stage, and the embedding dimension describes the width of the embedding used to represent input. The paper pairs this configuration with the WikiText-103 test perplexity comparison.
The One Billion Word decoder has 24 blocks, an inner dimension of 8K, and an embedding dimension of 1.5K. Its result caption also identifies sharing of parameters between the adaptive inputs and adaptive softmax. Some learned values therefore take part in both the input and output vocabulary operations. The associated evaluation measures perplexity on One Billion Word’s test set.
Fairseq decoder depth in the WikiText-103 and One Billion Word test configurations
The decoder configured for One Billion Word has more blocks.
The numbers
| System or setting | decoder blocks |
|---|---|
| WikiText-103 fairseq decoder | 16 |
| One Billion Word fairseq decoder (this paper) | 24 |
The chart compares configured depth. The larger depth belongs to a system with different internal and embedding dimensions, evaluated on a different corpus. The quality metric remains test perplexity on each benchmark. The two table captions identify the corresponding test comparisons. The architecture specifications explain which fairseq configuration each test evaluates and which choices the runs have in common.
The paper also describes tutorials and pretrained systems for reproducing earlier results with gated convolutions and adaptive representations on these corpora. Those earlier results supply reference points for the toolkit’s implementations. The two applications in the paper show the decoder-only adaptive-input approach instantiated at different sizes, each with a specified corpus and held-out metric. They give a concrete account of the tested configurations beyond the more general list of representation options available in the software.
Abstractive summaries of CNN-DailyMail articles
The summarization experiment starts with a base Transformer. Its encoder processes a news article, providing information the decoder can use to generate a summary. Abstractive summarization allows the generated text to express the source material in its own wording. The benchmark pairs CNN-DailyMail news articles with reference summaries that can contain multiple sentences. The paper uses the full-text dataset variant and retains the named entities in the articles. Teaching Machines to Read and Comprehend · Abstractive Text Summarization using Sequence-to-sequence RNNs
The article input is truncated to 400 tokens. The dataset’s full-text designation identifies the variant selected for the experiment, while the truncation determines how much text is passed to the encoder. The authors construct the vocabulary with 30K BPE operations, following earlier work on controllable summarization. Here the count describes operations used in vocabulary construction. In the translation setups, the vocabulary figures describe the sizes of the resulting vocabularies.
Generation follows two constraints. The authors tune a minimum length, which limits when a candidate can finish. They also prohibit repetition of a trigram, a run of consecutive tokens of the size specified by that term. If a continuation would repeat such a run, the restriction prevents it from being selected. The resulting summaries thus reflect the decoder’s scores and the conditions under which the generator can extend or finish a candidate. The authors cite earlier summarization practice for this arrangement. Deep reinforced abstractive summarization
The evaluation uses ROUGE-1, ROUGE-2, and ROUGE-L. The first two capture overlap of individual tokens and neighboring pairs, respectively. ROUGE-L compares the texts using a longest common subsequence, a match in the same order whose tokens can have gaps between them. These measures give different accounts of how much of the reference text is reflected in the generated summary. The paper identifies them as the measures for the full-text CNN-DailyMail comparison. ROUGE
The baseline for the representation comparison is the base Transformer summarizer. In the other configuration, the encoder receives representations from a pretrained language model. The earlier learning stage uses newscrawl and CNN-DailyMail, totaling 193M sentences. That figure counts sentences used to train the source of the added representations. The 400-token cutoff controls the length of the article input in the downstream summarization experiment. The two settings describe different stages of the system.
The comparison evaluates giving the encoder access to those pretrained representations on the same summarization benchmark. The base configuration forms the input representation within the summarization system, while the added input in the other configuration carries information learned from the earlier corpus. Both configurations produce text for comparison with reference summaries. The paper identifies the ROUGE measures for that result and specifies where the added information enters, the source of the extra training material, and the generation conditions under which the summaries are evaluated.
What the ablations show
The authors present no systematic component ablation, and their evidence about individual choices comes from a timed precision comparison, an illustrated change in the distributed schedule, and comparisons between application configurations.
The precision test isolates a decision made at inference
The clearest intervention is the switch from FP32 to FP16 decoding. An ablation usually removes or replaces a component to establish its contribution. Here the intervention changes the arithmetic used to carry out a trained system’s work. The quantity to explain is a 54% increase in decoding speed relative to FP32 for the big Transformer on the WMT'14 English–German test set on a V100 GPU. The authors report the same accuracy for the benchmark. This gives the comparison both a cost and a quality outcome. It shows that the faster execution was compatible with the reported translation result under those conditions.
That combination of outcomes matters because a numerical change can enter a generator’s decisions in several places. For example, when candidate continuations have very close scores, a small change in the arithmetic could influence which candidate survives. The next prediction would then be made from a different prefix, and subsequent choices could diverge. The measured accuracy addresses the translations that completed this process. Agreement at the level of the benchmark is sufficient to support the authors’ quality claim for that run. Establishing agreement at the level of each candidate or sentence would require observations at those levels.
The intervention concerns numerical precision across inference. Its effect is measured over the whole operation of producing translations, including the sequence of predictions that decoding requires. It gives no breakdown of which computations account for the speed gain. For instance, if the work of making predictions takes less time under FP16, tasks outside those calculations can account for a larger share of the elapsed time. The reported throughput is compatible with that possibility, but the experiment gives no timings for the separate parts of the decoder.
The same reasoning keeps the result from turning into a claim about mixed-precision training. The quality of a trained system under different arithmetic at inference is one question. The quality of a system whose gradients were computed and combined in a different format is another. In the former case, the parameters are already available for use. In the latter, the arithmetic participates in forming the parameters being evaluated. The controlled comparison answers the first question. The training section explains how fairseq handles the second, including the changes of scale and format, without presenting a trial that varies those choices individually.
The timing diagram compares dependencies
The distributed-training figure provides a different kind of control. It keeps the same categories of work in view while changing when the workers exchange information and when they can begin their next local computation. In the opening schedule, completing a backward pass gives a worker a local result. That result alone is insufficient for the shared update. Workers that have finished wait until the required work elsewhere is ready. Communication then takes an interval of its own. This schedule identifies two distinct reasons why elapsed time can exceed the work required for any given device’s local pass.
The overlap schedule changes which completed work can be acted on immediately. Gradients for part of the network are eligible for exchange once the participating workers have produced the relevant values and the buffer condition is met. Calculations elsewhere in the backward pass can continue. Its effect on overall duration depends on where the communication finishes. If the exchange makes enough progress during the remaining backward work, there is less of it to do after that work ends. The figure makes this dependency visible without measuring the amount of time saved.
One way to read the comparison is to ask which operations lie on the sequence of dependencies that determines when the update can finish. In the first schedule, the end of the last backward pass is followed by the communication interval. In the next schedule, part of that communication can already be complete when the backward work ends. The gradient exchange retains its role in producing the shared result. The change is that some of its completion time can be absorbed into an interval the training run already needs.
The accumulation schedule makes a further change. Gradients from an earlier local pass can contribute to the eventual update while the device advances through more of its assigned examples. The diagram allows a worker to begin that next pass at the time its own earlier pass is done. Another device may be at a different point in its local work. The end of every sub-batch therefore ceases to be a point at which the group has to coordinate. The schedule still has a shared boundary, and the final exchange can overlap with backward computation at that boundary.
The advantage can be understood by considering how the identity of the slow worker changes. Suppose one worker encounters a demanding sub-batch at the start of the interval, while another encounters a demanding sub-batch later. If the group waits after both passes, each delay can hold up work elsewhere. If the devices continue locally, an earlier delay on one worker and a later delay on another contribute to their respective totals before the shared step. The gains depend partly on how frequently delays occur and whether they fall on the same worker over the whole interval.
These comparisons establish where the mechanisms can save time. A quantitative ablation would have to define how much work is timed and then measure it under the different schedules. That detail is especially important for accumulation. The final schedule completes more local passes for an optimizer update. Time per update and time to finish a fixed amount of training text would therefore answer different questions. A clock attached to the schedule would need a precisely defined unit of work before its readings could be interpreted.
The translation recipe tests choices that act together
The translation experiments give an application-level counterpart to the distributed discussion. The authors associate their improvement over the earlier Transformer BLEU results with larger batches and an increased learning rate. The larger batch changes the evidence behind an update, while the rate determines how that evidence influences the scale of the step. The result shows that the authors found a productive combination for translation. Their earlier work on scaling translation is the basis they give for choosing it. Scaling Neural Machine Translation
The value of this comparison is different from the value of an isolated test of batch size. Gradient accumulation is motivated by execution costs, yet using it can alter the course of learning. A translation run that earns a higher score under the combined recipe demonstrates that the settings can be made to work together. It offers evidence about the trained system a researcher can obtain from that recipe. The paper does not specify separate comparisons that would assign part of the BLEU improvement to the batch and part to the rate.
There is also an interaction worth keeping in view when reading this attribution. Changing which examples contribute to an update can make a different rate useful. If the rate suitable for one batch size depends on that size, the effect of a rate change has to be interpreted at the size where it was tested. The paper gives the result for a recipe chosen as a whole. It leaves unresolved whether either adjustment on its own would improve on the earlier recipe or how broadly the pairing would work across other objectives and corpora.
The result caption’s training-data annotations set a second condition on the historical comparison. Entries for English–German can be evaluated against the same test references after learning from different releases of the training material. Those results can all describe performance on the stated test. Explaining a difference between rows requires attention to which training collection produced each one. The authors identify their point of comparison and specify the search parameters they carry forward from the earlier Transformer experiment. The broader table brings together runs whose training conditions need to be read individually. Attention Is All You Need
The summarization comparison changes the evidence available to the encoder
The base summarizer and the version with pretrained input representations present another kind of intervention. Both configurations address the same article-to-summary problem. In the latter, the encoder has access to a description of the input derived from an earlier learning procedure. This comparison asks whether a particular way of bringing prior learning into the encoder helps the system produce a summary resembling the reference under the chosen ROUGE measures.
The comparison gathers several choices into one change. The prior learning procedure has its own text, the resulting representations have a form determined by that procedure, and those representations are introduced at a particular point in the summarizer. The article experiments can compare the resulting system with the base configuration. They cannot divide an observed change among the amount of prior text, its composition, the representation derived from it, and the location at which the encoder receives it. Those would be distinct interventions even if they all used the same downstream benchmark.
There is a useful distinction between information made available to the network and actions made available to the generator. A representation changes what the encoder can supply to the decoder. A restriction on repeated phrases changes which continuations can be returned even when they have favorable scores. The fairseq comparison concerns an encoder input under stated generation conditions. It offers no corresponding removal test for the repetition restriction or the minimum-length choice, and no comparison of how those rules interact with the pretrained input.
The paper identifies the pair of summarizer configurations and the measures used to compare them. Its discussion does not state the size of the difference for each ROUGE measure. That leaves a narrower empirical conclusion than the quantified result for inference precision. The representation experiment identifies a change whose contribution can be evaluated at the level of a complete summarizer, while the description alone does not quantify that contribution. The scale of the prior training corpus describes the resource supplied to the intervention. It cannot substitute for the scores of the generated summaries.
Where the comparison is explanatory
Several other design choices come with a baseline in the explanation, without a matched numerical comparison in the paper’s discussion. Caching is one example. A decoder that recomputes earlier prefix states provides the point of reference for a decoder that retains them. Following the computation explains why the cache can save work. Once a previously calculated state can be reused, producing that state again ceases to be necessary for the next prediction. The authors describe a possible gain of up to an order of magnitude against the naive alternative. The claim concerns the cost of repeated prefix calculations and supplies no separate gain for each architecture or search setting.
Length grouping is another example. Consider two arrangements of the same sentence pairs. If one arrangement puts long and short targets together and the other gives targets of similar length the same group, the padded arrays can differ even though the training material is identical. That illustrates the immediate mechanism. Whether the arrangement also improves training time, or changes the quality reached under a fixed recipe, is a separate empirical question. The authors explain why distributed updates can draw on several of the locally grouped lengths. They supply no comparison of training outcomes across batching policies that tests this proposed benefit.
The language benchmarks likewise show combinations in use. The decoder depths describe configurations chosen for different corpora, and the systems differ in both internal width and embedding size. This gives a reader the architecture associated with each perplexity test. It provides no estimate for adding blocks to one of those decoders while keeping its data and widths fixed. The parameter sharing identified for One Billion Word is part of its evaluated setup, with no matched untied configuration described as a control. Those distinctions help locate what the language experiments establish. They document working reference configurations and identify the predictive quantities to which their results belong.
Limitations
Qualifications stated by the authors
The authors give the decoding speed result under a specific set of conditions. It concerns the big Transformer translating into German on a V100 GPU, using the English–German test workload associated with WMT'14. The claim of unchanged accuracy applies to the reported evaluation of that comparison. The paper characterizes the potential gain from caching more generally, but specifies a naive decoder as the reference and discusses reuse for non-recurrent architectures. It also points to a dependency inside those architectures. Transformer multi-head attention is an example for which the component must implement caching itself.
The paper also explicitly describes a numerical constraint in training. The narrow range available in FP16 can make underflow a problem. The loss is temporarily scaled, and the update of the parameters takes place in FP32 after conversion and restoration of the gradient scale. Preservation of update accuracy is the reason the authors give for retaining full precision at that point. Their scheme is consequently defined by which calculations use which format and by the order of operations that joins them. The description of faster half-precision computation operates within that scheme.
The authors mark two constraints on distributed training. Similar numbers of tokens assigned to workers can coexist with dissimilar processing times, and accumulation increases the effective batch. The first explains why balancing the amount of text leaves some waiting to address. The second qualifies the optimization consequences of changing the schedule. The authors refer to their experience scaling neural translation when they describe effective training with the enlarged batch. That example shows what their choice was grounded in. The paper does not state a rule that gives a suitable batch size and learning rate for every supported task. Scaling Neural Machine Translation
The application descriptions also give conditions for interpreting the benchmark results. The translation test is tied to particular source and target languages, training corpora, held-out sets, and decoding settings. Its two scoring conventions use different routes from generated text to a BLEU value. The authors provide information identifying the SacreBLEU run and point out training-data exceptions in the historical results. For summarization, they identify the full-text dataset variant without anonymizing entities and specify the 400-token cutoff for articles. This sets a limit on the information available to the encoder for any article that exceeds the cutoff.
The authors present the task component as intended to be immutable and describe a common set of interfaces through which extensions participate in training. They also describe continuing from checkpoints after interruption and loading older checkpoints through an automatic upgrade. These are software design commitments, with the checkpoint contents and upgrade behavior specified at the level relevant to the paper. Their implications for reproducibility depend on the type of comparison being made, such as resuming one run or trying to recreate a reported experiment independently.
Limits inferred from the throughput benchmark
The inference benchmark measures the rate of translating a known collection of sentences. The delay between giving the system an individual sentence and getting its translation back is a different quantity. A batch can increase the number of sentences finished over a test run while an individual sentence’s completion time still depends on when its batch runs and how the decoder progresses through that batch. The paper gives a gain for the workload as a whole. It leaves the distribution of individual completion times unmeasured.
There is a related limit on generalizing across lengths. The generator forms batches using a token budget, so the number of examples sharing a batch can vary. A collection dominated by shorter sources can produce different batch shapes from one containing many longer sources. The generated targets can also take different numbers of steps to finish. The test combines these sources of variation into an overall speed measurement. A reader cannot recover separate precision gains for short and long sentences, or infer how changing the allowed tokens per batch would affect the result.
Search can also change the balance of work. The amount of decoder state maintained during a run depends on the active candidates and their histories. A procedure that seeks a more diverse candidate set can give those histories a different role. Sampling chooses continuations through a different rule and can produce a different set of output lengths. The paper implements multiple procedures, but the reported translation recipe identifies a particular one. The timed result does not establish a speed ranking across search procedures or show that each procedure benefits by the same amount from the precision change.
Caching makes the decoder more economical in its use of repeated computations by keeping the earlier results available. That gives it a memory cost whose size is not measured in the paper. A reader interested in an inference workload with long outputs would need to know how much state remains live and how many candidates carry it. Costs can also differ among architectures because the useful cached values are architecture-specific. The paper’s example of multi-head attention explains why specialized support matters. It provides no measurements of cache size, memory pressure, or their effects on the number of examples that can be decoded together.
There is no basis for combining the caching and precision gains into an overall figure. Each compares a different setting against its own baseline. Changing whether a decoder repeats prefix calculations affects the amount of work available to benefit from more efficient arithmetic. Conversely, changing the arithmetic can change the cost of the work that a cache would avoid. Establishing a joint gain would require measurements that specify the precision and the reuse strategy in every configuration being compared. The inference discussion gives evidence about the two mechanisms at different levels of detail.
Likewise, completing a fixed test workload gives limited evidence about production operation. A service can receive requests irregularly and can have examples waiting before a device begins to process them. Choosing when a batch runs can then affect both its occupancy and the time a request spends waiting. Fairseq’s throughput comparison concerns computation on the named translation workload. It leaves open how the software would perform under varying request arrival patterns or how a deployment would trade off rate and response time. The authors’ aim of making the toolkit useful in production is broader than the performance condition tested here.
Limits inferred from the training schedule
The timing diagram explains when communication is eligible to begin. The magnitude of the benefit depends, among other things, on the amount of backward computation still available after the buffer reaches its threshold. If gradients become ready in a pattern that brings the buffer to the threshold late, relatively little backward work can coincide with the transfer. A different pattern could provide more opportunity. The paper describes the trigger without reporting sensitivity to the threshold or a breakdown of readiness times for the layers of a measured run.
The relevant quantity is completed work during overlap. Two operations can appear beside each other in a schedule, but that arrangement leaves open how much each advances while the other proceeds. If part of the exchange is still pending at the end of the backward pass, the update must wait for the remaining work. The figure depicts a shorter exposed interval after backward computation. It gives no measurements to use in predicting that interval on another device arrangement or with a network whose gradient calculations finish in a different pattern.
Accumulation can make individual unusually slow sub-batches less consequential. Its benefit against worker imbalance depends on what causes the difference in duration. A worker that periodically receives a difficult example could catch up over subsequent local passes. A device that remains behind throughout the interval can still determine when the group reaches the exchange. The paper reports variation despite initially similar token counts and explains why accumulation can help. It gives no distribution of local processing times that would establish which of those patterns dominates across the applications.
Multi-machine training adds a further question about the conditions of exchange. Support for more than one machine establishes that workers can be coordinated in that arrangement. The duration of communication depends on the actual arrangement used. The work done by each device, the number of devices taking part, and how their exchanges proceed all matter when interpreting a training time. The paper identifies V100 GPUs for the times in its translation comparison. It gives no general scaling curve for changing the placement of a fixed workload across machines.
A training speed claim also requires a definition of when the work is complete. In a test of raw execution, one might compare how long the workers take to process a fixed set of examples. In a test of learning efficiency, one might compare the time required to reach a specified quality. Accumulation affects the relationship between those questions because more examples contribute to each optimizer decision. The timed work per shared update can change, while the number of updates needed to reach a given result can change as well. The authors give a reason the schedule can reduce waiting and a translation recipe that trains effectively. They do not provide controlled results relating every schedule to the same learning endpoint.
The treatment of mixed precision leaves some procedural details open. The paper specifies when the loss is scaled, when the gradients are communicated, and when their original scale is restored. It does not spell out the rule the dynamic scaler uses to choose its successive scales. The numerical arrangement is clear at the level of the training path. Recreating its adjustment behavior from the description alone would require a more detailed rule for how the scale responds during the run.
There is also no isolated test of the contribution of half-precision communication within mixed-precision training. Exchanging gradients in FP16 is one element of the scheme, alongside forward and backward computation in FP16 and updates in FP32. A test that varied only the exchange format would address the cost and consequences of that one element. A test varying the whole scheme would capture their combined effects. The named throughput experiment varies precision in decoding, where gradients and updates are absent, so neither training comparison follows from it.
Limits inferred from the design of the translation and language tests
The translation systems serve English–German and English–French in the specified directions. The earlier work from which their data setups are drawn differs, and the translation experiments have different training collections and vocabulary sizes. There is therefore no controlled comparison here of the effect of changing target language alone. Each evaluation gives an account of a system trained on the material specified for that direction and tested against its corresponding references. Evidence about transfer to other language directions or training-data conditions would require runs constructed for those questions.
Within a direction, the training-data labels also matter when interpreting a quality ranking. Matching test references establishes common material for the scoring procedure. It does not assure that the systems had comparable opportunities to learn from the training material. The table caption acknowledges exceptions to the general training set in the English–German comparisons. A historical result can help establish where the reference implementation sits among reported systems while giving limited evidence about the independent effect of a software feature or a single change in training.
The choice of scoring protocol is another limit on comparability. Token boundaries and capitalization affect the matches counted by a BLEU procedure. Reporting the protocol gives a later reader the means to examine whether another score has a comparable meaning. The fact that both measurements are called BLEU does not give them identical conventions. The paper’s reporting of case-sensitive tokenized BLEU and of SacreBLEU on detokenized translations makes that condition visible. A Call for Clarity in Reporting BLEU Scores
The translation benchmarks evaluate the outputs of a predictor and search operating together. A returned translation depends on which alternatives are scored and on which survive to be completed. The paper uses settings carried over from the earlier Transformer work. Changing the search with the learned parameters fixed would be a way to study how those parameters serve different generation procedures. The experiments as described give no comparison across those procedures. The capability to vary search is established by the design, while the quality result belongs to the named decoding setup.
For language prediction, the test corpus supplies the continuation at each point. Perplexity is a measure of how well the predictive probabilities fit those events. Free generation follows the sequence chosen by a decoder, which may enter histories rarely encountered in observed test text. The resulting prose can also be judged by properties spanning many decisions, such as keeping the same subject across a passage. Those properties were not measured by the language benchmarks in the paper. The results concern probability assigned to held-out material.
The two language evaluations also leave the effects of particular architecture decisions unresolved. A count of decoder blocks gives a dimension of a network, and tying parameters specifies a relationship between input and output computation. To test either decision, perplexity would need to be compared under settings that change that decision at a common benchmark. The paper uses distinct depths and widths for the two corpora. It identifies an adaptive representation approach shared by the configured decoders and names a parameter-sharing choice in the One Billion Word caption. Those facts characterize the systems for comparison with earlier results on the corresponding benchmarks.
Limits inferred from the article inputs and summary measures
Selecting the full-text dataset determines which variant of CNN-DailyMail underlies the evaluation. Applying an input cutoff determines the evidence actually available to the encoder in each example. If the reference mentions a detail developed only after the retained portion, the summarizer has to produce its output with that part of the source unavailable. The extent of this situation depends on where relevant details occur in the articles. The paper states the cutoff and gives no analysis of the references’ coverage by the retained text, or of results on articles of different original lengths.
ROUGE compares a generated summary with a reference through patterns of shared text. A common sequence can reflect a correctly preserved detail, but overlap on its own supplies limited evidence about why the words agree. For instance, keeping much of a sentence while substituting a different named entity could preserve many matches and still change the statement. A summary could also express a source fact accurately in wording that creates fewer matches. The selected measures document resemblance to reference summaries. A test of factual support would require checking the generated claims against the article.
The generation settings also shape what reaches the scorer. A minimum length influences the earliest point at which the generator can stop. The rule against repeating a trigram can prevent a repeated phrase from appearing even if the phrase would receive a strong score. Those restrictions can change overlap as well as the wording a reader sees. The study identifies them as part of the experiment. It does not measure how much of any score difference comes from imposing each one, or whether the two encoder configurations respond to them in the same way.
The pretraining description establishes that newscrawl and CNN-DailyMail supply the text from which the extra representations are learned. It does not specify the CNN-DailyMail material by benchmark partition. The name of a shared corpus gives a reason to distinguish source provenance from article-level overlap. Establishing which documents were included at each stage would require a partition-level account of that earlier corpus. The paper’s description is sufficient to identify the stated sources and combined scale, while leaving document-level separation unresolved.
The variety of article-based evaluation is limited to the named news benchmark. If a different type of document places important evidence near the end or relies on relationships spread across a longer input, the same cutoff can yield a different information problem. A downstream task can also demand another kind of reference summary, changing what counts as an adequate selection. The paper provides a specific tested instance of article summarization. It supplies no evaluation across document types or across alternative policies for limiting input length.
Limits inferred from the software claims
The interface descriptions make it possible to identify the component responsible for a change. A criterion extension can decide when to invoke a network, and a generator can request the next prediction through a shared interface. This demonstrates the structure of the extension mechanism. The paper gives no measured comparison of the development effort to add equivalent functionality in fairseq and in another toolkit. The earlier toolkit descriptions characterize their priorities. Judging relative effort or performance would call for comparable extensions or workloads, along with sufficiently detailed settings for the tools being compared.
There is a related distinction between implementing compatibility and implementing an optimization. An architecture that answers the expected stepwise prediction request can participate in generation. To benefit from incremental computation, its internal components must also preserve and recover the relevant state. The paper’s attention example shows where that additional work can fall. The shared interface controls how the generator reaches the predictor. It cannot determine on its own which representations remain valid as candidates grow, or how efficiently a particular architecture can reuse them.
Checkpointing addresses the interruption of a run by recording the state needed to continue from a saved point. Reproducing a result from the beginning adds questions about the training corpus, configuration, environment, and evaluation. Those ingredients determine how the run obtains its state in the first place and what result is eventually reported. The authors motivate the checkpoint feature through resumability. They give no measured comparison of interruptions at different stages or of independently repeated runs under varied execution conditions.
Automatic upgrading also has a precise scope. It is meant to make trained work saved by older releases usable with newer software. Demonstrating that a newer release can load a checkpoint concerns its ability to interpret the stored state. Demonstrating numerical agreement across releases would require running a corresponding computation and comparing its outcomes. The paper describes the mechanism that allows old checkpoints to continue to be used, with version-by-version agreement in training or prediction outside the reported evaluations.
What came after
From translation reference runs to pretraining for translation
The later citations extend from shared translation tasks to work on training objectives, input representations, and execution. The titles identify the contributions discussed below. They leave the particulars of software reuse open. The connections are clearest when a later contribution can be located at a particular decision in a fairseq experiment, such as choosing the evidence for a prediction, defining its target, or deciding where the work of generation runs.
Facebook FAIR’s WMT19 submission concerns a system entered in a news translation task. This places the later work close to the setting of fairseq’s reference translation experiments. In a task submission, the system presented to the evaluation has to bring together choices about the material learned from and the means of producing translations. Fairseq illustrates that relationship when it specifies a parallel corpus, a vocabulary, and search for each of its translation directions. The submission makes the translation system assembled for the shared task the contribution of interest. A citation connects that application to fairseq, while the title does not identify which of the toolkit’s implementation choices contributed to the entry. Facebook FAIR’s WMT19 News Translation Task Submission
The findings of WMT19 take the conference’s machine translation event as their subject. That shifts the unit of attention from a particular entry to the shared evaluation in which entries can participate. Fairseq’s translation table already illustrates one reason that this matters. Systems evaluated on the same news references can have learned from different training material, and their scores depend on the scoring convention used. A conference findings paper puts the evaluation setting itself in focus. Its relationship to fairseq is through the use of clearly defined translation tasks to make results from working systems interpretable alongside one another. Findings of WMT19
Multilingual denoising pretraining for neural machine translation gives the learning that precedes translation an explicit objective. Denoising asks a system to recover text after some of the available information has been altered. The task that ultimately motivates that learning is translation, where a sequence in one language supports a prediction in another. This changes the relationship between the data first used to train a network and the examples on which its intended task is defined. Fairseq’s treatment of data and the criterion makes those stages intelligible as separate decisions. The early objective determines what the learner has to reconstruct, while the downstream task determines what it has to translate. Multilingual Denoising Pre-training for Neural Machine Translation
The connection with the summarization experiment further specifies what the denoising paper changes. Fairseq illustrates one form of prior learning by taking representations from a trained predictor and giving them to the article encoder. The later title puts the earlier task of learning from modified multilingual text in the foreground. Both approaches make the source of prior learning relevant to how the downstream system is understood. They locate the contribution differently within that relationship. One varies the presence of an encoder input derived from earlier training. The other makes the pretraining objective itself part of what is being proposed for translation. Multilingual Denoising Pre-training for Neural Machine Translation
Work on few-shot learning with multilingual language systems gives the number of examples available for a task a different role. The question concerns what the system can do when a task is accompanied by only a small amount of task evidence. Prior learning and the examples available for the immediate task then serve different purposes. Fairseq’s supervised translation setups describe the parallel texts as the corpus for fitting the translator and reserve particular examples for validation and testing. The later framing makes it important to describe separately what was learned earlier across languages and what examples define the current task. The title establishes that change in emphasis without identifying the toolkit features used to pursue it. Few-shot Learning with Multilingual Language Models
Changing the material or objective of pretraining
RoBERTa makes the optimization of BERT pretraining its subject. The connection to fairseq is especially direct at the level of the recipe. In the toolkit paper, adopting an existing translation architecture still leaves batch size and the learning-rate choice open, and the authors use those settings to explain their reported improvement. A study of pretraining optimization makes the corresponding issue central before any later task is considered. Merely naming the architecture cannot explain what opportunities the learned system had to improve. The learning procedure has to be described in its own right, including which parts of the procedure a comparison changes. This is the point of contact indicated by RoBERTa’s framing, without an inference about any particular setting or effect in its experiments. RoBERTa
SpanBERT makes a stretch of text the object of representation and prediction at pretraining. A span is a continuous portion of a sequence, so defining a target as a span changes which pieces of information have to be recovered together. Fairseq’s language tests give a concrete example where a predictor is assessed on the observed continuation at each point. The later work shifts attention to how a representation supports prediction of a group of positions. In the language of fairseq’s design, this puts a decision about the prediction target at the point where data and criterion meet. It raises an issue about what the objective asks a network to recover before the optimizer or search has a role to play. SpanBERT
CamemBERT identifies French as the language a pretrained system is designed to serve. Fairseq’s English–French benchmark gives French a different experimental role, as the output side of parallel examples whose source is English. The joint vocabulary is built in reference to both sides. Language-specific pretraining puts the text of the designated language at the center of learning the representation itself. This changes what the name of the language tells the reader. It identifies the material and intended linguistic scope of the representation instead of one side of a configured translation problem. The title establishes that scope, with the details of the training corpus and representation procedure left unspecified here. CamemBERT
PhoBERT does corresponding work for Vietnamese, with Vietnamese defining the intended language of the pretrained systems. The relationship to fairseq’s examples runs through the dependence of a representation on the text units it has to handle. The toolkit paper shows the value of specifying how vocabulary is built and which material gives the resulting identifiers their meaning in an experiment. A language-specific pretraining contribution foregrounds that dependence at the stage where representations are learned. Its title gives the language and purpose. It does not establish a particular choice of segmentation or a comparison with the vocabulary approaches used in fairseq’s translation experiments. PhoBERT
BERTweet designates English tweets as the domain for a pretrained system. The specific kind of text is part of what defines the contribution, in addition to the language. Fairseq’s article summarization experiment offers a reason to distinguish domain from task. News articles serve as sources whose contents are to be condensed, and news material also appears among the sources used for earlier representation learning. A pretraining contribution organized around tweets identifies a writing domain for the system being learned. This makes the choice of material a central part of what the resulting representations are meant to support, even before a downstream prediction or generation task is specified. BERTweet
Unified pretraining for program understanding and generation makes code and programming languages the material to be understood or produced. Its title puts those purposes within one pretraining contribution. Fairseq’s examples help locate the choices involved. A learned representation may be evaluated through a response to an existing input, or it may take part in a procedure that builds an output progressively. The program work gives these uses a shared preparation stage. It changes the kind of sequence being processed and makes the range of intended uses part of the design problem. The citation is consistent with the earlier toolkit’s concern for using learned components across tasks, with the later implementation details left open by the title. Unified Pre-training for Program Understanding and Generation
Data augmentation using pretrained Transformers gives prior learning a role in supplying more training examples. This concerns the material that reaches the learning procedure, an earlier point of intervention than a change to how the encoder represents a fixed example. Fairseq’s example of online backtranslation illustrates how generation can contribute text from which an example is formed. Its summarization setup illustrates how learned information can instead reach the current task as a representation of a supplied input. The augmentation work names the former sort of resource, additional data, as what the pretrained system helps provide. Its title leaves open how generation is used, which tasks receive the additional examples, and which tools run the process. Data Augmentation using Pre-trained Transformer Models
Changing the architecture or the cost of execution
The later Transformers paper concerns reusable software for Transformer-based natural language processing. Its point of contact with fairseq is the problem of making sequence architectures and trained systems available for more than an isolated experiment. Fairseq describes PyTorch modules alongside conventions for tasks, losses, and generation. The question for another body of reusable software is how a researcher reaches the trained computation and makes appropriate use of it on a task. The titles and citation establish the related software setting. They give no basis for comparing the packages on implementation effort, training time, or output quality for a matched experiment. Transformers
Longformer gives long documents an explicit place in the architecture’s purpose. Fairseq’s summarization application makes the implication for evidence concrete. The portion of an article beyond the input cutoff cannot directly participate in the encoder’s calculation. Making a Transformer for long documents addresses the computation required to use longer inputs at the level of an individual example. Fairseq’s length-aware grouping addresses how examples of varying lengths fit together on a device. The distinction matters because improving one level changes a different constraint. A longer document can become a viable input to an architecture while the way it shares a batch with other documents remains a separate execution decision. Longformer
RoFormer proposes rotary position embedding as a way to equip the Transformer with information about position. That choice belongs inside the computation that produces the next prediction. The fairseq interface gives a useful view of where it sits. A generator needs scores for extending its candidates. How the network uses the positions of the available tokens to produce those scores is a decision made within the architecture. Introducing another position representation can therefore change what information enters a prediction even when the search procedure keeps asking for the same kind of score. The later title establishes the architectural intervention and the citation places it alongside work that makes the architecture available through a common generation convention. RoFormer
Structured dropout for reducing depth on demand makes the number of active layers a question for the learning procedure. Fairseq uses decoder depth as part of the description of a reference configuration, with each specified depth attached to a particular corpus and set of dimensions. The later work treats depth as something the Transformer is prepared to vary according to need. This shifts the experiment from choosing a depth for a benchmark to studying how training can support use at different depths. Its contribution belongs at the boundary between what is learned and which part of that learned computation is used. The title names structured dropout as the method and provides no comparison of its outcomes with fairseq’s fixed benchmark configurations. Reducing Transformer Depth on Demand with Structured Dropout
The survey of efficient Transformers connects with a broader point in fairseq’s engineering. Cost comes from operations at different stages and at different scales. The architecture gives rise to the operations that score a candidate, the batch supplies the shape of arrays on a device, training involves sharing gradients, and generation can reuse state from previous steps. An intervention aimed at one of these costs has to be evaluated at the point where it acts. A survey organized around efficiency can place such interventions in relation to the Transformer computation they support. Fairseq’s schedules and decoding comparison supply examples of why the workload and the measured stage matter when giving an efficiency claim a concrete meaning. Efficient Transformers
LLM.int8() concerns 8-bit matrix multiplication for Transformers at scale. The named operation gives the precision question a particular scope inside the network. Fairseq’s procedure shows why that scope matters. For training, arithmetic is assigned to stages according to the role of the values passing through them, and the inference comparison changes a format across a timed decoding workload. An arithmetic intervention at matrix multiplication can be described in terms of that operation’s place in the computation. Relating it to throughput would require knowing how the operation contributes to the system being timed. The citation connects work on numerical formats, while the later title alone supplies no common workload or quality measure for comparing gains. LLM.int8()
Orca makes distributed serving for Transformer-based generation its subject. Fairseq coordinates workers during training because the update depends on the gradient contributions they produce. At inference, the dependencies belong to the advancing outputs and the states they can carry forward. A serving system is concerned with arranging this generation work when requests have to be processed, so the repeated steps of the decoder become part of the scheduling problem. This connects Orca to the toolkit paper’s interest in processing groups of examples and preserving state across predictions. It also makes the unit of coordination different from the shared gradient update depicted in fairseq’s training diagram. Orca
Taking sequence learning to speech and vision
Wav2vec 2.0 presents a framework for self-supervised learning of speech representations. Self-supervision means the material used for training supplies the basis for the targets. In fairseq’s text prediction experiments, the observed token that follows the context supplies a readily defined target. Speech gives a learner a different kind of sequence and makes the construction of a learning signal part of the representation problem. The later work takes that broader problem as its contribution. Its citation connects work on self-supervised sequence learning across types of input while leaving the specific objectives and use of toolkit components to be established from the speech study itself. wav2vec 2.0
HuBERT specifies masked prediction of hidden units as the basis of its self-supervised speech representations. Masking withholds some information from the current input, and the named hidden units define what the system is asked to predict. Describing both sides of that arrangement identifies the contribution more precisely than saying that a network learns from speech. It specifies a relationship between the evidence available to the predictor and the targets used in learning. Fairseq’s broad criterion interface is relevant to understanding that relationship. Its training design gives the loss calculation scope to use the computations and examples required by an objective, while the nature of the target is a choice for the speech method. HuBERT
Unsupervised cross-lingual representation learning for speech recognition makes learning across languages a preparation for recognizing speech. Fairseq’s translation tasks also involve more than one language, with a parallel text example defining a source and a target for each prediction problem. The speech work gives the relationship across languages another purpose. It is part of the setting in which representations are learned for use in recognition. This arrangement raises questions about what material supplies the prior learning signal and what material is needed to evaluate the intended recognition task. The later paper’s title identifies that relationship without supplying a result for a particular language or identifying a reused fairseq component. Unsupervised Cross-Lingual Representation Learning for Speech Recognition
XLS-R makes scale explicit in self-supervised cross-lingual speech representation learning. This emphasis relates to the toolkit paper’s treatment of learning at a scale that makes computation across devices and the time spent sharing results important. The later work fixes a different purpose for the effort, learning representations from speech across languages. That gives the observation about scale a research meaning beyond hardware placement. More extensive sequence learning has to serve the desired representations, so the amount of work, the way examples are supplied, and the learning objective belong to the interpretation of the resulting system. The titles provide no translation-to-speech comparison of training costs. XLS-R
VoxPopuli contributes a multilingual speech corpus for representation learning, semisupervised learning, and interpretation. Its point of intervention is the material a researcher can use. A toolkit supplies ways to prepare examples and connect them to a learning procedure. A corpus makes particular examples and kinds of evidence available for that procedure to use. Fairseq specifies the roles of named datasets in its reference experiments, such as fitting translation systems or testing the probabilities assigned to held-out text. VoxPopuli puts the provision of material for several kinds of speech research in the foreground. Its citation connects what a task can ask of speech to the machinery for establishing a sequence experiment. VoxPopuli
FLAVA places vision and language in a shared research problem through alignment. The aim named in the title requires some account of how information from visual and linguistic inputs is related. Fairseq’s translation and summarization examples pair sequences that already consist of text, with a task specifying which supplies context and which supplies a target. Alignment across visual and linguistic information makes the relationship between different forms of input part of the learning problem itself. The connection highlights how much of a sequence experiment depends on the task’s account of its data and on the choice of objective that acts on those data. The citation leaves the mechanics of alignment and the tool used to train it unspecified. FLAVA
Changing the source, the learning signal, and the answer
SAMSum contributes human-annotated dialogue data for abstractive summarization. This puts the relationship between the source and reference back at the center of the experiment. Fairseq’s summarizer is assessed on reference summaries paired with news articles. A summary of dialogue has a sequence of contributions to condense, and the reference material defines what this new task asks the system to convey. A dataset paper can therefore change the experiment even if the architecture still generates an output from an encoded source. It changes what evidence is presented to the encoder and what reference output counts as a suitable condensation of that evidence. SAMSum Corpus
Recipes for building an open-domain chatbot takes dialogue as a setting for producing responses. The response is part of an exchange and is understood in relation to the preceding turns. Fairseq names dialogue among the applications of the toolkit and gives a generator responsibility for turning predictions into a finished sequence. Work on building a chatbot makes the use of that sequence in conversation a defining condition. This creates a link between the general procedure for returning text and the practical question of what response is appropriate for the interaction. The later title identifies the system-building goal, with particular training and generation settings outside what the citation establishes. Recipes for Building an Open-Domain Chatbot
Unlikelihood training makes the objective an intervention in neural text generation. Fairseq’s summarization recipe provides a concrete example of a decision made while generating, when a continuation that repeats a trigram is ruled out. In the later work, the named intervention acts while learning determines the predictions that will eventually be available to the generator. A criterion can change the scores on which search bases its choices, while a generation rule controls which choices can be made from a given set of scores. The relationship between the papers lies in those two locations for shaping generated text. The title establishes a training contribution without specifying how its outputs compare with any particular decoding restriction. Neural Text Generation with Unlikelihood Training
Retrieval-augmented generation for knowledge-intensive tasks adds an explicit question about what material is found for the generator to use. In the fairseq translation and article experiments, the source is supplied with the example. In retrieval-augmented generation, finding potentially relevant information is part of the procedure that leads to the output. This changes the dependencies of a prediction. The source evidence available at generation time can depend on the success of a retrieval operation, while the generator still has to use the selected information to produce its answer. The later work makes that combined task the contribution, extending the question of what a sequence system receives before it begins to generate. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
KILT contributes a benchmark focused on knowledge-intensive language tasks. Its relationship to fairseq runs through what an evaluation takes as evidence of success. A translation score with a defined reference protocol, a measure of probability assigned to observed text, and an overlap score for summaries describe different properties of a sequence system. A benchmark organized around tasks that require knowledge gives the evaluation a further focus. It makes the knowledge demands of the selected tasks part of the rationale for comparing results. The title specifies this benchmark contribution, with the particular tasks and scoring procedure outside the basis for the comparison here. KILT
AmbigQA gives ambiguity in open-domain question answering a central role. The input to a generator can admit several interpretations, and that matters to how the task recognizes acceptable answers. Several live prefixes in beam search represent a different kind of uncertainty. They are alternatives the generator is considering as it constructs text. An ambiguous question can pose a problem even when a generator produces a highly plausible sequence for one interpretation. The later work makes the meaning of the input part of task and evaluation design. Fairseq’s division between the definition of a task and the process for following scored continuations helps explain where that problem enters a sequence experiment. AmbigQA
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Cite
Cite as Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier and Michael Auli. 2019. fairseq: A Fast, Extensible Toolkit for Sequence Modeling. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations).
@inproceedings{ott2019fairseq,
title = {{fairseq: A Fast, Extensible Toolkit for Sequence Modeling}},
author = {Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier and Michael Auli},
booktitle = {Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations)},
year = {2019},
doi = {10.18653/v1/n19-4009},
eprint = {1904.01038},
archivePrefix = {arXiv},
url = {https://doi.org/10.18653/v1/n19-4009}
}References
- Karim Ahmed, Nitish Shirish Keskar, and Richard Socher. 2017. Weighted transformer network for machine translation. arxiv, 1711.02132. OpenAlex ↗ · Scholar ↗
- Mikel Artetxe and Holger Schwenk. 2018. Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond. arXiv, abs/1812.10464. our card
- Alexei Baevski and Michael Auli. 2019. Adaptive input representations for neural language modeling. In Proc. of ICLR. our card
- Yun Chen, Victor OK Li, Kyunghyun Cho, and Samuel R Bowman. 2018. A stable and effective learning strategy for trainable greedy decoding. arXiv, abs/1804.07915. OpenAlex ↗ · Scholar ↗
- Shamil Chollampatt and Hwee Tou Ng. 2018. A multilayer convolutional encoder-decoder neural network for grammatical error correction. arXiv, abs/1801.08831. our card
- Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. 2017. Language modeling with gated convolutional networks. In Proc. of ICML. our card
- Emily Dinan, Stephen Roller, Kurt Shuster, Angela Fan, Michael Auli, and Jason Weston. 2019. Wizard of Wikipedia: Knowledge-powered conversational agents. In Proc. of ICLR. our card
- Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018a. Understanding back-translation at scale. In Conference of the Association for Computational Linguistics (ACL). OpenAlex ↗ · Scholar ↗
- Sergey Edunov, Myle Ott, Michael Auli, David Grangier, et al. 2018b. Classical structured prediction losses for sequence to sequence learning. In Proc. of NAACL. our card
- Angela Fan, David Grangier, and Michael Auli. 2018a. Controllable abstractive summarization (http://aclweb.org/anthology/W18-2706). In ACL Workshop on Neural Machine Translation and Generation. OpenAlex ↗ · Scholar ↗
- Angela Fan, Mike Lewis, and Yann Dauphin. 2018b. Hierarchical neural story generation. In Proc. of ACL. our card
- Angela Fan, Mike Lewis, and Yann Dauphin. 2019. Strategies for structuring story generation. arXiv, abs/1902.01109. our card
- Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. 2017. Convolutional Sequence to Sequence Learning. In Proc. of ICML. our card
- Sebastian Gehrmann, Yuntian Deng, and Alexander M Rush. 2018. Bottom-up abstractive summarization. arXiv, abs/1808.10792. our card
- Edouard Grave, Armand Joulin, Moustapha Cissé, David Grangier, and Hervé Jégou. 2017. Efficient softmax approximation for gpus. In Proc. of ICML. our card
- Edouard Grave, Armand Joulin, and Nicolas Usunier. 2016. Improving neural language models with a continuous cache. arXiv, abs/1612.04426. our card
- Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend (http://papers.nips.cc/paper/5945-teaching-machines-to-read-and-comprehend.pdf). In NIPS. our card
- Felix Hieber, Tobias Domhan, Michael Denkowski, David Vilar, Artem Sokolov, Ann Clifton, and Matt Post. 2018. Sockeye: A Toolkit for Neural Machine Translation. arXiv, abs/1712.05690. OpenAlex ↗ · Scholar ↗
- Hieu Hoang, Philipp Koehn, Ulrich Germann, Kenneth Heafield, and Barry Haddow. 2006. multi-bleu.perl. https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl. OpenAlex ↗ · Scholar ↗
- Rafal Józefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. 2016. Exploring the limits of language modeling. arXiv, abs/1602.02410. our card
- Marcin Junczys-Dowmunt, Roman Grundkiewicz, Tomasz Dwojak, Hieu Hoang, Kenneth Heafield, Tom Neckermann, Frank Seide, Ulrich Germann, Alham Fikri Aji, Nikolay Bogoychev, André F. T. Martins, and Alexandra Birch. 2018. Marian: Fast neural machine translation in C++. In Proc. of ACL 2018, System Demonstrations. our card
- Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. 2016. Character-aware neural language models. In Proc. of AAAI. our card
- Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander M. Rush. 2017. OpenNMT: Open-source toolkit for neural machine translation (https://doi.org/10.18653/v1/P17-4012). In Proc. ACL. our card
- Oleksii Kuchaiev, Boris Ginsburg, Igor Gitman, Vitaly Lavrukhin, Carl Case, and Paulius Micikevicius. 2018. OpenSeq2Seq: Extensible Toolkit for Distributed and Mixed Precision Training of Sequence-to-Sequence Models. In Proc. of Workshop for NLP Open Source Software. OpenAlex ↗ · Scholar ↗
- Guillaume Lample, Myle Ott, Alexis Conneau, Ludovic Denoyer, and Marc'Aurelio Ranzato. 2018. Phrase-based & neural unsupervised machine translation. In Proc. of EMNLP. OpenAlex ↗ · Scholar ↗
- Chin-Yew Lin. 2004. Rouge: a package for automatic evaluation of summaries (https://www.microsoft.com/en-us/research/publication/rouge-a-package-for-automatic-evaluation-of-summaries/). In ACL Workshop on Text Summarization Branches Out. our card
- Yizhu Liu, Zhiyi Luo, and Kenny Zhu. 2018. Controlling length in abstractive summarization using a convolutional neural network. In Proc. of EMNLP. OpenAlex ↗ · Scholar ↗
- Ilya Loshchilov and Frank Hutter. 2016. Sgdr: Stochastic gradient descent with warm restarts. In Proc. of ICLR. our card
- Minh-Thang Luong, Hieu Pham, and Christopher D Manning. 2015. Effective approaches to attention-based neural machine translation. In Proc. of EMNLP. our card
- Stephen Merity, Nitish Shirish Keskar, and Richard Socher. 2018. An analysis of neural language modeling at multiple scales. arXiv, abs/1803.08240. our card
- Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory F. Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, and Hao Wu. 2018. Mixed Precision Training. In Proc. of ICLR. OpenAlex ↗ · Scholar ↗
- A. H. Miller, W. Feng, A. Fisch, J. Lu, D. Batra, A. Bordes, D. Parikh, and J. Weston. 2017. Parlai: A dialog research software platform. arXiv, abs/1705.06476. our card
- Makoto Morishita, Yusuke Oda, Graham Neubig, Koichiro Yoshino, Katsuhito Sudoh, and Satoshi Nakamura. 2017. An empirical study of mini-batch creation strategies for neural machine translation. In Proc. of WMT. OpenAlex ↗ · Scholar ↗
- Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence rnns and beyond (https://doi.org/10.18653/v1/K16-1028). In SIGNLL Conference on Computational Natural Language Learning. our card
- Shashi Narayan, Shay B Cohen, and Mirella Lapata. 2018. Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. arXiv, abs/1808.08745. our card
- Myle Ott, Michael Auli, David Grangier, and Marc’Aurelio Ranzato. 2018a. Analyzing uncertainty in neural machine translation. In Proc. of ICML. our card
- Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. 2018b. Scaling neural machine translation. In Proc. of WMT. our card
- Romain Paulus, Caiming Xiong, and Richard Socher. 2017. A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304. our card
- Matt Post. 2018. A call for clarity in reporting bleu scores. arXiv, abs/1804.08771. our card
- Jack W. Rae, Chris Dyer, Peter Dayan, and Timothy P. Lillicrap. 2018. Fast parametric learning with activation memorization. arXiv, abs/1803.10049. OpenAlex ↗ · Scholar ↗
- Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer-generator networks (https://doi.org/10.18653/v1/P17-1099). In ACL. OpenAlex ↗ · Scholar ↗
- Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proc. of ACL. our card
- Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. 2018. Self-attention with relative position representations. In Proc. of NAACL. our card
- Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E. Hinton, and Jeff Dean. 2017. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv, abs/1701.06538. OpenAlex ↗ · Scholar ↗
- Noam Shazeer and Mitchell Stern. 2018. Adafactor: Adaptive learning rates with sublinear memory cost. arXiv preprint arXiv:1804.04235. OpenAlex ↗ · Scholar ↗
- Tianxiao Shen, Myle Ott, Michael Auli, and Marc'Aurelio Ranzato. 2019. Mixture models for diverse machine translation: Tricks of the trade. arXiv, abs/1902.07816. OpenAlex ↗ · Scholar ↗
- Kaitao Song, Xu Tan, Di He, Jianfeng Lu, Tao Qin, and Tie-Yan Liu. 2018. Double path networks for sequence to sequence learning. arXiv, abs/1806.04856. OpenAlex ↗ · Scholar ↗
- A. Vaswani, S. Bengio, E. Brevdo, F. Chollet, A. N. Gomez, S. Gouws, L. Jones, Ł. Kaiser, N. Kalchbrenner, N. Parmar, R. Sepassi, N. Shazeer, and J. Uszkoreit. 2018. Tensor2Tensor for Neural Machine Translation. arXiv, abs/1803.07416. our card
- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention Is All You Need. In Proc. of NIPS. our card
- Ashwin K Vijayakumar, Michael Cogswell, Ramprasath R Selvaraju, Qing Sun, Stefan Lee, David Crandall, and Dhruv Batra. 2016. Diverse beam search: Decoding diverse solutions from neural sequence models. arXiv preprint arXiv:1610.02424. our card
- Felix Wu, Angela Fan, Alexei Baevski, Yann N. Dauphin, and Michael Auli. 2019. Pay less attention with lightweight and dynamic convlutions. In Proc. of ICLR. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/ott-2019-fairseq-fast-extensible-toolkit-sequence/