TinyStories: Quanto Piccoli Possono Essere i Modelli Linguistici e Parlare Ancora in Inglese Coerente?
TinyStories: How Small Can Language Models Be and Still Speak Coherent English?
May 12, 2023
Autori: Ronen Eldan, Yuanzhi Li
cs.AI
Abstract
I modelli linguistici (LM) sono strumenti potenti per l'elaborazione del linguaggio naturale, ma spesso faticano a produrre testi coerenti e fluenti quando sono di piccole dimensioni. Modelli con circa 125 milioni di parametri, come GPT-Neo (piccolo) o GPT-2 (piccolo), raramente riescono a generare testi in inglese coerenti e consistenti oltre poche parole, anche dopo un addestramento estensivo. Ciò solleva la questione se l'emergere della capacità di produrre testi in inglese coerenti avvenga solo a scale più grandi (con centinaia di milioni di parametri o più) e con architetture complesse (con molti livelli di attenzione globale).
In questo lavoro, introduciamo TinyStories, un dataset sintetico di brevi storie che contengono solo parole tipicamente comprese da bambini di 3-4 anni, generate da GPT-3.5 e GPT-4. Mostriamo che TinyStories può essere utilizzato per addestrare e valutare LM molto più piccoli rispetto ai modelli all'avanguardia (con meno di 10 milioni di parametri totali) o con architetture molto più semplici (con un solo blocco trasformatore), che tuttavia producono storie fluenti e consistenti di diversi paragrafi, diversificate e con una grammatica quasi perfetta, dimostrando anche capacità di ragionamento.
Introduciamo inoltre un nuovo paradigma per la valutazione dei modelli linguistici: proponiamo un framework che utilizza GPT-4 per valutare il contenuto generato da questi modelli come se fossero storie scritte da studenti e valutate da un insegnante (umano). Questo nuovo paradigma supera i limiti dei benchmark standard, che spesso richiedono un output molto strutturato, e fornisce un punteggio multidimensionale per il modello, assegnando voti per diverse capacità come grammatica, creatività e coerenza.
Speriamo che TinyStories possa facilitare lo sviluppo, l'analisi e la ricerca sui LM, specialmente per domini a basso contenuto di risorse o specializzati, e getti luce sull'emergere delle capacità linguistiche nei LM.
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.