Skip to content
ImagineWorld

The Frontier

node_idnode-book_building-frontier-llm-from-scratch_chapter-32-the-frontier
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num32
chapter_titleThe Frontier
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

This book has been a snapshot of a field that does not hold still. The architecture that defines this moment — fine-grained MoE, latent attention, RL-trained reasoning — was largely unknown a couple of years before these words, and some of it will look dated a couple of years after. Rather than predict specifics, this closing chapter sketches the directions the frontier is moving and the questions still open, so that the foundation you have built keeps paying off as the details change. The components will evolve; the way of thinking about them should not.

The attention mechanism, the last great holdout of the standard transformer, is finally in flux. The hybrid designs of Chapter 14 — interleaving cheap linear or state-space mixing with occasional exact attention — are moving from research into flagship models (Qwen3.5, and DeepSeek-V4’s compressed attention), pushing context windows toward millions of tokens at costs that scale linearly rather than quadratically. Mixture-of-Experts continues toward more, smaller experts and ever-lower active fractions. The deeper question is whether the transformer block itself survives or whether some successor — a more recurrent, more adaptive, or more sparse computation — eventually displaces it. The modular view of this book is the right stance either way: whatever the next primitive is, it will plug into the same surrounding structure of embeddings, a residual stack, and an output head.

32.2 Training, Reasoning, and Test-Time Compute

Section titled “32.2 Training, Reasoning, and Test-Time Compute”

The most consequential recent shift is the one Chapter 25 described: reasoning learned by reinforcement learning against verifiable rewards. Its frontier is expanding the space of what can be verified — from math and code toward science, tool use, and eventually open-ended tasks judged by reliable models — and toward systems that improve themselves by generating and learning from their own successful solutions. Alongside it, a genuinely new axis has appeared: test-time compute. Rather than only making models bigger, you can make them think longer at inference, spending more tokens of reasoning on harder problems. This trades training cost for inference cost in a controllable way and has reframed scaling as something that happens at generation time, not just during training. How far this scales, and how to allocate thinking efficiently, are among the field’s most active questions.

The throughline of this book — efficiency is capability — only accelerates. Each year, the quality reachable at a given size rises and the cost of a given quality falls, driven by the architectural and systems advances of Parts IV and V and the distillation and quantization of Chapter 26. The practical consequence is democratization: capabilities that required a frontier lab become reproducible on a small cluster, then a single GPU, then a phone. DeepSeek’s contribution was as much about cost as capability — and about publishing the methods — and that combination is what has put model-building within reach of the readers of this book. The frontier of access is models that are not only powerful but cheap, private, and runnable by anyone.

AreaDirection
Architecturehybrid linear + sparse attention; million-token, linear-cost context
Reasoningverifiable rewards beyond math/code; self-improvement
Inferencetest-time compute as a new scaling axis
Efficiencyfrontier capability on small, private, on-device models
Agentsreliable multi-step autonomy and tool ecosystems

Table 32.1 — Frontier directions

Much remains unsolved. Models still hallucinate confident falsehoods; they reason brilliantly on some problems and fail trivially on neighbors; genuine reasoning over long context lags the advertised window sizes; and aligning increasingly capable stems reliably — making them honest, controllable, and safe as they grow more powerful — is an open problem of real consequence, not a solved formality. These are not reasons for pessimism but the live edges of the field, the places where the next chapters will be written, possibly by you.

And that is the point of this book. You began with a plain autocomplete and ended having built, from the ground up, a modern language model — its mathematics, its tokenizer and data, its attention and experts and latent caches, its training in FP8 across many GPUs, its alignment and reasoning, its serving and evaluation. You can now read the source code of a frontier open model and understand it; you can build a smaller one of your own; and you can follow the frontier as it moves, because you understand the machinery underneath the headlines. The models will keep changing. The understanding you have built will not go out of date — it is the lens through which every new model becomes legible. Go build something.

The end of the beginning The architecture in this book — DeepSeek-V3 and its open-weight peers — is not the end of the story but a remarkably well-documented chapter of it. Everything here is open: the weights, the code, the infrastructure, the methods. The barrier to building is no longer secret knowledge. It is, simply, deciding to begin.

The chapters end here. The appendices that follow are a working reference: a map of the open repositories cited throughout, a glossary and notation guide, cheat-sheets for hyperparameters and hardware, a note on licensing and responsible use, and a guide to reading further.

