Skip to main content
All levels

Level 6: Advanced AI — Cheat Sheet

Key takeaways and terms from all 8 lessons. Print it, pin it, revise from it.

AI-063Reasoning Models

  • Reasoning models spend inference tokens thinking before answering. Test-time compute is a scaling axis alongside model size, and RL training (not human step labels) is what made it reliable.
  • The capability jump is real but domain-specific: math, code, planning, multi-step logic; single-hop tasks see cost without benefit.
  • You pay for thinking tokens in both money and latency: a 200-token answer can hide 5,000 tokens of billed thinking, a 10× cost multiplier in the worked example above.
  • Reasoning depth is now a tunable request parameter (thinking budgets, effort levels), so design per-route, not per-model.
  • Production systems route: cheap models for most traffic, reasoning models for the hard ~5%, with explicit thinking budgets as cost guardrails.
  • Visible reasoning is evidence, not testimony; verify outputs independently on high-stakes tasks.

AI-064Mixture of Experts (MoE)

  • MoE = many small experts + a learned router; only the top-k experts run per token, and sparsity lives in the feed-forward layers where most parameters sit.
  • Total parameters set memory footprint and knowledge capacity; active parameters set per-token compute, speed, and training cost. DeepSeek-V3's 671B/37B split is the canonical example.
  • The economics favor MoE at frontier scale (~$5.6M reported pre-training compute for V3; Switch Transformer's ~7× training speedup), which is why most frontier models use it.
  • The costs move, they don't vanish: full-model memory, load-balancing to prevent routing collapse, and all-to-all serving complexity replace raw compute as the bottleneck.
  • Expert specialization is emergent and statistical (token types, syntax), not thematic, so you cannot carve out a domain-specific subset.
  • Deployment rule of thumb: single small GPU → dense; high-throughput cluster or frontier training → MoE.

AI-065Quantization & Distillation

  • Quantization = same model, fewer bits: 70B × 2 bytes = 140 GB at fp16 vs ~35 GB at 4-bit; each halving of precision moves a model down one hardware class.
  • Because LLM decoding is memory-bandwidth-bound, quantization buys speed as well as memory, roughly proportional to the byte reduction.
  • 8-bit is near-lossless, 4-bit is the practical sweet spot, 2–3 bit needs task-specific validation (and often QAT); always evaluate on your own workload.
  • Distillation = a new small student trained on a large teacher's outputs or distributions; it transfers behaviors (even reasoning, per DeepSeek-R1's distills) but never exceeds the teacher's ceiling, and API licenses may restrict it.
  • The two compose: distill to a small architecture, then quantize it. This is the standard recipe behind phone assistants and every cheap "mini" model tier.
  • Compression choices are deployment choices: budget weights *and* KV cache against memory, bandwidth against latency, and quality against your own evals.

