Multi-armed bandits for resource efficient, online optimization of language model pre-training: the use case of dynamic masking

Iñigo Urteaga, Moulay-Zaïdane Draïdia, Tomer Lancewicki, Shahram Khadivi
3/24/2022
cs.CLcs.LGstat.ML
bayesian

Official code: iurteaga/gp_ts_nlp (2 stars, Jupyter Notebook, MIT, last commit 2023-09-08).

Abstract

We design and evaluate a Bayesian optimization framework for resource efficient pre-training of Transformer-based language models (TLMs). TLM pre-training requires high computational resources and introduces many unresolved design choices, such as selecting its pre-training hyperparameters.

Show full abstract

We propose a multi-armed bandit framework for the sequential selection of TLM pre-training hyperparameters, aimed at optimizing language model performance, in a resource efficient manner. We design a Thompson sampling algorithm, with a surrogate Gaussian process reward model of the Masked Language Model (MLM) pre-training objective, for its sequential minimization. Instead of MLM pre-training with fixed masking probabilities, the proposed Gaussian process-based Thompson sampling (GP-TS) accelerates pre-training by sequentially selecting masking hyperparameters that improve performance. We empirically demonstrate how GP-TS pre-trains language models efficiently, i.e., it achieves lower MLM loss in fewer epochs, across a variety of settings. In addition, GP-TS pre-trained TLMs attain competitive downstream performance, while avoiding expensive hyperparameter grid search. GP-TS provides an interactive framework for efficient and optimized TLM pre-training that, by circumventing costly hyperparameter selection, enables substantial computational savings.

View on arXivView PDF

Code Implementations(1)

iurteaga/gp_ts_nlpOfficial100%
MIT

Work on a Bayesian optimization framework for efficient pre-training of Transformer-based language models.

20Jupyter Notebook, TeXMay 24, 20233 years agoMIT

Similar Papers

Cite this paper

@article{urteaga2022multiarmed,
  title  = {Multi-armed bandits for resource efficient, online optimization of language model pre-training: the use case of dynamic masking},
  author = {Iñigo Urteaga and Moulay-Zaïdane Draïdia and Tomer Lancewicki and Shahram Khadivi},
  year   = {2022},
  eprint = {2203.13151},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.13151}
}

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/2203.13151.svg)](https://codeofpaper.com/paper/2203.13151)

Discussion