Critical Data Size of Language Models from a Grokking Perspective

Xuekai Zhu, Yao Fu, Bowen Zhou, Zhouhan Lin
1/19/2024
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

We explore the critical data size in language models, a threshold that marks a fundamental shift from quick memorization to slow generalization. We formalize the phase transition under the grokking configuration into the Data Efficiency Hypothesis and identify data insufficiency, sufficiency, and surplus regimes in language models training dynamics. We develop a grokking configuration to reproduce grokking on simplistic language models stably by rescaling initialization and weight decay. We show that generalization occurs only when language models reach a critical size. We analyze grokking across sample-wise and model-wise, verifying the proposed data efficiency hypothesis. Our experiments reveal smoother phase transitions occurring at the critical dataset size for language datasets. As the model size increases, this critical point also becomes larger, indicating that larger models require more data. Our results deepen the understanding of language model training, offering a novel perspective on the role of data in the learning mechanism of language models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhu2024critical,
  title  = {Critical Data Size of Language Models from a Grokking Perspective},
  author = {Xuekai Zhu and Yao Fu and Bowen Zhou and Zhouhan Lin},
  year   = {2024},
  eprint = {2401.10463},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.10463v3}
}

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

Discussion