Ask what should change when the equation is manipulated, then let the visualization test that expectation.
Foundation Lab
Mixture-of-Depths
Adaptive compute: "think harder" only when needed
h^{\ell+1}_t = \text{Block}_\ell(h^\ell_t) \cdot \mathbf{1}_{t \in S_\ell} + h^\ell_t \cdot \mathbf{1}_{t \notin S_\ell}Selected Foundation Object
Keep the equation fixed; move through the evidence.
Some tokens need deep processing, others can skip layers
h^{\ell+1}_t = \text{Block}_\ell(h^\ell_t) \cdot \mathbf{1}_{t \in S_\ell} + h^\ell_t \cdot \mathbf{1}_{t \notin S_\ell}Use the runnable panel, the key equation, and canonical papers as separate forms of evidence for the same object.
The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.
Use prerequisites, dependents, and semantic links to repair the next gap without leaving the object behind.
Why It Matters for Modern Models
- Adaptive compute: "think harder" only when needed
- Like MoE but routing tokens to layers, not experts
- Predictable FLOPs budget enables efficient deployment
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Some tokens need deep processing, others can skip layers
- Router learns which tokens are "important"
- Complement to MoE: sparse width (MoE) + sparse depth (MoD)
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Route tokens to different depths. At layer , score per token:
Train with explicit compute constraint (predictable FLOPs).