ChatPaper.aiChatPaper

Quiet-STaR: Los modelos de lenguaje pueden enseñarse a sí mismos a pensar antes de hablar

Quiet-STaR: Language Models Can Teach Themselves to Think Before Speaking

March 14, 2024
Autores: Eric Zelikman, Georges Harik, Yijia Shao, Varuna Jayasiri, Nick Haber, Noah D. Goodman
cs.AI

Resumen

Al escribir y hablar, las personas a veces hacen pausas para pensar. Aunque los trabajos centrados en el razonamiento a menudo lo han enmarcado como un método para responder preguntas o completar tareas agentivas, el razonamiento está implícito en casi todo el texto escrito. Por ejemplo, esto se aplica a los pasos no mencionados entre las líneas de una demostración o a la teoría de la mente subyacente en una conversación. En el Self-Taught Reasoner (STaR, Zelikman et al. 2022), el pensamiento útil se aprende inferiendo razonamientos a partir de ejemplos de pocos disparos en tareas de respuesta a preguntas y aprendiendo de aquellos que conducen a una respuesta correcta. Este es un escenario altamente restringido; idealmente, un modelo de lenguaje podría aprender a inferir razonamientos no declarados en texto arbitrario. Presentamos Quiet-STaR, una generalización de STaR en la que los modelos de lenguaje (LM) aprenden a generar razonamientos en cada token para explicar texto futuro, mejorando sus predicciones. Abordamos desafíos clave, incluyendo 1) el costo computacional de generar continuaciones, 2) el hecho de que el LM inicialmente no sabe cómo generar o usar pensamientos internos, y 3) la necesidad de predecir más allá de tokens individuales siguientes. Para resolver estos problemas, proponemos un algoritmo de muestreo paralelo por token, utilizando tokens aprendibles que indican el inicio y fin de un pensamiento, y una técnica extendida de forzamiento del profesor. Alentadoramente, los razonamientos generados ayudan desproporcionadamente a modelar tokens difíciles de predecir y mejoran la capacidad del LM para responder directamente preguntas difíciles. En particular, después de un preentrenamiento continuo de un LM en un corpus de texto de internet con Quiet-STaR, encontramos mejoras en cero disparos en GSM8K (5.9%→10.9%) y CommonsenseQA (36.3%→47.2%) y observamos una mejora en la perplejidad de tokens difíciles en texto natural. Crucialmente, estas mejoras no requieren ajuste fino en estas tareas. Quiet-STaR marca un paso hacia LMs que pueden aprender a razonar de una manera más general y escalable.
English
When writing and talking, people sometimes pause to think. Although reasoning-focused works have often framed reasoning as a method of answering questions or completing agentic tasks, reasoning is implicit in almost all written text. For example, this applies to the steps not stated between the lines of a proof or to the theory of mind underlying a conversation. In the Self-Taught Reasoner (STaR, Zelikman et al. 2022), useful thinking is learned by inferring rationales from few-shot examples in question-answering and learning from those that lead to a correct answer. This is a highly constrained setting -- ideally, a language model could instead learn to infer unstated rationales in arbitrary text. We present Quiet-STaR, a generalization of STaR in which LMs learn to generate rationales at each token to explain future text, improving their predictions. We address key challenges, including 1) the computational cost of generating continuations, 2) the fact that the LM does not initially know how to generate or use internal thoughts, and 3) the need to predict beyond individual next tokens. To resolve these, we propose a tokenwise parallel sampling algorithm, using learnable tokens indicating a thought's start and end, and an extended teacher-forcing technique. Encouragingly, generated rationales disproportionately help model difficult-to-predict tokens and improve the LM's ability to directly answer difficult questions. In particular, after continued pretraining of an LM on a corpus of internet text with Quiet-STaR, we find zero-shot improvements on GSM8K (5.9%rightarrow10.9%) and CommonsenseQA (36.3%rightarrow47.2%) and observe a perplexity improvement of difficult tokens in natural text. Crucially, these improvements require no fine-tuning on these tasks. Quiet-STaR marks a step towards LMs that can learn to reason in a more general and scalable way.

Summary

AI-Generated Summary

PDF787December 15, 2024