Plasm labs

Plasm labs

Play first. Words second.

start →P1 · tensors
10units
38lectures
38live

P · Prerequisite — the vectors chapter

CPU. No GPU. Block the rest until this is done.
  1. 01Tensors are the vectorsDrag two arrows. The rest of the course is this, with a shape.ready
  2. 02Matmul is the forceC = AB. Hover a cell. ~90% of GPU arithmetic.ready
  3. 03Softmax and cross-entropyLogits → distribution. Loss is surprise at the true id.ready
  4. 04Autograd — the chain ruleGreen forward. Amber back. One hop per node.ready
  5. 05Gradient descentClick the map. Batch is smooth. SGD jitters. η is the game.ready
  6. 06Bytes become idsBPE is compression. English vs Go vs YAML.ready
  7. 07A tiny net that actually fitsWatch the boundary curl. Turn the hidden layer off — it fails.ready
  8. 08Chat is a format, not an architectureRoles are tokens. Break the tags and the voice leaks.ready

D · Deep nets (refresh)

Refresh. Same sliders, shorter copy.
  1. 01The neuronDashed line, solid bend. Switch tanh / ReLU / sigmoid.ready
  2. 02BackpropPress backward. Watch ∂L hop left.ready
  3. 03SGD, momentum, AdamSame saddle. Three paths. β→0 makes momentum = SGD.ready
  4. 04ConvolutionsHover a pixel. One kernel, every place.ready
  5. 05Sequences and vanishing gradientsg₀/g_T → 0 unless a gate holds ≈ 1.ready

0 · The rail

One request left to right. Four loops underneath.
  1. 01The decoder stackids → embed → N×(attn, FFN) → head → sample.ready
  2. 02Four loops: train, align, serve, evalA bad metric names a loop. It does not mean “bigger model.”ready
  3. 03Prefill vs decodeCompute-bound then HBM-bound. Same weights, two machines.ready

1 · Architectures — common core, different bets

Mixer and capacity. Not a new kind of thought.
  1. 01AttentionTokens mix. QKᵀV. Causal mask.ready
  2. 02GQA and MLA — shrinking KVDecode is a memory problem. Fewer KV, or a latent.ready
  3. 03MoE — 384 exist, 8 fireVRAM follows total params. FLOPs follow active.ready
  4. 04RoPE, RMSNorm, SwiGLUThe 2024–26 decoder defaults.ready

2 · One question → next token

There is no lookup. There is P(next id | past).
  1. 01BPE on real stringsEnglish vs Go vs YAML. Bytes per token.ready
  2. 02SamplingT flattens. top-p cuts the tail. Dice, not weights.ready

3 · Train a model you own

Rung 0. MFU is the honest train meter.
  1. 01nanoGPTThe training loop and estimate_mfu.ready
  2. 02FlashAttentionMore arithmetic, faster — attention was HBM-bound.ready
  3. 03Scaling lawsSlide C. ★ is the knee. Right of ★ = undertrained.ready

4 · Fine-tune

LoRA on 8B first. K2 later if 8B moves the eval.
  1. 01LoRA / QLoRAFrozen W. Train A,B. Rank is the budget.ready
  2. 02SFT and DPOFormat, then preference. Not more pretrain.ready
  3. 03GRPO / RLVRGroup-relative advantages. Verifiable reward.ready

5 · Serve and the GPU lie

The company. Same 8B, two meters.
  1. 01vLLM: batch, pages, TTFTKV pool occupancy is not nvidia-smi VRAM.ready
  2. 02The lie100% util, 3% of peak. GEMM vs decode.ready
  3. 03RooflineTwo ceilings. Intensity picks which.ready

6 · Giant MoE (8×H100)

Only after 4–5. Stop the node when done.
  1. 01Load K2 / V3-classINT4, TP=8. Smoke one completion.ready
  2. 02Expert loadHistogram of routed experts. Collapse is a bug.ready
  3. 03Pipeline bubble & all-reduceIdle at 100%. The wire is the step.ready

7 · Product and future

Agents, RAG, test-time compute — same rail, outer loop.
  1. 01RAGThe GPU bill is the long context, not HNSW.ready
  2. 02Tools and the request lifecycleModel emits a call; the client runs it.ready
  3. 03Speculative decode / test-time computeQuality from extra decode, not extra pretrain.ready
  4. 04Model APIsFour providers, one shape. Harness on top.ready