AI Engineering from Scratch

Cheat sheets

156 posters. Each poster holds the tasks, commands, code, diagrams, defaults and fixes that you use while you work. Every fact comes from a lesson, a manual or a project of this course.

Foundations 23

  1. Calculus, Gradients and Convex OptimizationDerivatives, autodiff, GD, momentum, Adam, Newton and convexity tests. From-scratch Python and PyTorch.Concepts39 rows · 2 diagrams
  2. Classical Machine LearningFit, validate, tune and fix regression, classification and clustering models with scikit-learn.Concepts30 rows · 2 diagrams
  3. Classical Models ComparedLinear and logistic regression, trees and forests, SVM, KNN and Naive Bayes side by side, with when to use each.Comparisons42 rows · 1 diagram
  4. Clustering, Dimensionality Reduction and AnomaliesCluster, reduce and flag outliers without labels. K-Means, DBSCAN, GMM, PCA, Isolation Forest, LOF.Concepts37 rows · 2 diagrams
  5. Complex Numbers, Fourier and SignalsComplex rotations, DFT and FFT, windows, sampling, spectrograms, mel filterbanks and MFCCs. Python from the lessons.Concepts34 rows · 2 diagrams
  6. Debugging Neural Network TrainingFind silent training bugs from the symptom. Checks, thresholds, init rules, clipping and AMP order, profilers.Debugging40 rows · 2 diagrams
  7. Feature Engineering and PipelinesImpute, scale, encode, select and ensemble inside one leak-free pipeline. Python from the lessons.Commands and APIs37 rows · 2 diagrams
  8. Git, Shell and Linux for AI WorkCommit and branch, pipe and filter logs, keep runs alive in tmux, move files to a GPU box and fix Linux errors.Commands and APIs47 rows · 1 diagram
  9. GPUs, Cloud, Docker and API KeysCheck the GPU, size a model for VRAM, run CUDA in Docker, store API keys and fix API errors.Commands and APIs39 rows · 2 diagrams
  10. Information Theory and Numerical StabilityEntropy, cross-entropy and KL, stable softmax and log-sum-exp, float formats, PCA and distance choice.Concepts40 rows · 2 diagrams
  11. JAX against PyTorchEager tape autograd against traced, compiled pure functions. The same MNIST MLP in both, with APIs and gotchas.Comparisons37 rows · 2 diagrams
  12. Linear Algebra for MLVectors, transforms, eigenvalues, SVD and Ax = b solvers. From-scratch Python and NumPy from the lessons.Concepts39 rows · 2 diagrams
  13. Math for Machine LearningGradients, probability, information, optimizers, decompositions and float safety. NumPy, SciPy and PyTorch.Concepts32 rows · 2 diagrams
  14. ML System Design, Drift and Feature StoresFrame the task, price serving, beat baselines, roll out safely, catch drift and training-serving skew.Concepts32 rows · 2 diagrams
  15. Model Evaluation, Bias-Variance and TuningSplits and cross-validation, metric formulas, bias-variance diagnosis, search strategies and imbalanced classes.Concepts35 rows · 2 diagrams
  16. Neural Network BasicsPerceptron, forward pass, backprop, loss choice and a mini framework. Formulas, shapes, defaults and fixes.Concepts32 rows · 2 diagrams
  17. Notebooks, Data Files and ProfilingRun notebooks safely, load and split datasets, keep big files out of git, profile time and memory, catch silent AI bugs.Commands and APIs52 rows · 2 diagrams
  18. Optimizers and Learning Rate SchedulesPick SGD, Adam or AdamW, shape the learning rate, then clip, scale and accumulate gradients safely.Comparisons29 rows · 1 diagram
  19. Probability and Statistics for MLDistributions, Bayes, tests, bootstrap, sampling from logits and Markov chains. From-scratch Python and SciPy.Concepts40 rows · 2 diagrams
  20. Python Dev Environment for AIInstall uv, make one venv per project, pin with lockfiles, check the route, set up VS Code and avoid silent Python bugs.Commands and APIs44 rows · 1 diagram
  21. PyTorch EssentialsTensors, autograd, nn.Module, the training loop, DataLoader and devices, from the lessons.Commands and APIs44 rows · 2 diagrams
  22. Time Series FundamentalsCheck stationarity, build lag features, validate walk-forward, beat naive baselines. Random walks and Markov chains.Concepts31 rows · 2 diagrams
  23. Training Neural NetworksPick the optimizer, init, normalization, regularization and schedule. Then debug the run when the loss misbehaves.Debugging40 rows · 2 diagrams