AI-066Open vs Closed Models

  • Three tiers, not two: closed API, open-weights, truly open-source. Most "open source AI" is actually open-weights with a license you must read (Llama's 700M-MAU clause vs DeepSeek's MIT is the canonical contrast).
  • The real trade is control, privacy, permanence, and at-scale unit economics versus convenience, speed-to-market, and peak capability.
  • Cost is arithmetic, not ideology: at ~$0.0135/request vs ~$1,450/month per GPU, break-even lands around 10–30K requests/day once engineering time is honestly priced.
  • Sovereignty requirements decide first, capability evals second, economics third, ops capacity fourth: run the gates in that order.
  • The capability gap has compressed from years to months (Llama, then DeepSeek-R1's ~$590B market shock); design for portability and re-evaluate quarterly rather than betting on either side winning forever.
  • Mature systems mix both, routing by sensitivity, cost, and difficulty. The durable assets are your abstraction layer and eval suite, not any single model choice.

AI-067Synthetic Data & Training Pipelines

  • Pipeline: curate → pre-train → SFT → preference tuning → (for reasoning models) RL on verifiable tasks; each stage shapes something different: knowledge, instruction-following, judgment, reasoning.
  • The economics are wildly lopsided: pre-training consumes ~95%+ of compute (Llama 3.1 405B: ~3.8×10²⁵ FLOPs, ~30.8M H100-hours; GPT-4: reportedly >$100M), while SFT can be a ~15,000× smaller data pass, which is why later stages steer but cannot add capability.
  • Scaling laws budget the run: Chinchilla's ~20 tokens/parameter is compute-optimal, but production models deliberately overtrain because inference cost rewards smaller models trained longer.
  • Synthetic data now feeds every stage: self-instruct SFT (Alpaca's 52K examples for <$600), verified reasoning traces (R1's ~800K), textbook-style corpora (Phi), and AI-judged preferences (RLAIF).
  • Model collapse is real but managed: verification, mixing with human data, and quality filtering are the three defenses; synthetic data works exactly where verification is cheap and reliable.
  • When you need to change a model's behavior, walk up the stack: prompt/RAG, then SFT, then DPO, then RL, then switch models. Let "can I verify quality automatically?" decide whether your data is synthetic or human.

AI-068The Road to AGI

  • AGI has competing definitions; fix the definition before debating the timeline.
  • Evidence for: scaling and test-time compute keep working; benchmarks keep saturating.
  • Evidence against: hallucination, no continuous learning, weak long-horizon reliability.
  • The safety field (alignment, evals, governance) is practical engineering, not science fiction.
  • Hold a probabilistic view with error bars, and update as evidence arrives.

AI-074Voice AI & Real-Time Multimodal

  • Voice AI is multimodal AI (AI-052) constrained by a hard real-time deadline, which introduces problems text-based multimodal systems never face.
  • Speech-to-speech models process audio directly and are faster and more expressive than the older cascade of speech-to-text, LLM, and text-to-speech, but the cascade remains common for its flexibility.
  • Latency budget, turn-taking, and interruption handling are first-class architectural concerns, not afterthoughts layered onto a text-based design.
  • OpenAI's Realtime API and Google's Gemini Live represent native speech-to-speech; Deepgram and ElevenLabs are best-in-class cascade components.
  • Most production systems today are still cascades, chosen for per-stage control, even as native speech-to-speech options mature.

AI-075On-Device & Edge AI Inference

  • On-device inference is distinct from the model-compression techniques in AI-065: compression makes a model small enough to consider deploying, on-device engineering makes it actually run well on specific hardware.
  • Dedicated NPU hardware, Apple Neural Engine, Qualcomm Hexagon, Google Tensor, is what makes practical on-device inference possible at all, versus running on a general-purpose CPU.
  • Core ML, TensorFlow Lite/LiteRT, ONNX Runtime Mobile, and MLC each target different platform and model combinations, and the right choice depends on your target OS and model type.
  • Latency, privacy, offline capability, and cost at scale are the forces pulling inference to the edge; frontier-scale capability and infrequent usage pull it back to the cloud.
  • Most production features land on a hybrid architecture, not an all-or-nothing choice between on-device and cloud.

Key terms

Reasoning model
An LLM trained to generate an extended internal thinking phase (exploring, self-checking, backtracking) before producing its final answer.
Chain-of-thought (CoT)
Prompting or training a model to produce intermediate reasoning steps, which act as working memory and improve multi-step accuracy.
Test-time compute
Compute spent during inference (longer generation, multiple solution paths) rather than training. It is a scaling axis that improves reasoning tasks without changing the model.
Thinking tokens
The tokens generated during a reasoning model's thinking phase, billed like output tokens even when hidden from the end user.
Thinking budget
An API parameter capping how many tokens a model may spend reasoning before it must answer.
Self-verification
A trained reasoning behavior where the model checks its own intermediate results and backtracks from detected errors.
Hybrid routing
The production pattern of sending most traffic to fast cheap models and escalating only hard problems to reasoning models.
Mixture of Experts (MoE)
A transformer architecture where feed-forward layers are split into many small expert networks, with a router activating only a few per token.
Expert
One of the small feed-forward networks inside an MoE layer. Specialization emerges statistically during training rather than by human-defined topic.
Router (gating network)
The small learned network that scores each token and selects which top-k experts process it.
Sparse activation
Running only a small subset of a model's parameters for each input token, decoupling model size from per-token compute.
Total parameters
All weights in the model including every expert; determines memory footprint and stored knowledge.
Active parameters
The subset of weights actually used for one token; determines per-token compute cost and generation speed.
Load balancing loss
An auxiliary training objective that pushes the router to distribute tokens across experts, preventing routing collapse.
Dense model
A standard transformer where every parameter participates in processing every token.
Quantization
Compressing a model by storing weights in fewer bits (8-bit, 4-bit), shrinking memory and speeding inference with modest quality cost.
Distillation
Training a small student model to imitate a large teacher model's outputs, transferring capability into a much smaller network.
Teacher model
The large, capable model whose outputs supervise a distillation process.
Student model
The small model trained during distillation to match the teacher's behavior.
Post-training quantization (PTQ)
Quantizing an already-trained model without further training. It is the fast, common approach used by GGUF formats.
GGUF
The de facto file format for quantized models in the llama.cpp/Ollama ecosystem, offering multiple precision variants per model.
Precision (FP16/INT8/Q4)
The number of bits used to store each weight; halving bits roughly halves model memory.
Memory-bandwidth-bound
The property of LLM inference where speed is limited by how fast weights move from memory, which is why smaller quantized weights generate faster.
Open-weights model
A model whose trained weights are downloadable and self-hostable, while training data and code may remain private. This is the most common meaning of "open" in AI.
Closed model
A model accessible only through a provider's API; the weights never leave the provider's infrastructure.
Truly open-source model
A model releasing weights, training data, and training code, enabling full reproduction and auditing.
Model license
The legal terms attached to model weights; may restrict commercial use, require attribution, or prohibit training competitors on outputs.
Self-hosting
Running model weights on infrastructure you control, trading operational burden for privacy, control, and at-scale economics.
Vendor lock-in
Dependence on one provider's models or proprietary features, exposing you to their pricing, deprecation, and policy decisions.
Data sovereignty
The requirement that data stays within a jurisdiction or network boundary. It is a primary driver of open-weights adoption in regulated industries.
vLLM
A widely used open-source, high-throughput serving engine for running open-weights LLMs in production.
Pre-training
The expensive first stage where a model learns next-token prediction over trillions of tokens, acquiring its core knowledge and capabilities.
Base model
The raw output of pre-training; powerful text completion with no instruction-following behavior.
Supervised fine-tuning (SFT)
Training a base model on curated instruction→response examples so it behaves as an assistant.
Preference tuning
Optimizing a model toward responses humans (or AI judges) prefer, implemented via RLHF, DPO, and similar methods.
RLHF
Reinforcement Learning from Human Feedback, training a reward model on human comparisons, then optimizing the LLM against it.
Synthetic data
Training data generated by AI models rather than humans. It is now a primary input to frontier training at every stage.
Self-instruct
A technique where a strong model generates instruction-response pairs to fine-tune models, replacing human annotation.
Model collapse
The degradation that results from repeatedly training on unfiltered model-generated data; diversity shrinks and errors compound.
Data recipe
The deliberate mixing ratios of data sources (web, code, math, books) in a training corpus, which measurably shape model character.
RLAIF
Reinforcement Learning from AI Feedback, using AI judges instead of humans to generate preference data at scale.
AGI (Artificial General Intelligence)
AI matching or exceeding human performance across most cognitive work. It is a capability claim with several competing definitions and no agreed test.
Superintelligence (ASI)
Hypothetical AI decisively beyond the best humans in every domain; a stronger concept often conflated with AGI.
Benchmark saturation
The pattern of evaluation sets designed to challenge AI for years being solved in months, forcing ever-harder replacements.
Alignment
The research field working to ensure highly capable AI systems pursue their designers' intended goals.
Dangerous-capability evaluation
Pre-release testing of frontier models for high-risk abilities such as bioweapons uplift, cyber-offense, and autonomous replication.
Responsible scaling policy
A lab framework tying model training and release decisions to safety evaluations and capability thresholds.
Interpretability
Research into understanding what happens inside a model's weights and activations; a prerequisite for verifying advanced systems.
Timeline forecast
A probabilistic estimate of when AGI-level capability arrives. Expert estimates span years to decades with wide error bars.
Voice AI
Real-time, streaming AI interaction over spoken audio, requiring latency and turn-taking guarantees text-based multimodal AI does not. (see AI-052)
Speech-to-Speech
A native model architecture that processes audio input and produces audio output directly, without a text transcription step.
Cascade Architecture
A voice pipeline made of separate speech-to-text, LLM, and text-to-speech stages chained together.
Turn-Taking
Detecting when a speaker has finished so a voice AI system can respond without interrupting or leaving an awkward silence.
Barge-In
A user interrupting a voice AI's in-progress spoken response, requiring the system to stop and reprocess gracefully.
Voice Activity Detection
A technique for detecting when a person is actively speaking versus silent, used to drive turn-taking decisions.
Latency Budget
The maximum acceptable round-trip time, roughly 500 milliseconds for conversational voice AI, allocated across capture, network, inference, and synthesis.
Streaming Generation
Producing and playing audio output in chunks as it's generated, rather than waiting for a full response before playback starts.
Paralinguistic Information
Tone, emphasis, and emotional cues carried in speech that a text transcript discards.
Realtime API
OpenAI's WebSocket-based API for native speech-to-speech interaction, supporting streaming audio and interruption within a session.
On-Device Inference
Running a model directly on a user's hardware rather than a cloud server, subject to that device's compute, battery, and thermal limits. (see AI-065)
NPU (Neural Processing Unit)
Dedicated silicon built specifically to run neural network workloads efficiently, separate from a device's general-purpose CPU and GPU.
Apple Neural Engine
Apple's dedicated NPU, present since the A11 Bionic chip, built to run Core ML models with high throughput per watt.
Qualcomm Hexagon
Qualcomm's NPU inside Snapdragon chips, used across most Android flagship and mid-range devices.
Core ML
Apple's native framework for converting and running models on the Apple Neural Engine, GPU, or CPU with automatic hardware selection.
TensorFlow Lite / LiteRT
Google's lightweight runtime for deploying models to mobile and embedded devices, rebranded LiteRT to reflect broader framework support.
ONNX Runtime Mobile
A cross-platform runtime for running models exported to the ONNX format on mobile devices.
MLC (Machine Learning Compilation)
A compilation framework for running LLMs efficiently on-device across a wide range of hardware backends.
Thermal Throttling
A chip reducing its performance under sustained load to manage heat, which can slow on-device inference during real-world use.
Hybrid Architecture
A deployment pattern where a small on-device model handles common, latency-sensitive cases while harder requests escalate to a cloud model.

AI Learning Hub — Level 6 cheat sheet. Content created with AI assistance and reviewed by the author.