MODULE 9  Β·  The Cutting Edge

Test-Time Compute: Why 'Thinking' Models Are Different

Ask GPT-4 a tricky math problem. It answers in 2 seconds. Wrong. Ask o1 the same thing. It thinks for 30 seconds. Right.

πŸ“… Mar 2026
⏱ 10 min read
🎯 Episode 62 of 98
Test-Time ComputeChain of ThoughtReasoningo1
In this episode

Ask GPT-4 to solve a tricky math problem. It answers in 2 seconds. Wrong.

Ask o1 the same problem. It "thinks" for 30 seconds. Right.

What happened in those 30 seconds? The model didn't go look anything up. It didn't call an API. It literally thought harder β€” generating hundreds of internal reasoning tokens before giving you the final answer.

This is test-time compute β€” the idea that you can make a model smarter by letting it use more compute during inference. Not by training a bigger model. Not by giving it more data. Just by letting it think longer on your question.

And it's changing the economics of AI completely.

The Two Levers of AI Intelligence

Traditionally, making AI smarter meant one thing: train bigger models on more data. That's training-time compute β€” investing billions upfront to create a better model.

But there's a second lever: test-time compute β€” investing more compute when the model is actually answering your question.

Lever When Cost Example

Training-time computeBefore deployment$100M–$1B (one-time)Train GPT-5 on 50K GPUs for 6 months
Test-time computeDuring inferencePer-query costLet o1 "think" for 30 seconds on your question

The breakthrough insight: a smaller model with more test-time compute can beat a larger model with less. A 70B model that "thinks" for 60 seconds can outperform a 405B model that answers in 2 seconds β€” on reasoning tasks.

⚑

How Thinking Tokens Work

When o1 or DeepSeek-R1 "thinks," it generates a long chain of internal reasoning tokens before producing the final answer. These thinking tokens are:

Generated by the model β€” they're real tokens, not a special mechanism

Hidden from the user β€” you see "thinking..." but not the actual reasoning (usually)

Used as context β€” each thinking token informs the next, building up a solution step by step

What the Thinking Looks Like

User: "What is 37 Γ— 48?"

Model's internal thinking tokens:

Let me solve 37 Γ— 48 step by step.

I can break this down:

37 Γ— 48 = 37 Γ— 50 - 37 Γ— 2

37 Γ— 50 = 1850

37 Γ— 2 = 74

1850 - 74 = 1776

Let me verify: 37 Γ— 48

= (30 + 7) Γ— 48

= 30 Γ— 48 + 7 Γ— 48

= 1440 + 336

= 1776 βœ“

The answer is 1776.

Final answer to user: "37 Γ— 48 = 1,776"

The user just sees "1,776" β€” but the model generated 100+ tokens of reasoning to get there. And those reasoning tokens cost compute and money.

πŸ”§

Chain-of-Thought: The Foundation

Test-time compute builds on Chain-of-Thought (CoT) prompting, discovered in 2022. The observation: if you ask a model to "think step by step," it performs dramatically better on reasoning tasks.

Without CoT:

Q: "If a train travels 120 km in 2 hours, and then 180 km in 3 hours,

example
code
what's the average speed?"

A: "72 km/h" ❌ (just guessed)

With CoT:

Q: (same question, but add "think step by step")

A: "Total distance = 120 + 180 = 300 km

example
code
Total time = 2 + 3 = 5 hours
    Average speed = 300/5 = 60 km/h" βœ…

CoT works because it forces the model to allocate compute to intermediate steps. Without CoT, the model must compute the answer in a single forward pass β€” one matrix multiply per token. With CoT, each reasoning step gets its own forward pass, dramatically increasing total compute.

Why More Tokens = More Compute

This is the key insight. Remember from Episode 4: each output token requires a full forward pass through the entire model. More tokens = more forward passes = more compute.

Standard answer: 5 tokens Γ— 1 forward pass each = 5 forward passes

CoT answer: 50 tokens Γ— 1 forward pass each = 50 forward passes

10x more compute β†’ much better reasoning

The model is literally using its own output tokens as "scratch paper" for computation.

πŸ“Š

o1: Scaling Test-Time Compute

OpenAI's o1 (September 2024) was the first model designed specifically to scale test-time compute. It was trained with reinforcement learning to generate effective reasoning chains.

How o1 Was Trained

Standard LLM training:

snippet
code
Input β†’ Model β†’ Output β†’ Compare with ground truth β†’ Update weights

o1's training (simplified):

snippet
code
Input β†’ Model β†’ Generate long reasoning chain β†’ Get final answer

β†’ Was the answer correct? β†’ Reward signal β†’ Update via RL

β†’ Also: was the reasoning efficient? β†’ Process reward β†’ Update via RL

The key difference: o1 wasn't just trained to get the right answer. It was trained to think productively β€” to generate reasoning steps that actually help reach the correct conclusion. Bad reasoning gets penalized. Circular reasoning gets penalized. Productive reasoning gets rewarded.

Scaling Behavior

The remarkable finding: o1's performance scales predictably with thinking time:

Thinking Time AIME Math Score Improvement

1 second56%Baseline
10 seconds72%+16 points
60 seconds83%+27 points
5 minutes89%+33 points

More thinking = better answers, with a smooth, predictable curve. This is a scaling law for inference β€” analogous to the training scaling laws we've known about for years.

DeepSeek-R1: Open-Source Reasoning

DeepSeek-R1 (January 2025) showed that test-time compute models could be built without OpenAI's proprietary techniques. And they open-sourced everything.

The Remarkable Discovery

DeepSeek found that if you train a model with pure reinforcement learning on reasoning tasks (no supervised CoT data), the model spontaneously develops reasoning behaviors:

Training signal: Only "was the final answer correct?"

No examples of reasoning chains provided.

Result: The model learns to:

The model invented chain-of-thought reasoning on its own, just from the reward signal of correct answers. It even developed "aha moments" β€” moments where it realizes its approach is wrong and pivots:

Let me try approach A...

Hmm, that gives me 847, which seems too large.

Wait, I think I made an error in step 3.

Let me reconsider...

Actually, I should use approach B instead.

...

Yes, approach B gives 127, which makes much more sense.

R1's Architecture

Base model: DeepSeek-V3 (671B MoE, 37B active)

Training: Multi-stage

Stage 1: Cold start with a few thousand CoT examples

Stage 2: Large-scale RL with GRPO (Group Relative Policy Optimization)

Stage 3: Rejection sampling + supervised fine-tuning

Stage 4: Final RL for helpfulness + safety

Distillation: DeepSeek also showed you can distill R1's reasoning into smaller models. R1-distilled versions at 7B, 14B, and 32B parameters still show strong reasoning β€” they learned the pattern of productive thinking from the larger model.

πŸ’‘

The Economics of Thinking

Test-time compute fundamentally changes AI pricing:

Token Costs

Standard query (GPT-4):

Input: 500 tokens Γ— $10/M = $0.005

Output: 200 tokens Γ— $30/M = $0.006

Total: $0.011

Thinking query (o1):

Input: 500 tokens Γ— $15/M = $0.0075

Thinking: 5,000 tokens Γ— $60/M = $0.30 ← THIS IS THE EXPENSIVE PART

Output: 200 tokens Γ— $60/M = $0.012

Total: $0.32

A thinking query costs 30x more than a standard query. But for hard problems (math, code, analysis), it's worth it because the answer is actually correct.

When to Use Thinking Models

TaskStandard ModelThinking ModelUse Thinking?
"What's the weather?"βœ… Fine⚠️ OverkillNo
"Summarize this email"βœ… Fine⚠️ OverkillNo
"Solve this integral"❌ Often wrongβœ… Usually correctYes
"Debug this race condition"❌ Misses edge casesβœ… ThoroughYes
"Plan a DB migration"⚠️ Superficialβœ… Considers edge casesYes
"Write a poem"βœ… Creative❌ Over-thinks itNo

