TensoriumInterview preparation
← Home

Core concepts · 62 topics

A guided path through the ideas behind modern LLMs.

Read the stages in order: how text becomes a prediction, what happens inside the Transformer block, how a model learns, then serving, scale, and post-training. Every topic names what to know first, then gives the intuition, the math with concrete numbers, the common misconception, and a self-check. Already comfortable with the basics? Switch to By area and jump straight to a topic.

New to machine learning? Start here instead.

These topics work best as a refresher; they assume ideas like probability and loss. Begin with three short beginner lessons (tokens, embeddings, next-token prediction), then the visual walkthrough for attention and the Transformer.

Finish line: You can explain how text becomes a prediction and what training does to improve that prediction.

Topic 42 of 62 · Training at scale

Checkpointing and failures at scale

Medium

How often should a large run checkpoint, what must be saved, and how do you recover from failures and loss spikes?

Why this mattersOn thousand-GPU jobs, hardware failures and loss spikes are routine; recovering cleanly requires saving full optimizer and dataloader state on a principled interval.

1 · Start with the intuition

With thousands of GPUs, something fails often, so failures are part of normal operation. Each failure loses the work since the last checkpoint; each checkpoint costs time. The best interval balances the two. A checkpoint is only useful if it restores the exact training state, not just the weights.

2 · How the mechanism works

Mechanism step 1 of 3 · no question to answer

Estimate failure rate

Cluster MTBF ≈ per-node MTBF / number of nodes.

Next, we will look at: Choose an interval. Move on when this operation makes sense.

Visualizing the behavior

Overhead vs checkpoint interval (C = 2 min, MTBF = 480 min)

Derived
05101520020446090120checkpoint interval τ (minutes)overhead (%)τ ≈ 44 min · 9.1%
  • C/τ + τ/(2M)
Too frequent wastes time writing; too rare loses more work per failure. The flat bottom means precision matters less than cutting C itself.