Vision and audio 16

  1. Audio Features, Classification and MetricsSample, frame, window, mel, MFCC, classify and score audio. Stdlib Python from the lessons.Concepts32 rows · 1 diagram
  2. CNN Architectures and Transfer LearningSize convolutions, build LeNet to ResNet, train a classifier and fine-tune a pretrained backbone. PyTorch and NumPy.Concepts24 rows · 2 diagrams
  3. Computer VisionPreprocess, convolve, classify, fine-tune, detect, segment and patchify images. PyTorch and NumPy from the lessons.Concepts37 rows · 2 diagrams
  4. Detection and Segmentation ComparedBoxes, pixel masks, instance masks, keypoints and text-prompted masks. Outputs, losses, metrics and fixes side by side.Comparisons29 rows · 2 diagrams
  5. Edge Inference TargetsPick an edge target and a quantization format. Bandwidth ceilings, formats, export steps and on-device measurement.Comparisons27 rows · 1 diagram
  6. Evaluating Generative ModelsFID, CLIP score, CMMD, Elo, WER, MOS, SECS, EER and FAD. Code, sample sizes and the ways each number fails.Commands and APIs31 rows · 2 diagrams
  7. GANs, Diffusion and Flow ComparedGAN, DDPM, latent diffusion, DiT with rectified flow, flow matching and VAR. Targets, steps, code and fixes.Comparisons32 rows · 2 diagrams
  8. Music Generation and Audio-Language ModelsCodec tokens, MusicGen, audio encoders and projectors, Thinker and Talker, TTFAB budgets and audio pitfalls.Concepts30 rows · 3 diagrams
  9. Real-Time Voice AssistantsVAD, turn detection, barge-in, latency budgets and full-duplex speech for a voice agent that answers in time.Concepts32 rows · 3 diagrams
  10. Self-Supervised Vision, CLIP and RetrievalPretrain without labels, align images and text, classify zero-shot, shape embeddings and search them. PyTorch.Concepts32 rows · 2 diagrams
  11. Speaker Verification, Spoofing and WatermarksEnroll, score and threshold speakers, detect spoofed audio, and mark every generation with a watermark and C2PA.Concepts24 rows · 2 diagrams
  12. Speech Recognition and WhisperDecode CTC, run and tune Whisper, gate with VAD, and ship a WAV to captions pipeline.Commands and APIs27 rows · 2 diagrams
  13. Text-to-Speech, Voice Cloning and CodecsText to phonemes to mel to waveform, clone with consent and a watermark, and tokenize audio with RVQ codecs.Concepts23 rows · 2 diagrams
  14. Video and 3D GenerationVideo DiT patches and divided attention, world models, Gaussian splats, NeRF and multi-view 3D. Formulas and fixes.Concepts39 rows · 2 diagrams
  15. Video, Depth and 3D VisionSample frames, model time, render NeRFs and Gaussian splats, predict depth and track objects across frames.Concepts24 rows · 1 diagram
  16. Vision Pipelines and Edge DeploymentMeasure, quantise, export and serve a vision pipeline. Size LLM decode on edge targets by memory bandwidth.Commands and APIs30 rows · 2 diagrams

Language and transformers 19

  1. Attention Variants ComparedFull, sliding window, strided, BigBird, differential and native sparse attention. Cost, KV cache, code, fixes.Comparisons30 rows · 2 diagrams
  2. BERT, GPT and T5 ComparedEncoder-only, decoder-only and encoder-decoder side by side. Objectives, masks, blocks, decoding and when to pick each.Comparisons44 rows · 2 diagrams
  3. Chatbots and Dialogue State TrackingRoute turns, run the agent loop, track slots across turns and budget the context window. Python from the lessons.Concepts24 rows · 3 diagrams
  4. Classic Text Processing and TF-IDFTokenize, stem, lemmatize, count, weight with TF-IDF, classify sentiment and find topics with LDA or BERTopic.Commands and APIs32 rows · 1 diagram
  5. Embeddings and Vector SearchEncode text, pick a metric, size the vectors, choose an index and fix bad recall. Python, NumPy and FAISS.Commands and APIs31 rows · 2 diagrams
  6. Fine-Tuning with LoRAAdd LoRA adapters, load a 4-bit base for QLoRA, mask SFT labels, train, merge and debug. PyTorch, PEFT and bitsandbytes.Commands and APIs28 rows · 2 diagrams
  7. Graphs and Knowledge GraphsGraph matrices, Laplacian and message passing, entity linking, relation extraction and hybrid graph memory.Concepts24 rows · 3 diagrams
  8. Mixture of Experts and Hybrid ArchitecturesRouters, experts, aux-loss-free balance, MLA, DeepSeek-V3 counts and Jamba SSM hybrids. Formulas and stdlib calculators.Concepts27 rows · 2 diagrams
  9. NER, POS Tagging and CoreferenceBIO tags, CRF and HMM taggers, Viterbi, dependency parses, coreference clusters and entity linking to a KB.Concepts24 rows · 2 diagrams
  10. Positional Encoding: Sinusoidal, RoPE, ALiBiPick, build and check a position scheme. Sinusoidal, learned, RoPE, YaRN and ALiBi side by side, in Python.Comparisons37 rows · 2 diagrams
  11. RLHF, DPO and Preference TuningReward model plus PPO against DPO and its family. Losses, beta and KL settings, failure modes and fixes.Comparisons32 rows · 2 diagrams
  12. RNNs, Seq2Seq and N-gram ModelsTextCNN, LSTM and GRU, encoder-decoder with teacher forcing, beam search, BLEU, Kneser-Ney and why attention won.Concepts24 rows · 1 diagram
  13. Scaling Laws and Pre-TrainingChinchilla math, over-training, the data pipeline from raw text to packed batches, and a mini GPT training loop.Concepts34 rows · 2 diagrams
  14. Speculative Decoding: Draft, EAGLE, MTPDraft and verify with no quality loss. Vanilla, Medusa, EAGLE-3 and MTP drafts, speedup math, vLLM config, gates.Comparisons32 rows · 2 diagrams
  15. Structured Outputs and Constrained DecodingGet valid JSON every time. Schemas, strict mode, logit masks, validators, retries and the output guard project.Commands and APIs28 rows · 2 diagrams
  16. Summarization, QA, NLI and Multilingual NLPSummarize, answer, check entailment and transfer across languages. Models, metrics, defaults and failures.Concepts32 rows · 2 diagrams
  17. Tokenization and BPETrain, encode and decode a byte-level BPE tokenizer, then slice the id stream into training windows.Commands and APIs24 rows · 2 diagrams
  18. Transformers and AttentionCompute attention, mask it, split heads, add positions and stack the block. PyTorch and NumPy from the lessons.Concepts32 rows · 2 diagrams
  19. Word2Vec, GloVe and FastTextCount words, weight them with TF-IDF, train dense vectors and split rare words into subwords. Python from the lessons.Concepts30 rows · 2 diagrams

Generative and multimodal 11

  1. ControlNet, Inpainting and Image EditingDiffusers calls for text to image, img2img, inpainting, LoRA and ControlNet. Knobs, defaults and fixes.Commands and APIs33 rows · 2 diagrams
  2. Diffusion and Generative ModelsTrain and sample a VAE, a GAN, DDPM, latent diffusion and flow matching, then measure them. Toy Python from the lessons.Concepts32 rows · 2 diagrams
  3. Embodied VLAs and Computer-Use AgentsAction formats for robots, GUI action schemas, safety gates and bounded agent loops for browsers and desktops.Concepts39 rows · 2 diagrams
  4. GANs from DCGAN to StyleGANLosses, DCGAN code, Pix2Pix, CycleGAN and StyleGAN. Defaults, failure signatures and fixes.Concepts31 rows · 2 diagrams
  5. Multimodal and Vision-Native RAGEmbed page images, score with MaxSim, fuse modalities, cite evidence regions. Python and TypeScript from the lessons.Commands and APIs38 rows · 2 diagrams
  6. OCR and Document UnderstandingTrain CTC OCR, pick a document stack, retrieve pages with MaxSim and approve fields against exact source spans.Commands and APIs27 rows · 2 diagrams
  7. Open VLM Families: LLaVA, Qwen-VL, InternVLLLaVA, LLaVA-OneVision, Qwen-VL and InternVL3 side by side: connector, resolution, video, tokens and training.Comparisons34 rows · 2 diagrams
  8. Unified Multimodal ModelsPick a unified design. Discrete NTP, two-loss diffusion, masked diffusion, decoupled encoders, next-scale, any-to-any.Comparisons31 rows · 2 diagrams
  9. Video-Language Models and Long VideoSample frames, budget tokens, encode time, ground events and index long video with timestamped answers.Concepts42 rows · 2 diagrams
  10. Vision Transformers and Patch TokensPatchify, embed, add CLS and position, run pre-LN blocks. Token counts, parameter math and any-resolution packing.Concepts35 rows · 2 diagrams
  11. Vision-Language Model ArchitecturesViT, bridge, LLM. Projector, Q-Former, Perceiver, gated cross-attention, training stages and recipe numbers.Concepts21 rows · 2 diagrams

RL, safety and alignment 9

  1. AI Safety and Red TeamingName the attack, detect it, measure refusals, gate the output and audit alignment. Phase 18 and 19 lessons.Debugging30 rows · 2 diagrams
  2. Alignment Training: Instructions, DPO Family, RLAIFPick and tune RLHF, DPO, IPO, KTO, SimPO, ORPO, BPO and Constitutional AI. Losses, defaults and failures.Comparisons38 rows · 2 diagrams
  3. Bias, Fairness and Differential PrivacyMeasure bias, pick a fairness criterion, train with DP-SGD and audit the privacy claim. Stdlib Python toys.Concepts26 rows · 2 diagrams
  4. Cards, Provenance, Regulation and WelfareEU AI Act dates, four regimes, three cards, AB 2013 fields, welfare EV and the external evaluators.Concepts29 rows · 2 diagrams
  5. Mesa-Optimizers, Scheming and AI ControlTerms, evidence, numbers, toy code and control protocols for deceptive alignment. Phase 18 lessons 6 to 10.Concepts32 rows · 2 diagrams
  6. Multi-Agent RL and Sim-to-RealCTDE, value decomposition, self-play, domain randomization and VLA action formats. Formulas, numbers and fixes.Concepts36 rows · 2 diagrams
  7. Prompt Injection Incidents and AI CVEsFind, trace and block indirect prompt injection. EchoLeak chain, PVE validator, rule detector, tool call firewall.Debugging37 rows · 2 diagrams
  8. Reinforcement LearningMDPs, value methods, policy gradients, PPO, RLHF and GRPO. Formulas, update lines and diagnostics from Phase 9.Concepts32 rows · 2 diagrams
  9. Value Methods against Policy MethodsQ-learning, SARSA, DQN, REINFORCE, A2C and PPO side by side. Targets, defaults, diagnostics and fixes.Comparisons31 rows · 2 diagrams

LLM engineering 4

  1. Agent State Machines and Durable GraphsState, nodes, edges, reducers, checkpoints, interrupts and leased job recovery. LangGraph and a Go job queue.Concepts34 rows · 4 diagrams
  2. Guardrails, Moderation and RedactionCheck input and output, route classifier verdicts, redact spans and gate tool calls. Python and Rust from the lessons.Commands and APIs38 rows · 3 diagrams
  3. Prompt EngineeringWrite the prompt, add examples and reasoning, vote, and budget the context window. Python from the lessons.Concepts32 rows · 2 diagrams
  4. Shipping a Production LLM AppRequest pipeline, retries, fallback chains, SSE streams, resume, demo limits and a fallback gateway.Commands and APIs43 rows · 2 diagrams

Tools and protocols 10

  1. Agent Skills: Discovery, Invocation, RoutingWrite, install, discover, invoke and route SKILL.md packages. Validators, catalogs, router and installer projects.Commands and APIs35 rows · 1 diagram
  2. Binary Analysis Tools from ScratchRead ELF and Mach-O, decode x86-64, build the CFG, lift to C and prove it. Python stdlib only.Commands and APIs47 rows · 2 diagrams
  3. Building an MCP ServerValidate, dispatch, wrap and cache a stateless MCP 2026-07-28 server. Tools, resources, prompts, policy.Commands and APIs35 rows · 2 diagrams
  4. MCP Clients and TransportsProbe, merge and route MCP 2026-07-28 peers over stdio and Streamable HTTP. Retry MRTR rounds. Frame JSON-RPC.Commands and APIs43 rows · 3 diagrams
  5. MCP Gateways, Registries and ConformanceRoute through a stateless gateway, admit registry versions, catch drift, test the wire and gate releases.Commands and APIs34 rows · 2 diagrams
  6. MCP Security and AuthorizationFind and fix token refusals, poisoned tool metadata and injected content. CIMD, PKCE, iss, audience and PVE checks.Debugging30 rows · 2 diagrams
  7. MCP Tasks, Elicitation and AppsExplicit scope, MRTR elicitation, durable Tasks, Apps UI resources and safe cancellation on MCP 2026-07-28.Concepts29 rows · 2 diagrams
  8. Model Context Protocol (MCP)Build, call and serve stateless MCP 2026-07-28 servers over stdio and Streamable HTTP.Commands and APIs32 rows · 2 diagrams
  9. Skill Permissions, Evals and Supply ChainReview skill actions before they run, isolate them, gate each release by eval layer and scan bundles.Debugging34 rows · 2 diagrams
  10. Tool Calling and Structured OutputsDeclare tools, read calls, return results, run calls in parallel, stream arguments, and force JSON that validates.Commands and APIs29 rows · 2 diagrams