This chapter has surveyed the frontier from altitude; the next part lands on it. Part X takes each pressure described here and devotes a full chapter to the research attacking it, with the same build-it-to-understand-it stance as the rest of the book. It is worth seeing the map before the territory:

Chapter 37 confronts the quadratic cost of attention head-on — linear attention, state-space models, and the hybrids that are displacing pure transformers at long context. Chapter 38 examines reasoning and test-time compute, the axis along which DeepSeek-R1 and GLM-5.2 made their gains. Chapter 39 turns to agents and long-horizon autonomy, where a model must stay coherent over thousands of tool calls. Chapter 40 covers multimodality and world models; Chapter 41, the efficiency and compression frontier that decides what runs on what hardware. Chapter 42 takes up data, synthetic data, and self-improvement — the question of where the next trillion tokens come from once the web is exhausted. And Chapter 43 closes on alignment, interpretability, and safety, the problems that grow rather than shrink as capability rises.

Two case studies then ground the whole book in real systems: Chapter 44 dissects GLM-5.2 and Chapter 45 DeepSeek-V3, reading each as the architecture of this book made concrete. The frontier moves quickly — some specifics in these chapters will date — but the shape of the problems is stable, and the tools you have built are the tools the field is using to attack them.

From survey to depth Where this chapter named the open problems, Part X works through them one at a time. You now have every prerequisite — architecture, training, alignment, serving — to read the research frontier not as a spectator but as someone who could contribute to it.

32.6 Adjacent Capabilities the Model Does Not Provide

Section titled “32.6 Adjacent Capabilities the Model Does Not Provide”

This book builds the model, but a working application is the model plus a ring of surrounding capabilities that are not the model itself — and which often matter as much as raw model quality for whether a system is useful. Three are worth naming, because a builder who knows only the model will reach for it where one of these is the better tool.

Retrieval-augmented generation grounds the model in an external knowledge base: rather than relying on what the weights memorized, the system retrieves relevant documents at query time and conditions the generation on them, which reduces ucination and supplies fresh facts the model never trained on. ocl use and function calling (Section 39.5) let the model act — query a database, call an API, run code — turning a text generator into an agent that affects the world. And embeddings, the model’s own internal representations of text, power semantic search and the retrieval that RAG depends on, a use of the model that produces no generated text at all. These capabilities compose with the model rather than replacing any part of it, and a great deal of applied work is the engineering of this ring — retrieval pipelines, tool interfaces, embedding indexes — around a model whose construction this book has covered. Knowing where the model ends and these begin is itself part of understanding the model’s place.

The model is the center, not the whole Retrieval grounds it in external knowledge, tools let it act, embeddings power search — capabilities that surround the model rather than live inside it. Much applied work is engineering this ring, and knowing where the model ends is part of using it well.

32.7 The Pace of Progress and How to Keep Up

Section titled “32.7 The Pace of Progress and How to Keep Up”

A field that moves as fast as this one makes keeping current a skill in its own right, and it is worth closing this chapter with a word on it — because the specific models named throughout this book will be superseded, some perhaps by the time you read it. The durable strategy is not to chase every release but to understand the fundamentals deeply enough that each new development becomes legible as a variation on something you already know.

That is, in fact, the wager of this entire book. The surface of the field churns — new model names, new benchmark records, new techniques every month — but the foundations change slowly: attention, the transformer block, mixture-of-experts, the pretraining-to-alignment-to-serving pipeline. A reader who has built these understands the substrate on which every new result sits, and can read a frontier model’s technical report and recognize what is genuinely novel versus what is a familiar component rescaled. A few practical habits compound this: read primary sources — papers and technical reports — over secondary commentary and hype; follow the researchers and labs actually doing the work; and above all build things, because implementing a technique teaches what reading about it cannot. The models in this book are a snapshot; the principles are the lens. Master the lens, and you are equipped not just for today’s frontier but for whatever the field becomes next — which is the most any book in a fast-moving field can honestly promise, and exactly what this one has aimed to deliver.

Learn the lens, not the snapshot Models are superseded; fundamentals persist. Understand attention, MoE, and the training-to-serving pipeline deeply, read primary sources, and build — and each new development becomes a recognizable variation rather than a thing to chase.