Mask More and Mask Later: Efficient Pre-training of Masked Language Models by Disentangling the [MASK] Token

Baohao Liao, David Thulke, Sanjika Hewavitharana, Hermann Ney, Christof Monz
11/9/2022
cs.CLcs.AI

Official code: BaohaoLiao/3ml (7 stars, last commit 2022-10-24).

Abstract

The pre-training of masked language models (MLMs) consumes massive computation to achieve good results on downstream NLP tasks, resulting in a large carbon footprint. In the vanilla MLM, the virtual tokens, [MASK]s, act as placeholders and gather the contextualized information from unmasked tokens to restore the corrupted information.

Show full abstract

It raises the question of whether we can append [MASK]s at a later layer, to reduce the sequence length for earlier layers and make the pre-training more efficient. We show: (1) [MASK]s can indeed be appended at a later layer, being disentangled from the word embedding; (2) The gathering of contextualized information from unmasked tokens can be conducted with a few layers. By further increasing the masking rate from 15% to 50%, we can pre-train RoBERTa-base and RoBERTa-large from scratch with only 78% and 68% of the original computational budget without any degradation on the GLUE benchmark. When pre-training with the original budget, our method outperforms RoBERTa for 6 out of 8 GLUE tasks, on average by 0.4%.

View on arXivView PDF

Code Implementations(1)

BaohaoLiao/3mlOfficial100%

Official code for 3ML (EMNLP 2022)

70Jul 11, 20224 years ago
bertefficient-pretraining

Similar Papers

Cite this paper

@article{liao2022mask,
  title  = {Mask More and Mask Later: Efficient Pre-training of Masked Language Models by Disentangling the [MASK] Token},
  author = {Baohao Liao and David Thulke and Sanjika Hewavitharana and Hermann Ney and Christof Monz},
  year   = {2022},
  eprint = {2211.04898},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.04898}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.04898.svg)](https://codeofpaper.com/paper/2211.04898)

Discussion