bibtext: @inproceedings{
  zelikman2024quietstar,
  title={Quiet-{ST}aR: Language Models Can Teach Themselves to Think Before Speaking},
  author={Eric Zelikman and Georges Raif Harik and Yijia Shao and Varuna Jayasiri and Nick Haber and Noah Goodman},
  booktitle={First Conference on Language Modeling},
  year={2024},
  url={https://openreview.net/forum?id=oRXPiSOGH9}
  }
abstract: 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%→10.9%) and CommonsenseQA (36.3%→47.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.
title: Quiet-STaR: Language Models Can Teach Themselves to Think Before Speaking
authors: Eric Zelikman Georges Raif Harik Yijia Shao Varuna Jayasiri Nick Haber Noah Goodman
Models: ezelikman/quietstar-8-ahead Crystalcareai/Quiet-Star-Custom pharaouk/Quiet-Star-Custom casperhansen/Mistral-7B-v0.1-qstar-original QuantFactory/quietstar-8-ahead-GGUF pharaouk/qstar blockblockblock/Quiet-Star-Custom-bpw2.5 blockblockblock/Quiet-Star-Custom-bpw3 blockblockblock/Quiet-Star-Custom-bpw3.5 blockblockblock/Quiet-Star-Custom-bpw4.8 blockblockblock/Quiet-Star-Custom-bpw3.7 blockblockblock/Quiet-Star-Custom-bpw4 blockblockblock/Quiet-Star-Custom-bpw4.2 blockblockblock/Quiet-Star-Custom-bpw4.4 blockblockblock/Quiet-Star-Custom-bpw5 blockblockblock/Quiet-Star-Custom-bpw4.6 blockblockblock/Quiet-Star-Custom-bpw6 blockblockblock/Quiet-Star-Custom-bpw5.5