Current session · Module 01

Learn it here.
Prove it to yourself.

Read the lesson, work one exercise, explain it in your own words, and return for two short recall checks. AI chat is optional. Your answers stay in this browser.

01 / Foundations

Functions, data, and parameters

A model is a function whose adjustable parameters are learned from examples.

A function maps an input to an output. In y = mx + b, x is the input and the predicted y is the output.

The examples stay fixed while fitting. The parameters m and b change because they control the function's behavior.

Learning means choosing parameter values that make predictions agree with the observed targets. The same distinction scales from a two-parameter line to a transformer with billions of parameters.

Worked example

Suppose y = 2x + 1. For x = 3, the prediction is 7. The input x and observed target come from the example; m = 2 and b = 1 are parameters. Changing b shifts every prediction equally. Changingm changes how strongly the prediction responds to x.

Read the complete lesson

Your exercise

Functions, data, and parameters

y = mx + b

(0,1) · (1,3) · (2,5) · (3,7) · (4,9)

For (x, y) = (0,1), (1,3), (2,5), (3,7), (4,9), choose m and b for y = mx + b. Show all five predictions and label inputs, targets, parameters, and predictions.

Check the worked answer after trying

m = 2 and b = 1.

Predictions: x=0 → 1; x=1 → 3; x=2 → 5; x=3 → 7; x=4 → 9. The x values are inputs, the listed y values are targets, m and b are adjustable parameters, and the values produced by the equation are predictions.

Your explanation

Explain the idea in your own words.

Explain which quantities stay fixed during fitting, which change, and how parameters differ from inputs. Then connect one quantity to the repository.

Immediate self-review

Can you clear the gate?

Explain a parameter without LLM jargon and predict the effect of changing m versus b on a new input.

This is self-assessed. Record what is true today; both delayed checks are still required before the module becomes verified.

Delayed recall

Return without rereading.

Due reviews unlock on their date. Write the answer before checking your notes.

Loading recall schedule…

Evidence

Checkpoint history

Loading checkpoints…

Public course · indexable

Browse the complete learning spine

10 modules · choose any module as your current session
01

Functions, data, and parameters

A model is a function whose adjustable parameters are learned from examples.

A function maps an input to an output. In y = mx + b, x is the input and the predicted y is the output.

The examples stay fixed while fitting. The parameters m and b change because they control the function's behavior.

Learning means choosing parameter values that make predictions agree with the observed targets. The same distinction scales from a two-parameter line to a transformer with billions of parameters.

Exercise: For (x, y) = (0,1), (1,3), (2,5), (3,7), (4,9), choose m and b for y = mx + b. Show all five predictions and label inputs, targets, parameters, and predictions.

Mastery gate: Explain a parameter without LLM jargon and predict the effect of changing m versus b on a new input.

Read the complete lesson →
02

Loss and gradient descent

Loss measures error; gradients indicate how parameter changes affect it.

A loss function compresses many prediction errors into one number that can guide training.

A gradient is a local slope. Gradient descent moves parameters against that slope, scaled by the learning rate.

Exercise: Compute MSE for two line fits, then take one gradient-descent step by hand.

Mastery gate: Predict the symptoms of a learning rate that is too high or too low.

Read the complete lesson →
03

Vectors, matrices, and tensors

Neural networks organize multiply-and-add operations over arrays with explicit shapes.

Vectors hold features, matrices transform them, and tensors generalize these arrays to more axes.

Shape annotations expose which dimensions represent batch, sequence, embedding, heads, and vocabulary.

Exercise: Trace the shapes through one linear layer and diagnose one deliberately mismatched axis.

Mastery gate: Read a shape error and identify which axis is wrong.

Read the complete lesson →
04

Non-linear networks and backpropagation

Activations make depth expressive; backpropagation assigns credit through the computation graph.

Stacking only linear transformations still produces one linear transformation. Non-linear activations let networks fit curved decision boundaries.

Backpropagation applies the chain rule from the loss back to every parameter that influenced it.

Exercise: Inspect or train a two-layer MLP on a non-linear toy dataset and explain the gradient path.

Mastery gate: Explain why an activation enables behavior that stacked linear layers cannot.

Read the complete lesson →
05

ML paradigms and scaling

Pretraining, supervision, preferences, reinforcement, and scaling solve different problems.

Self-supervision builds broad predictive capability; supervised and preference methods shape behavior for particular tasks.

More scale can add capacity and knowledge, but cannot repair invalid data or an unreliable evaluation ruler.

Exercise: Classify retained posttrainllm attempts by learning paradigm and name the signal each used.

