Skip to content

From learning signals to inference at scale

Follow one model from a learning objective to a measured service. This route connects the science of learning with the engineering that makes a trained artifact useful. Each stage ends with evidence you can inspect; a successful command is only one part of that evidence.

For the high-level explanation, read how models learn, architecture and performance, and runtime controls. For hands-on work, continue through the stages below, using CPU examples first and supported GPU runtimes when available. The model-building route in the worked LLM system supplies implementation depth.

StageRead and workEvidence to produce
Understand learningSignals and the update loop, learning foundationsExplain the target, loss, trainable parameters, and held-out task metric
Choose/build the architectureFoundation-model families, decoder blockTiny forward-pass checks; parameter, compute, and state counts
Train locallyFrameworks, training-step comparison, TinyStoriesCorrect target shift/masks; parameter changes; train and validation curves
Fit and scale trainingPrecision/accumulation, parallel layouts, recoveryMatched global-batch checks, peak memory, useful tokens/sec, interrupted-run recovery
Adapt with the available signalSFT, DPO, SFT recipes, preference variants, method scopingFrozen comparison with the base model and task-specific regressions
Learn from actions when justifiedPolicy/data distinctions, PPO and GAE, reward design, GRPOBehavior probabilities, valid advantages, independent success, reference and old/current KL
Scale rollout learningActor/learner systems and GRPO variantsRevision/lag accounting, reward audit, accepted fresh tokens and improvement per GPU-hour
Compress if neededKL distillation, distillation data/deployment, quantizationStudent/base/teacher task comparison; export and precision regression checks
Serve and validate locallyLocal vLLM, SGLang, llama.cpp, and in-process lab, model loadingArtifact identity, template/token equivalence, API/stream tests, held-out service quality
Optimize executionArchitecture constraints, control mechanisms and flags, batch invarianceFixed-workload ablations, numerical/replay criteria, measured memory and latency
Deploy at scaleServing layouts, capacity and load, GPU deploymentOpen-loop goodput curve, startup and failure capacity, bounded admission, recovery behavior
Operate and revisitPerformance gates, evaluation, observabilityVersioned reports, workload drift checks, regressions, and cost per successful task

This is a branching route. SFT, preference learning, reward optimization, and distillation can solve different problems; running them all in sequence is not a requirement. Architecture, data rights, privacy, and evaluation constraints apply throughout. Data Engineering covers corpus construction and provenance; the responsible-deployment chapters in this book cover release obligations.

Question and expected mechanism:
Baseline and candidate revisions:
Data/workload and split hashes:
Learning objective or serving control changed:
Hardware, runtime versions, resolved configuration:
Correctness, numerical, quality, latency, and cost criteria:
Observed results, failures, uncertainty, and raw records:
Conclusion under these assumptions; untested conditions:

The source register records checked primary papers and runtime documentation. Executable learning checks recompute the worked arithmetic, while the local and distributed labs specify experiments to run on the actual stack. Source verification, arithmetic verification, a trained model’s behavior, and a GPU benchmark are distinct forms of evidence; each supports only its own claims.