[Paper Review] Scalable Transformers for Neural Machine Translation
This paper proposes Scalable Transformers (ST), a single unified model that enables dynamic scaling across multiple FLOPs and parameter counts via shared, cropable weights. By using a three-stage training scheme with online word-level and offline sequence-level self-distillation, ST achieves state-of-the-art performance across diverse model sizes without retraining, with sub-models outperforming independently trained counterparts and even surpassing the original widest Transformer in some cases.
Transformer has been widely adopted in Neural Machine Translation (NMT) because of its large capacity and parallel training of sequence generation. However, the deployment of Transformer is challenging because different scenarios require models of different complexities and scales. Naively training multiple Transformers is redundant in terms of both computation and memory. In this paper, we propose a novel Scalable Transformers, which naturally contains sub-Transformers of different scales and have shared parameters. Each sub-Transformer can be easily obtained by cropping the parameters of the largest Transformer. A three-stage training scheme is proposed to tackle the difficulty of training the Scalable Transformers, which introduces additional supervisions from word-level and sequence-level self-distillation. Extensive experiments were conducted on WMT EN-De and En-Fr to validate our proposed Scalable Transformers.
Motivation & Objective
- To address the challenge of deploying Transformers across diverse hardware constraints, such as mobile devices (low FLOPs) versus clusters (high accuracy), without retraining.
- To eliminate the redundancy of training and storing multiple separate models for different scales.
- To develop a unified architecture that supports flexible, on-the-fly scaling of model width while maintaining high translation accuracy.
- To mitigate training interference between sub-Transformers of different scales during joint training through knowledge distillation.
Proposed method
- Proposes a unified Scalable Transformer architecture where all sub-Transformers share parameters and are obtained by cropping the widest model’s layers.
- Employs a three-stage training scheme: first pre-train the widest model, then apply online word-level self-distillation to supervise smaller sub-Transformers during training.
- Introduces offline sequence-level self-distillation using soft labels from the widest model to further refine smaller sub-Transformers.
- Uses random sampling of different sub-Transformer widths during training to ensure robustness and generalization across scales.
- Enables dynamic inference by cropping the widest model to obtain smaller, deployable versions with minimal performance drop.
- Leverages parameter sharing to drastically reduce memory and computation costs compared to training multiple independent models.
Experimental results
Research questions
- RQ1Can a single Transformer model be trained to support multiple inference scales (in terms of FLOPs and parameters) without retraining?
- RQ2How can training interference between sub-Transformers of different sizes be mitigated when training them jointly with shared parameters?
- RQ3Can self-distillation techniques improve the performance of smaller sub-Transformers while preserving or enhancing the performance of the largest model?
- RQ4Does the ability to search for optimal sub-Transformers after training lead to better performance than training a standalone widest model?
- RQ5Can the proposed method achieve better or comparable performance than state-of-the-art models while reducing total training and storage costs?
Key findings
- The best randomly searched sub-Transformer from the type-2 Scalable Transformer achieved 29.7 BLEU on the WMT En-De test set, outperforming the original widest Transformer (29.3 BLEU).
- The top-10 sub-Transformers from the type-2 model achieved an average of 29.60 ± 0.061 BLEU on the test set, all exceeding the performance of the standalone widest Transformer.
- Training the Scalable Transformer required only 212 hours on 8 V100 GPUs and 209M parameters, while training 12 independent models of varying widths would require 712 hours and 1.29B parameters.
- The type-1 ST model achieved 29.3 BLEU on En-De and 43.1 BLEU on En-Fr, comparable to the baseline Transformer, but with 13 sub-models of different sizes sharing the same parameters.
- The performance gain in type-2 ST is not due to model averaging over checkpoints, as averaging 10 best models from 1,000 checkpoints of a standalone widest model yielded only 29.4 BLEU, still below the best sub-model of the type-2 ST.
- The method enables flexible deployment: any sub-Transformer can be obtained by cropping the widest model without retraining, significantly reducing training and memory overhead.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.