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

Label smoothing: regularizing cross-entropy targets

Medium

Why smooth a one-hot label, and when should a Transformer use hard targets instead?

Practice choosing loss functions · 10 scenarios ↓

1 · Start with the intuition

A one-hot target keeps rewarding greater confidence in the observed answer. Label smoothing says: keep most of that signal, but reserve a small amount for uncertainty. It changes what distribution the model is asked to match, not the softmax temperature used at generation time.

2 · How the mechanism works

Mechanism step 1 of 3 · no question to answer

Mix the target with uniform mass

With C classes, use q=(1−ε)·one_hot(y)+ε/C. This convention includes the correct class in the uniform component.

Next, we will look at: Compute ordinary soft-target CE. Move on when this operation makes sense.

Visualizing the behavior

Same true class, less extreme supervision

Derived

Hard target

class 0
1.000
class 1
0.000
class 2
0.000
class 3
0.000

ε=0.1 uniform mixture

class 0
0.925
class 1
0.025
class 2
0.025
class 3
0.025
The correct class retains most mass. Smoothing assigns a nonzero target to every alternative, unlike a one-hot label.