GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

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

STaR without labels: Mistral 7B learns to write a short hidden thought before each token of web text, rewarded when it predicts what comes next. Zero-shot GSM8K rose from 5.9% to 10.9%.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2024
AUTHORS
Zelikman, Harik, Shao, Jayasiri, Haber, Goodman
FROM
Stanford University, Notbad AI
PUBLISHED
Mar 2024 · arXiv preprint
CITED BY
371Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 20% of this breakdown.

01

The paper in one minute

The earlier STaR paper taught a model to reason by keeping its own rationales whenever they reached a labeled answer. That needs a question-answer dataset. Quiet-STaR, from the same group, drops the labels. Any text has reasoning implied between its lines: the step skipped in a proof, the reason a sentence follows the last. If the model writes a short thought before predicting the next token, the real next tokens act as the answer key.

The method has three steps, which the authors call think, talk and learn. Think: at every position in a training sequence, the model generates a thought of 8 to 24 tokens between learned start-of-thought and end-of-thought tokens. A special attention mask lets all positions generate their thoughts in parallel, one token per forward pass. Talk: a small mixing head looks at the hidden states with and without the thought and decides how much the after-thought prediction should count. Early in training, thoughts are mostly noise, and the mixing head keeps them from hurting the model. Learn: each thought is scored by how much it raises the log-probability of the true next several tokens, relative to the other thoughts sampled at that position, and the better-than-average thoughts are reinforced with REINFORCE.

Applied as continued pretraining to Mistral 7B on OpenWebMath, a crawl of math-heavy web pages, it raised zero-shot GSM8K from 5.9% to 10.9% and CommonsenseQA from 36.3% to 47.2%, with no training on either task. Training on C4 helped less. On average, next-token prediction barely improved; the gains were concentrated on hard tokens. The cost is large, because every token now comes with a generated thought.

THE IDEA, VISUALLY
THINK, TALK, LEARN AT EVERY TOKEN (SECTION 4) the first of these tends to <sot> in some sense - to be <eot> hidden thought, t tokens (8 to 24) base prediction p(next | text) after-thought prediction p(next | text, thought) mixing head: weight w per token reward = log p(true next n tokens | thought) minus the mean over the thoughts at that position REINFORCE, positive rewards only; start/end tokens initialized from the em dash embedding Trained on web text with no labels; thoughts are generated for all positions in parallel with a diagonal attention mask. ZERO-SHOT ACCURACY, MISTRAL 7B (SECTION 5.1) GSM8K base 5.9% Quiet-STaR on C4 8.1% Quiet-STaR on OpenWebMath 10.9% CommonsenseQA base 36.3% Quiet-STaR on C4 42.6% Quiet-STaR on OpenWebMath 47.2% no task fine-tuning; in Figure 2, accuracy rises with thought length (8 to 24 tokens) over 100 training steps CHAIN OF THOUGHT ON TOP (SECTION 5.3) majority vote of 8, 128 GSM8K items: 40.6% -> 47.7% 95% interval on each is about +/- 8.6 points (our check) COST (OUR ACCOUNTING) 24 thought tokens + 2 markers per text token: ~27x the decoding steps of plain generation arXiv 2403.09629, Stanford and Notbad AI, 2024
At each position of ordinary text, the model writes a short thought between learned start and end tokens, predicts the next tokens with and without it, and a small mixing head blends the two predictions. Thoughts that raise the probability of the true next several tokens more than the other thoughts sampled there are reinforced. Trained this way on web text, Mistral 7B improved zero-shot on GSM8K and CommonsenseQA without any task fine-tuning, at the price of tens of extra tokens per text token.
Research notes: the problem, approach and results
5.9% → 10.9%

zero-shot GSM8K accuracy for Mistral 7B after Quiet-STaR on OpenWebMath (abstract)

36.3% → 47.2%

zero-shot CommonsenseQA accuracy, same model, no task fine-tuning (abstract)

40.6% → 47.7%

majority vote of 8 chain-of-thought samples on 128 GSM8K items (Section 5.3)

THE PROBLEM

STaR teaches a model to reason by keeping rationales that reach labeled answers, which limits it to curated question-answer datasets. Most text has reasoning between the lines but no labels, and generating a rationale at every position of every document looked far too expensive.

THE IDEA

Treat a short thought before each token as a latent variable and reward it by how much it improves prediction of the real next few tokens. Generate thoughts for all positions in one parallel pass using a special attention mask, learn start and end tokens, and blend predictions with and without the thought through a mixing head.

THE RESULT

After continued pretraining of Mistral 7B on OpenWebMath, zero-shot accuracy rose from 5.9% to 10.9% on GSM8K and from 36.3% to 47.2% on CommonsenseQA with no task fine-tuning. Training on C4 gave smaller gains, and the method adds tens of generated tokens for every text token.

02

Why it matters to an FDE

Quiet-STaR is a research precursor to models that think before they answer, and it makes the price of that visible in a way product demos do not.

Thinking is paid for in tokens. Each output token here comes with a hidden thought of up to 24 tokens plus two marker tokens, so decoding takes roughly 10 to 27 times the steps of plain generation by our count. When a customer compares a reasoning model with a standard one, the latency and cost questions are the same: how many hidden tokens per visible token, on which inputs.

Unlabeled text can teach some reasoning, slowly. Gains came from raw web text with no curated answers, which is the appeal. But a 7B model still scored 10.9% on GSM8K zero-shot. This is a signal that self-supervised reasoning helps, not a way to get a strong reasoner cheaply.

Hidden thoughts are not explanations. The authors state that nothing guarantees the thoughts reflect what the model is computing, and nothing filters harmful reasoning the model finds useful. Treat them as a mechanism for better prediction, not as an audit trail.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The objective, parallel generation, the mixing head, results by corpus and two misreadings

    Free account
  2. 04How it works

    The objective, parallel sampling, the mixing head, non-myopic scoring and the update

    Premium
  3. 05The numbers that matter

    Gains by corpus, the pause-token comparison, chain-of-thought results and where thoughts help

    Premium
  4. 06Try it yourself

    Recompute the gains, test the 128-item result, count the token cost and train a toy thought policy

    Premium
  5. 07Where it breaks

    Compute, one model, checkpoint choice, faithfulness, no adaptive thinking and stability

    Premium
  6. 08Using it on a deployment

    Pricing hidden reasoning, choosing when to think, and evaluating reasoning claims

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →