Skip to main content

2 posts tagged with "ai-architecture"

View All Tags

[Stanford CS329A #2] Test-Time Compute Scaling: Beyond Train-Time Scaling Laws to Compute-Optimal Inference

· 12 min read
Jaybee
AI & Robotics Engineer

Stanford CS329A Test-Time Compute Scaling

Welcome to the second installment of our definitive engineering breakdown of Stanford University's CS329A: Self-Improving AI Agents (Autumn 2025).

In our inaugural lecture, we traced the macroeconomic paradigm shift from static, autoregressive next-token predictors to autonomous self-improving agentic loops. Today, we confront the technical foundation that makes this autonomy computationally viable: Test-Time Compute Scaling (Inference-Time Scaling).

For over half a decade, the predominant scaling doctrine across the AI industry was dictated by train-time laws (Kaplan et al., Chinchilla): allocate larger clusters, expand parameter footprints, and absorb tens of trillions of tokens. Yet, once a model’s parameters θ are frozen, what happens if we refuse to accept a 50-millisecond greedy response? What if an agent spends 10 seconds, 1 minute, or 10 minutes deliberately exploring reasoning trees, checking intermediate steps, and revising its hypotheses before committing to an action?

Through the foundational empirical discoveries of Large Language Monkeys (Brown et al., 2024), Snell et al.'s Compute-Optimal Scaling (Stanford/UC Berkeley, 2024), and the Archon modular architecture framework, we will mathematically formalize how trading test-time FLOPs for parameter capacity reshapes modern artificial intelligence.

flowchart TD
subgraph PreTrain ["The Classical Frontier: Train-Time Scaling"]
direction TB
P1["Trillions of Web Tokens (D)"] --> P2["Massive GPU Clusters (C_train)"]
P2 --> P3["Frozen Dense Model (θ)"]
P3 --> P4["Single Greedy Forward Pass (O(1) Test Compute)"]
end

subgraph TestTime ["The CS329A Frontier: Test-Time Compute Scaling"]
direction TB
T1["Frozen Base Weights (θ)"] --> T2["Dynamic Test-Time FLOP Allocation"]
T2 --> T3{"Adaptive Strategy Selection"}
T3 -- "Low Difficulty (Bin 1-2)" --> T4["Sequential Revision (Self-Correction)"]
T3 -- "High Difficulty (Bin 3-5)" --> T5["PRM-Guided Tree Search (MCTS / Beam Search)"]
T4 --> T6["Process Reward Model (PRM) Verifier"]
T5 --> T6
T6 --> T7["Mathematically / Mechanically Proven Solution"]
end

PreTrain -.->|"Inflection Point: Parameter Saturation"| TestTime

[Stanford CS329A #1] Course Overview: From Large Language Models to Self-Improving AI Agents

· 12 min read
Jaybee
AI & Robotics Engineer

Stanford CS329A Self-Improving AI Agents

Welcome to the definitive technical breakdown of Stanford University's CS329A: Self-Improving AI Agents (Autumn 2025).

Over the past four years, the artificial intelligence landscape has been dominated by a single, powerful dogma: pre-training larger models on larger text corpora yields ever-increasing cognitive capabilities. While this paradigm sparked the modern generative AI revolution—giving rise to GPT-4, Claude 3.5, and Gemini—the frontier of machine learning research has hit a pivotal inflection point.

Static foundation models, however immense their parameter counts, remain fundamentally bounded: they are passive, autoregressive next-token predictors operating in an open-loop regime. Once their weights are frozen post-training, they cannot dynamically allocate compute to harder problems, cannot autonomously verify the factual correctness of their solutions, and cannot iteratively self-correct their errors based on environmental feedback.

flowchart LR
subgraph Static_Era ["The Static Paradigm (2020-2024)"]
direction TB
A1[Massive Web Corpus] --> B1[Pre-Training Cluster]
B1 --> C1[Supervised Fine-Tuning]
C1 --> D1[Static Frozen Model]
D1 -->|Single Forward Pass| E1[One-Shot Text Response]
end

subgraph Autonomous_Era ["Stanford CS329A Frontier: Self-Improving Agents"]
direction TB
A2[Complex Task Goal] ==> B2[Reasoning & Planning Engine]
B2 -->|Draft Actions / Code| C2[Sandbox Environment & Tools]
C2 -->|Execution Trace & State| D2[Process Verifiers & PRMs]
D2 -->|Reward & Error Signal| B2
D2 ==>|Test-Time & Train-Time Update| E2[Continuous Self-Evolution]
end

Stanford CS329A addresses the central question of the next decade of AI: How do we build software agents that do not merely generate text, but continuously inspect, verify, plan, and improve their own reasoning and code?

In this inaugural overview lecture, we deconstruct the evolutionary trajectory from foundational LLMs to agentic systems, formalize the mathematics of scaling laws and inference-time compute allocation, analyze the four canonical agent workflow archetypes, and isolate the critical bottleneck of autonomous intelligence: the Generator-Verifier Gap.