The rule: Use thinking models for tasks with verifiable correct answers. Math, logic, code, analysis. Don't use them for creative writing or simple lookups.

πŸ”¬

Process Reward Models (PRMs)

A key enabler of test-time compute is the Process Reward Model β€” a separate model that evaluates each step of reasoning, not just the final answer.

Outcome vs Process Reward

Outcome Reward Model (ORM):

snippet
code
"Your final answer is correct" β†’ reward = 1.0
"Your final answer is wrong" β†’ reward = 0.0

No feedback on intermediate steps.

Process Reward Model (PRM):

snippet
code
Step 1: "120 + 180 = 300" β†’ reward = 1.0 (correct step)
Step 2: "300 / 2 = 150" β†’ reward = 0.0 (wrong step! should be /5)
Step 3: "Speed = 150 km/h" β†’ reward = 0.0 (wrong, follows from bad step)

PRMs enable:

Better RL training β€” reward good reasoning, not just lucky answers

Search during inference β€” generate multiple reasoning paths, use PRM to pick the best one

Early termination β€” stop a bad reasoning chain before wasting more tokens

πŸ›‘οΈ

Search Strategies at Inference

With enough test-time compute, you can search for the best answer:

Best-of-N Sampling

Generate N complete solutions, pick the one the PRM scores highest:

Query: "Solve this optimization problem"

Solution 1: [reasoning...] β†’ Answer: 42 β†’ PRM score: 0.85

Solution 2: [reasoning...] β†’ Answer: 37 β†’ PRM score: 0.45

Solution 3: [reasoning...] β†’ Answer: 42 β†’ PRM score: 0.92 βœ“ ← Pick this one

Solution 4: [reasoning...] β†’ Answer: 45 β†’ PRM score: 0.31

Tree Search

Instead of generating complete solutions, explore a tree of reasoning steps:

Start β†’ Step A1 (PRM: 0.9) β†’ Step A2 (PRM: 0.85) β†’ Answer (correct βœ“)

example
code
β†’ Step B1 (PRM: 0.3) β†’ pruned (bad start)
     β†’ Step C1 (PRM: 0.7) β†’ Step C2 (PRM: 0.4) β†’ pruned (went wrong)

This is more compute-efficient than best-of-N because bad paths get pruned early.

πŸ“¦

The Scaling Laws of Inference

The most important finding from test-time compute research:

Training compute and inference compute are partially substitutable.

A smaller model with more inference compute can match a larger model with less:

Equivalent performance:

405B model Γ— 1 second thinking β‰ˆ 70B model Γ— 60 seconds thinking

The smaller model "thinks harder" to compensate for fewer parameters.

This has profound implications:

Cheaper deployment β€” serve a 70B model instead of 405B

Pay per difficulty β€” easy questions get fast answers, hard questions get more thinking

Adaptive compute β€” the model itself can decide how hard to think

πŸš€

Practical Takeaways

snippet
code
Test-time compute = spending more inference compute on hard problems β€” thinking tokens are real tokens that cost money

Chain-of-thought is the mechanism β€” each reasoning token is a forward pass, giving the model more compute

Performance scales with thinking time β€” more thinking = better answers, predictably

Use thinking models for verifiable tasks β€” math, code, logic β€” not creative writing or simple lookups

Thinking queries cost 10-30x more β€” but correctness on hard problems makes it worth it

Training and inference compute are substitutable β€” smaller models can compensate with more thinking

πŸ”„

What's Next?

Episode 63: What's Next in AI β€” Agents, world models, embodied AI, the reasoning frontier. Where is this all heading? Are we hitting scaling law plateaus? We'll look at the cutting edge and the next 3-5 years of AI.

← Previous

Ep 61: State Space Models

Next β†’

Ep 63: What's Next in AI

Next: Episode 63 β€” What's Next in AI

You now understand how modern AI actually works β€” not as a user, but as an engineer. So where is all of this heading?

This is part of a 98-episode series covering AI engineering from tokens to production deployment.

← Previous Ep 61: State Space Models: Mamba and the Transformer Alternati…