Agents and autonomy 26

  1. A2A and Agent Communication ProtocolsMCP, A2A, ACP, ANP and FIPA-ACL side by side. Agent Cards, tasks, wire names and failures. A2A 1.0.1.Comparisons35 rows · 2 diagrams
  2. Agent Benchmarks: SWE-bench to OSWorldPick the benchmark, gate on the right tests, check contamination and compare runs on equal denominators.Comparisons34 rows · 2 diagrams
  3. Agent Frameworks ComparedPick LangGraph, CrewAI, AutoGen, Agno, Mastra, an agent SDK or plain Python by problem shape, state and routing cost.Comparisons39 rows · 2 diagrams
  4. Agent Harness EngineeringThe code around the model. Loop contract, hooks, budgets, tools, gates, sandbox, traces and workbench files.Concepts33 rows · 2 diagrams
  5. Agent Planning: Workflows, HTN, Plan-ExecutePick a workflow, an HTN or evolutionary planner, or a replanning executor. Stdlib Python from the lessons.Concepts29 rows · 2 diagrams
  6. Agent Tool Use and Skill LibrariesDefine, validate, dispatch and secure tool calls. Store skills as code, retrieve, compose and refine them.Concepts25 rows · 2 diagrams
  7. Autonomous Agents and PermissionsRun an agent unattended with limits. Permission modes, budgets, kill switches, durable execution, approvals, rollback.Concepts24 rows · 2 diagrams
  8. Constitutional AI and Input/Output ClassifiersCritique-and-revise training, tier resolution, input and output rails, their bypasses, and a YAML rules engine.Concepts30 rows · 2 diagrams
  9. Context Engineering and Agent MemoryBudget the window, order the context, page memory in and out, fuse memory stores and persist agent state.Concepts45 rows · 2 diagrams
  10. Debate, Roles and Review PanelsRun N agents for R rounds, split work into planner, executor, critic and verifier, and gate reviews with a quorum.Concepts37 rows · 2 diagrams
  11. Delegation, Isolation and Feedback RatchetsPlan from evidence, split work by exclusive ownership, and promote each correction to the earliest owning layer.Concepts36 rows · 2 diagrams
  12. Eval-Driven Agent DevelopmentRun eval cases, gate merges, review with a rubric, and gate prompt and report changes. Python stdlib.Commands and APIs44 rows · 2 diagrams
  13. Frontier Safety Frameworks and External EvalsRSP v3.0, PF v2 and FSF v3 side by side, plus METR horizons, WMDP, CAIS, CAISI and the 2025 dual-use evidence.Comparisons41 rows · 1 diagram
  14. Multi-Agent Case Studies and Eval FarmsThree 2026 reference systems, the software team capstone, and a fenced, resumable eval farm in Go.Concepts38 rows · 2 diagrams
  15. Multi-Agent SystemsAgents, handoffs, shared state and orchestrators. Pick a pattern, vote, checkpoint and fix the known failures.Concepts31 rows · 2 diagrams
  16. Negotiation, Simulation and Agent EconomiesContract Net, OG-Narrator bargaining, Smallville memory, Theory of Mind tests, Shapley credit and second-price auctions.Concepts27 rows · 2 diagrams
  17. OpenTelemetry GenAI and Agent ObservabilityEmit gen_ai.* spans, sample traces, export metrics, pick a platform and debug a trace. Stdlib code from the lessons.Commands and APIs33 rows · 2 diagrams
  18. Orchestration Patterns ComparedPick supervisor, swarm, hierarchical, debate or a plain workflow. Stdlib Python from the lessons.Comparisons33 rows · 2 diagrams
  19. Outcomes, Workflows, Risks and SpecsFrame the outcome, ground the workflow, rank assumptions, pick a slice, write the spec, set metrics, choose a stage.Concepts28 rows · 2 diagrams
  20. Production Agent Runtimes and QueuesPick a runtime shape, checkpoint and replay, lease and fence jobs, retry scoped reads. Python and Go.Commands and APIs28 rows · 2 diagrams
  21. ReAct, ReWOO, Reflexion and Tree of ThoughtsPick, build and stop an agent reasoning loop. ReAct, ReWOO, Reflexion, ToT, LATS, Self-Refine, CRITIC and CoT.Comparisons32 rows · 4 diagrams
  22. Repo Memory, Init Scripts and HandoffsFrame the task, keep state in schema-checked files, probe before start, and end each session with a handoff packet.Commands and APIs30 rows · 1 diagram
  23. Self-Improving and Research AgentsGenerator plus evaluator loops, self-editing agents, research loops, RSI gaps and the controls for each.Concepts21 rows · 2 diagrams
  24. Self-Taught Reasoning and Self-ImprovementGenerate, grade, keep, retrain. STaR, GRPO, AlphaEvolve and DGM loops, their numbers, and the evaluator traps.Concepts31 rows · 2 diagrams
  25. Swarm Optimization and MARL for AgentsPSO and ACO for prompts and routing, queue swarms, and MADDPG, QMIX, MAPPO and self-play set side by side.Comparisons47 rows · 1 diagram
  26. Why Agents FailName the failure, find it in the trace, gate it. Detectors, MAST, retry storms, PVE and a trace debugger.Debugging42 rows · 2 diagrams

Production and infrastructure 12

  1. Async, Hogwild and Disaggregated InferenceShare, split, route and offload the KV cache. Formulas, crossover numbers and the cases where each method loses.Concepts28 rows · 2 diagrams
  2. GPU Autoscaling on KubernetesNodes with Karpenter, gangs with KAI Scheduler, replicas on queue depth, cache-aware routing, event storyboards.Commands and APIs36 rows · 3 diagrams
  3. Inference Metrics and Load TestingFind why a load test lies. TTFT, TPOT, goodput, P99, realistic prompts, retry storms and hedged reads.Debugging31 rows · 1 diagram
  4. Inference Optimization: KV Cache, Quantization, BatchingKV cache, quantization, batching and speculation. Formulas, scheduler numbers and the mistakes that cost latency.Concepts20 rows · 2 diagrams
  5. LLM Cost, Caching and Batch APIsPrice each call, cache prefixes and meanings, batch offline work and cap spend. Python and Rust from the lessons.Commands and APIs33 rows · 2 diagrams
  6. LLM Routing and AI Gateways ComparedPick a gateway, set aliases and fallback chains, route cheap or frontier, and hedge slow safe reads.Comparisons42 rows · 2 diagrams
  7. Managed Platforms and Self-Hosting ComparedPick a hyperscaler, an inference platform or a self-hosted engine. Price it, size it, cut cold starts.Comparisons36 rows · 1 diagram
  8. Quantization Formats ComparedPick a weight format by hardware, engine and workload. Bits, memory, commands and the traps that cost accuracy.Comparisons31 rows · 2 diagrams
  9. Secrets, Audit Logs and ComplianceVault-backed keys, PII scrubbing, audit logs, signed webhooks, framework controls and AI law dates.Commands and APIs35 rows · 2 diagrams
  10. Serving Engines ComparedvLLM, SGLang, TRT-LLM and llama.cpp side by side. Schedulers, KV reuse, precision, offload and the pick.Comparisons29 rows · 2 diagrams
  11. Shadow, Canary and A/B Tests for LLMsShadow runs, canary gates, fast rollback, sequential A/B tests, chaos guards and config drift reports.Commands and APIs36 rows · 2 diagrams
  12. SRE, Incidents and Postmortems for AITriage LLM incidents with agents, gate every fix, write evidence-bound postmortems and compact logs for an assistant.Debugging39 rows · 2 diagrams

