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 26 of 62 · Generalizing and measuring it

Transformer regularizers: what to apply where

Medium

How do weight decay, dropout, label smoothing, and KL regularization differ, and which does my Transformer actually need?

Practice choosing loss functions · 10 scenarios ↓

1 · Start with the intuition

Start by naming the problem. Are weights growing, is a small fine-tuning dataset being memorized, are predictions overconfident, or is a post-trained policy drifting too far from a reference? These are different symptoms. A regularizer is an intervention with a cost, not a checklist item to turn on everywhere.

2 · How the mechanism works

Mechanism step 1 of 3 · no question to answer

Choose the base task loss

Token CE for language modeling; categorical CE or BCE for task heads; InfoNCE for retrieval; regression loss for continuous targets. The Transformer architecture alone does not determine the objective.

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

Visualizing the behavior

Dropout p=0.2: one coordinate’s possible values

Derived

Input activation h=10

Dropped (20%)
0
Kept (80%)
12.5
Expected value
10
Eval output
10
These bars show activation magnitudes, not event probabilities. Inverted dropout preserves expectation, not each individual realization.