Mastery gate: Explain why scale cannot rescue a broken evaluation or contaminated dataset.

Read the complete lesson →
06

Tokenization, embeddings, and language modeling

Text becomes token IDs, embeddings, contextual states, and next-token probabilities.

A tokenizer chooses the discrete units a model sees. Embeddings map each token ID into a learned vector.

A causal language model learns to predict the next token from the tokens before it.

Exercise: Tokenize three prompts and inspect how punctuation and identifiers split.

Mastery gate: Explain how tokenization can affect SQL and tool-call reliability.

Read the complete lesson →
07

Attention and transformer blocks

Attention routes information between positions; repeated blocks refine contextual representations.

Queries express what a position seeks, keys describe what positions offer, and values carry the information to combine.

A transformer block combines attention, an MLP, normalization, residual paths, and positional information.

Exercise: Work one tiny query/key/value attention calculation with explicit shapes.

Mastery gate: Describe what attention can copy or route that a position-wise MLP cannot.

Read the complete lesson →
08

Training mechanics

Batches, optimizers, schedules, precision, and correctness gates determine whether training works.

A loss curve only becomes useful when paired with data checks, held-out behavior, gradient health, and reproducible settings.

Tiny-overfit is the first gate: if a model cannot memorize a tiny repeated set, scaling the run hides the bug rather than fixing it.

Exercise: Inspect a tiny-overfit run and diagnose data, learning-rate, capacity, and precision failures separately.

Mastery gate: Distinguish a data bug, optimization bug, and capacity limit from their symptoms.

Read the complete lesson →
09

SFT, LoRA, and preference tuning

Post-training changes behavior using labeled demonstrations, compact updates, or preferences.

SFT imitates desired outputs. LoRA learns a low-rank update while keeping the base weights frozen.

Preference methods compare better and worse responses; weak pair construction or missing reference control can collapse useful behavior.

Exercise: Compare the successful SQL SFT run with the failed hygiene preference run and isolate the changed variables.

Mastery gate: Design a bounded recipe with data, target, regression slices, budget, and stop rule.

Read the complete lesson →
10

Evals, rewards, and self-improvement

A frozen ruler, verifiable feedback, and retained failures make improvement measurable.

An evaluation must first pass a frontier-ceiling check: if a capable model cannot satisfy the ruler, the ruler is measuring noise.

Held-out data, regression slices, provenance, and cost measurements turn a score into a decision.

Exercise: Draft a target, frozen baseline, held-out gate, regressions, resource budget, and ship/retry/reject rule.

Mastery gate: Reject an attractive score when its ruler, holdout, provenance, or regression gate is invalid.

Read the complete lesson →
Applied reading

Open the industry case studies

5 cases · each turned into a practical exercise

Savante / Aryabhata: specialist data and evaluation

Study how curated domain data, filtered reasoning traces, SFT, and verifiable-reward RL combine in a JEE mathematics specialist. The published result does not isolate the contribution of each stage.

Exercise: Write a recipe teardown separating initialization, data, filtering, SFT, reward, evaluation, missing ablations, and leakage boundaries.

Open the case study and sources →

Bonsai 2 27B: capability retained per deployment cost

Distinguish ternary representation, packed artifact size, peak runtime memory, kernel support, latency, and capability retention relative to the source model.

Exercise: Draft a same-Mac comparison sheet covering exact revisions, task gates, peak RAM, TTFT, prefill, decode throughput, and total task latency.

Open the case study and sources →

QORL: parameter-aware query optimization

Compare native PostgreSQL planning, structured hint search, and LLM proposals under equal budgets, then evaluate a parameter-to-plan dispatcher on fresh held-out measurements.

Exercise: Freeze parameter splits, cache policy, timeouts, SQL-equivalence checks, unfamiliar-case fallback, routing overhead, and tuning-cost break-even.

Open the retained PRD and sources →

Inside vLLM: inference systems and scaling boundaries

Trace admission, scheduling, paged KV allocation, prefill, decode, batching, caching, and the boundary from one device to distributed serving.

Exercise: Hand-simulate three requests under fixed token and KV-block budgets, then predict effects on TTFT, inter-token latency, throughput, and memory.

Open the article study guide →

Splash: model-specific Mac inference

Study how shape-specific Metal kernels, a model-specific speculative draft, packed weights, cache reuse, and a startup memory plan trade generic model support for Mac-local serving performance.

Exercise: Design a same-Mac comparison with a general engine covering cold and cached TTFT, prefill, decode, concurrency, memory, output validity, task completion, and per-model tuning cost.

Open the launch analysis and source guide →