Capstones 12

  1. Build a VLM from ScratchPatch embed, ViT encoder, MLP projector, cross-attention decoder, InfoNCE plus LM pretraining, R@K, EM and BLEU-4.Commands and APIs35 rows · 2 diagrams
  2. Coding Agents: Landscape and CapstonesPick a scaffold, set the budgets and gates, run the capstone agents and the three coding-agent projects.Comparisons49 rows · 1 diagram
  3. DDP, FSDP, ZeRO and Pipeline ParallelPick a parallelism, size the memory, wire the collectives and fix the hangs. PyTorch gloo on CPU.Comparisons49 rows · 1 diagram
  4. End-to-End LLM and Fine-Tuning PipelinePlan, run and gate a hashed stage DAG. Head swap, SFT loss mask and DPO loss from the capstones, with defaults.Commands and APIs42 rows · 2 diagrams
  5. Evaluating LLMsSpecify tasks, score them, judge with a rubric, calibrate, rank with intervals and test long context.Commands and APIs35 rows · 2 diagrams
  6. Paper Writer, Critic and IterationSchedule experiments with UCB, iterate a draft with a five-score critic, and emit LaTeX, BibTeX and a manifest.Commands and APIs26 rows · 2 diagrams
  7. Pre-Training Data PipelinesClean, dedup, download, tokenize, shard and window a pretraining corpus. Python from the lessons.Commands and APIs30 rows · 3 diagrams
  8. Production RAG Chatbots and FreshnessFilter, fuse, cache, guard and cite. Keep the index fresh and grade every ranking change.Commands and APIs38 rows · 2 diagrams
  9. Research Agent Pipeline from ScratchGenerate hypotheses, retrieve papers, run sandboxed experiments, judge results, and publish a cited report.Commands and APIs40 rows · 2 diagrams
  10. Retrieval-Augmented Generation (RAG)Chunk, index, retrieve, fuse, rerank, generate with citations and grade each stage. Python from the lessons.Commands and APIs32 rows · 2 diagrams
  11. Train and Load a GPT from ScratchBuild the 124M GPT, train it with AdamW and cosine warmup, load GPT-2 weights, gate the pipeline.Commands and APIs38 rows · 2 diagrams
  12. Training Memory, Accumulation and CheckpointsFix NaN steps, memory limits, accumulation scale and broken resumes. Clip, AMP, recompute, atomic checkpoints.Debugging36 rows · 2 diagrams

Manuals 6

  1. A2A ProtocolCards, messages, tasks, states, the three bindings, errors and the 0.3 layer of A2A 1.0.1. Facts from the manual.Manuals25 rows · 2 diagrams
  2. Docker Sandboxes for AgentsRun an agent in a microVM, control its network and keys, get its commits back. sbx 0.47.0, docker-agent 1.149.0.Manuals35 rows · 2 diagrams
  3. LLM Serving with SGLangStart, size, measure and fix an SGLang server. SGLang 0.5.22.Manuals26 rows · 2 diagrams
  4. LLM Serving with vLLMInstall, start, size, tune and debug a vLLM 0.31.0 server. Flags, defaults, metrics and known failures.Manuals22 rows · 2 diagrams
  5. Reverse Engineering with rearea 6.7.0 with Ghidra 12.1.4: inspect binaries, read Evidence records and compare bundles.Manuals21 rows · 2 diagrams
  6. RL Post-Training with MilesRun GRPO on one GPU, watch the run, stop a dead engine and fix the common failures.Manuals26 rows · 2 diagrams

Projects 8

  1. AI Tutors and Learning ToolsTrace mastery, ground every card in a source, plan paths and materials, and suggest words from your own corpus.Projects38 rows · 2 diagrams
  2. Data Quality and Dataset GatesLoad and split data with a seed, repair CSV cells, gate rows on a contract, audit leaks and rehearse migrations.Projects43 rows · 2 diagrams
  3. Decision, Change and Tutorial ToolsFour evidence tools. Score options, brief page changes, check API tutorials and compare local model runs.Projects28 rows · 2 diagrams
  4. Diagram, Chart and Infrastructure ExplainersFour local explainer projects. Run them, feed them, read their outputs and fix their errors.Projects33 rows · 2 diagrams
  5. Localization and Glossary ToolsRun, feed and check three review-first localization projects. Pick a multilingual model and a source language.Projects39 rows · 2 diagrams
  6. Personal Organizer AgentsFive local organizer projects. What each builds, how to run it, its inputs, outputs, review files and checks.Projects36 rows · 2 diagrams
  7. Sandbox Policy LadderPick the least costly isolation profile, refuse bad calls in a runner, and set sbx network, secret and safety policy.Projects38 rows · 2 diagrams
  8. Text Workflow DesksTriage email, extract actions, rewrite prose, group feedback and write changelogs. Every output waits for review.Projects36 rows · 2 diagrams

By phase

How to use them