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 40 of 62 · Training at scale

Choosing TP, PP and DP for a large run

Hard

Given a 70B model and 1,024 GPUs, how do you choose tensor, pipeline and data parallel degrees?

Why this mattersCombining TP inside a node, PP across nodes, and ZeRO-sharded DP across replicas is how frontier clusters fit 70B+ runs into memory at high MFU.

1 · Start with the intuition

Start from memory: the model state must fit. Then map each kind of parallelism to the network it tolerates. Tensor parallelism is communication-heavy, so it goes inside a node. Pipeline parallelism sends little data but creates idle bubbles, so it spans nodes when the model still does not fit. Data parallelism, with sharded optimizer state, fills the remaining GPUs to raise throughput.

2 · How the mechanism works

Mechanism step 1 of 3 · no question to answer

Fit memory

Count bytes per parameter for weights, gradients and optimizer states, plus activations.

Next, we will look at: Place TP, then PP. Move on when this operation makes sense.

Visualizing the behavior

Model-state memory per GPU for 70B (excludes activations)

Derived
DP only (replicated)
1,120 GB
TP 8
140 GB
TP 8 × PP 8
17.5 GB
TP 8 × PP 8 + ZeRO-1 over DP 16
≈ 5.2 GB
Log scale. Replicated state cannot fit on any single GPU. After model parallelism and optimizer sharding, activations, not parameters, usually decide the micro-batch size.