Cramming: Training a Language Model on a Single GPU in One Day

Jonas Geiping, Tom Goldstein
12/28/2022
cs.CLcs.LG

Official code: JonasGeiping/cramming (1,368 stars, Python, MIT, last commit 2024-06-13).

Abstract

Recent trends in language modeling have focused on increasing performance through scaling, and have resulted in an environment where training language models is out of reach for most researchers and practitioners. While most in the community are asking how to push the limits of extreme computation, we ask the opposite question: How far can we get with a single GPU in just one day?

Show full abstract

We investigate the downstream performance achievable with a transformer-based language model trained completely from scratch with masked language modeling for a single day on a single consumer GPU. Aside from re-analyzing nearly all components of the pretraining pipeline for this scenario and providing a modified pipeline with performance close to BERT, we investigate why scaling down is hard, and which modifications actually improve performance in this scenario. We provide evidence that even in this constrained setting, performance closely follows scaling laws observed in large-compute settings. Through the lens of scaling laws, we categorize a range of recent improvements to training and architecture and discuss their merit and practical applicability (or lack thereof) for the limited compute setting.

View on arXivView PDF

Code Implementations(1)

MIT

Cramming the training of a (BERT-type) language model into limited compute.

1,368105Python, ShellDec 29, 20222 years agoMIT
english-languagelanguage-modelmachine-learning

Similar Papers

Cite this paper

@article{geiping2022cramming,
  title  = {Cramming: Training a Language Model on a Single GPU in One Day},
  author = {Jonas Geiping and Tom Goldstein},
  year   = {2022},
  eprint = {2212.14034},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.14034}
}

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

Discussion