AI Infra
0%
Preface

Preface

AuthorChangkun Ou
Reading time~5 min
Book cover Book cover

Artificial intelligence became infrastructure gradually, as several curves began to pull on one another: model capability, training compute, accelerator supply, inference traffic, data-center power, and public expectation. No single model crossed a clean threshold. The load simply accumulated until the systems around it had to be built. Work that looked like a research demonstration one year becomes a product dependency the next, and the same family of models now sits inside a search box, an IDE, a call center, a classroom, and a government workflow. To society it arrives as change in labor, education, media, and regulation; to engineers, as a new class of system that has to be budgeted, monitored, secured, upgraded, and held accountable.

"Exponential growth" is often used loosely around AI. In this book it has a plain engineering consequence: once capability, traffic, and cost all grow together, local choices stop staying local. Widen a context window and you have changed how memory is scheduled. A benchmark moves, and a product claim moves with it. The unit cost of a model decides who can afford to deploy it at all, and synthetic media has quietly redrawn the trust boundary for institutions that once treated sight and sound as evidence. This book exists because readers need a way to follow those couplings without mistaking any one layer for the whole.

This book treats artificial intelligence as infrastructure in that ordinary engineering sense: a shared layer other software and organizations depend on, with uptime, cost curves, failure modes, security boundaries, upgrade paths, and operators. The model still matters, but it is no longer the whole object. Around it sit data pipelines, training systems, serving engines, retrieval layers, evaluation harnesses, agent runtimes, policy gates, hardware supply chains, and the economics that decide which choices survive contact with production.

This book focuses on what falls between those layers. It is not the deepest standalone manual for scaling laws, distributed training, kernels, or serving engines; strong public resources already fill that role. Its subject is the coupling itself: how a serving cost reaches back into a pretraining decision, how an evaluation harness reshapes post-training data, why a safety boundary constrains an agent runtime, and what market structure decides can be deployed at all.

The book follows one capability through its lifecycle: from raw compute and corpus construction to a deployed behavior that can be measured, constrained, and operated. Along that line, each layer is not only an explanation of how a mechanism works. It is an argument about why the mechanism took this shape: which constraint forced it, what earlier design it replaced, what it made cheaper, and what risk it moved somewhere else.

To keep that line from breaking, the chapters use a common discipline. They isolate the problem and its real constraints, give the design that answers it, trace the lineage, name the trade-offs, and only then drop into implementation. This is not a cookbook, though it contains practical material. A chapter has to answer "why is it built this way?" as clearly as "how do I run it?".

How this book is organized

The spine is the lifecycle of a capability, read as a stack from the foundations it is built on to deployed behavior:

  • Part 0, Orientation. The whole stack in one pass, and how to read the book.
  • Part I, Base Model Formation. Scaling, data, tokenization, architecture, training at scale, and mid-training bridges.
  • Part II, Generative and Multimodal Architectures. Diffusion and flow matching, non-autoregressive and diffusion language models, speech, and multimodal fusion.
  • Part III, Post-Training: Adaptation, Preference, and Alignment. Fine-tuning, behavior specifications, preference data, RLHF, direct preference optimization, verifiable rewards, instruction hierarchy, and self-improvement.
  • Part IV, Reasoning and Test-Time Compute. Elicitation, structured search, programs and solvers, verifiers, RLVR training, reasoning data and distillation, and production test-time compute.
  • Part V, Inference and Serving. The serving problem, scheduling, faster decoding, quantization, and long context.
  • Part VI, Orchestration. Training agents to act, agent architectures, memory, the harness, multi-agent systems, retrieval, embeddings, and context.
  • Part VII, Evaluation. Benchmarks, statistical reliability, human rubrics, model judges, factuality, agents, and operational governance.
  • Part VIII, Safety, Interpretability, and Governance. Interpretability, oversight, and agent security.
  • Part IX, Infrastructure, Compute, and Frontiers. Accelerators, networking, the orchestration around a run, and the compute, capability, and verification frontiers of silicon, power, scale, measurement, and acceptance.
  • Part X, Ecosystem and Economics. Model openness, tooling standards, compute markets, market structure, adoption and productivity, and data rights.
  • Part XI, Practice and Operations. A hands-on guide to choosing and wiring real tools, then deploying and operating them with attention to reliability, the production data engine, SLOs, cost governance, incidents, and multi-tenancy.

Two motifs run through the book, and recognizing them ties distant chapters together. The first is the three loops, training, inference, and agentic: the same control structure seen again at different layers. The second is the capability, efficiency, trust lens that closes each chapter: can it do the task, at what cost, and can you trust it. Beyond these two, watch for the constraint arrows, the places where a lower layer dictates an upper layer's choice. The payoff of reading the stack in order is found at those connections. Those arrows are the book's main claim: silicon, electricity, geography, price, and operating obligations are not context around AI infrastructure; they are constraints that reach upward into model, product, and governance design.

Who this is for

This book is for engineers who build and operate AI systems, and for researchers who want to see how their theory lands in production. It assumes comfort with one programming language, basic probability and linear algebra, and the ordinary tools of running software in production.

This book is versioned as a living draft. Chapters keep source pointers, separate settled mechanisms from moving claims, and mark unsettled questions explicitly. Each chapter closes the live debates in a "what's contested" box rather than papering over them.

A disclosure

Several of the worked examples in this book are the author's own products, the latere.ai stack: the Lux model gateway, the Cella sandbox, the Topos agent platform, the Wallfacer orchestration tool, and the Lectio document layer. They appear because the author built them and can describe their design from the inside, not because they are recommended over the alternatives. Where one appears as a practical recommendation, it stands beside its neutral competitors, is marked as the author's own, and is treated as one illustration of a pattern rather than a verdict. Chapter 75 introduces the stack in full; later mentions point back to it.

Comments

Log in to comment