lifecycle:inference

Inference

Inference in the context of production machine-learning systems.

10

Lessons

Formal explanations, examples, simulations, and checkpoints.

Frontier architectures & efficient inference

Autoregressive decoding policies

The model supplies possibilities; the decoding policy decides which possibilities can become product behavior.

Frontier architectures & efficient inference

KV caches, GQA/MQA, and long context

KV caching removes repeated history compute by turning context length into a first-class memory budget.

Frontier architectures & efficient inference

Quantization, compilation, and fused kernels

Optimize the measured bottleneck, and treat every numeric or execution rewrite as a new artifact that must pass quality gates.

Frontier architectures & efficient inference

Continuous batching and speculative decoding

Throughput techniques earn their place only when they improve completed requests—not merely scheduled tokens.

Frontier architectures & efficient inference

Distributed and MoE inference

Distributed inference is constrained by the slowest communication or routing boundary, not by the sum of advertised compute.

Serving & inference systems

Choose batch, online, streaming, edge, or hybrid

Place inference where the decision’s deadline, freshness, and failure semantics can actually be met.

Serving & inference systems

Package model, preprocessing, schema, and runtime

The deployable artifact is the complete raw-input-to-output program, not the weights alone.

Serving & inference systems

Features, batching, caching, and backpressure

Fast serving comes from bounded, version-aware work; graceful overload is a feature, not an afterthought.

Serving & inference systems

Capacity, load testing, autoscaling, and tails

Design capacity around the tail and the delay of the scaling loop, not around average throughput.

Serving & inference systems

Shadow, canary, rollback, fallback, observability

A release is safe only when exposure is attributable, bounded, observable, and quickly reversible.