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 47 of 62 · Post-training

GRPO: group-relative advantages

Hard

How does GRPO estimate advantages without a critic, and what does it give up?

Why this mattersGRPO replaces PPO’s learned value model with the mean and standard deviation of a group of rollouts for the same prompt—cutting memory for reasoning RL.

1 · Start with the intuition

Sample several completions for the same prompt and grade them against each other. Because every completion shares a prompt, the group’s average reward is a natural baseline. No value model is needed.

2 · How the mechanism works

Mechanism step 1 of 3 · no question to answer

Sample a group

Draw G completions o₁ … o_G for one prompt q.

Next, we will look at: Standardize rewards. Move on when this operation makes sense.

Visualizing the behavior

Where this sits: the RL-for-LLMs progression

VPGΨ = returnREINFORCER − baselineActor-criticlearned V(s)PPOclipped ratioGRPOgroup baselineVariantsDAPO · Dr. GRPO
Each step changes one thing: how Ψ (the weight on ∇ log π) is estimated, or how far one batch of samples may move the policy.

GRPO: the group replaces the value model

Prompt qPolicytrainedG completionso₁ … o_GRewardverifier or RMGroup norm(r − μ) / σReferencefrozen · KL
Compared with the PPO pipeline, the value model and GAE are gone. The baseline comes from sibling completions of the same prompt.

Group-standardized advantages, G = 4

Derived
Rewards [1, 0, 0, 1]
✓Â = +1✗Â = −1✗Â = −1✓Â = +1
Rewards [1, 0, 0, 0]
✓Â ≈ +1.73✗Â ≈ −0.58✗Â ≈ −0.58✗Â ≈ −0.58
Rewards [1, 1, 1, 1]
✓Â = 0✓Â = 0✓Â = 0✓Â = 0
A rare success is amplified. A group with identical rewards carries no policy-gradient signal at all, however much it cost to generate.