about
How Small Can Language Models Be and Still Speak Coherent English? (arxiv.org)
42 points by tosh on May 16, 2023 | hide | past | pdf | 10 comments on HN

In plain words: A set of short stories using only words a 3- or 4-year-old knows lets tiny language models learn to write from simple text. Models with under 10 million learned settings, far below the usual 125 million, wrote fluent multi-paragraph stories with almost perfect grammar.

Abstract · TinyStories: How Small Can Language Models Be and Still Speak Coherent English?

Language models (LMs) are powerful tools for natural language processing, but they often struggle to produce coherent and fluent text when they are small. Models with around 125M parameters such as GPT-Neo (small) or GPT-2 (small) can rarely generate coherent and consistent English text beyond a few words even after extensive training. This raises the question of whether the emergence of the ability to produce coherent English text only occurs at larger scales (with hundreds of millions of parameters or more) and complex architectures (with many layers of global attention). In this work, we introduce TinyStories, a synthetic dataset of short stories that only contain words that a typical 3 to 4-year-olds usually understand, generated by GPT-3.5 and GPT-4. We show that TinyStories can be used to train and evaluate LMs that are much smaller than the state-of-the-art models (below 10 million total parameters), or have much simpler architectures (with only one transformer block), yet still produce fluent and consistent stories with several paragraphs that are diverse and have almost perfect grammar, and demonstrate reasoning capabilities. We also introduce a new paradigm for the evaluation of language models: We suggest a framework which uses GPT-4 to grade the content generated by these models as if those were stories written by students and graded by a (human) teacher. This new paradigm overcomes the flaws of standard benchmarks which often requires the model's output to be very structures, and moreover provides a multidimensional score for the model, providing scores for different capabilities such as grammar, creativity and consistency. We hope that TinyStories can facilitate the development, analysis and research of LMs, especially for low-resource or specialized domains, and shed light on the emergence of language capabilities in LMs.

Ronen Eldan, Yuanzhi Li
arXiv:2305.07759 · cs.CL, cs.AI, cs.LG · submitted May 12, 2023 · updated May 24, 2023
abstract · pdf · html

add comment on HN
Also discussed: Jan 2025 (218 points, 104 comments)

Basically Tiny Language Models (below 10m parameters or only one transformer block) can generate paragraphs of coherent text and reason....provided training is limited to stories that only contain words typical 3 to 4 year olds would understand.

They asked 3.5 and 4 to create a synthetic dataset for this. How they did that is pretty interesting as well.

>In order to address the problem of diversity, we collected a vocabulary consisting of about 1500 basic words,

which try to mimic the vocabulary of a typical 3-4 year-old child, separated into nouns, verbs, and adjectives. In each generation, 3 words are chosen randomly (one verb, one noun, and one adjective). The model is instructed to generate a story that somehow combines these random words into the story. As we argue below, this greatly increases the diversity of the dataset, forcing the stories to span the entire vocabulary a child is familiar with, and to include a rich set of ways to combine different concepts. In addition, we constructed a list of possible features a story could have (such as a dialogue, a plot twist, a bad ending or a moral value). For each story we generated a random subset of those features and prompted the model with the extra requirement for the story to have these features

Very interesting! So what I’m wondering is this: Can you train a small model on this “child dataset“. And then, once it speaks fluently in this simple language, add new layers on top of it, and, freezing the rest of the model, train those on a corpus of more complex material.
Unless the model is hooked up to a text-to-speech module it doesn't speak any English at all.

Signed, A frustrated auditory scientist.

Similar energy to when someone who practises Archery watches historical fiction depicting someone telling bowmen to “fire!”
What's the correct word to command your archers to release a volley?
Oh sure, yeah, the distinction between text and speech is trivial, which is why text to speech and speech to text are indistinguishable algorithims ;)
Why use many training when few training will do?

-the machine

Where is the code / model they trained?
Thank you! <3