Stanford Online

Hyperparameter Tuning, Scaling Laws & Debugging | Stanford CS312 Lecture 2 with Tatsunori Hashimoto: summary

YouTube summary11 sectionsWatch on YouTube ↗

This is an AI-generated summary of the YouTube video "Hyperparameter Tuning, Scaling Laws & Debugging | Stanford CS312 Lecture 2 with Tatsunori Hashimoto" (Stanford Online), made with Samuraize and published by Samuraize. It condenses the YouTube video into 11 titled sections you can read in a couple of minutes, each linking to the moment in the video it covers.

1
Filed under💻 Technology0 comments🍱 Add to trayReport
Study this

Hyperparameter Tuning, Scaling Laws & Debugging | Stanford CS312 Lecture 2 with Tatsunori Hashimoto

Stanford Online

切

Lecture goals 0:05

The lecture sets out to cover basic ideas that match the assignment. It says the class will focus on broad phenomena from papers and common practice, then ask you to test them in the toy system. The speaker warns that paper results do not always carry over cleanly, so you have to run the experiments yourself and check what actually holds.

切

Why experiments matter 1:00

The main theme is the experimental side of deep learning. The speaker contrasts it with the more theory-heavy style many computer science students know. Deep learning is described as a loop: you have an idea, write code, run it, observe what happens, and learn from the result. That loop needs fast trials, careful reading of results, and efficient experiment design because each run costs time and compute.

切

Tuning matters 13:01

Optimizer comparisons can be misleading when the baseline is left at default settings. Mars can look better than AdamW until the learning rate is retuned, and Lion can seem stronger if weight decay is chosen badly. With the right tuning, AdamW can match or beat these alternatives. The point is simple: hyperparameters are boring, but they matter a great deal in practice.

切

Search and scale 16:00

The search space is large, and some choices interact, so changing one setting can force you to change another. Good defaults make tuning possible, and many settings only need to be adjusted one at a time. The Step Fun scaling law study shows that learning rate and batch size form a mostly quadratic surface, with a clear best region that shifts as batch size, model size, and data size change. To save compute, you can batch multiple hyperparameter runs with Vmap and test smaller scales before larger ones.

切

Scaling down experiments 26:30

Running large experiments is too costly to do at full scale, so you learn by shrinking them first. The lecture points to scaling laws as the main way to do that. Biology uses the same idea with model systems like yeast and cancer cells before human trials. Machine learning is easier, because you can reduce a model layer by layer and keep a clear path from small test to the real system you care about.

切

Limits of the fit 35:00

Scaling laws often look clean, especially in pretraining, where loss can be fit as a function of data and model size. But they are engineered, not guaranteed. A small run can match the curve and still fail at the large end. The exact result depends on how you count compute, how you tune learning rate and batch size, and which model sizes you trust. The lesson is to use small-scale fits, but stay careful when you transfer them upward.

切

Randomness in training 40:02

Deep learning training is not fully deterministic. Mini batch sampling adds randomness because you only use a subset of examples at a time, even if you fix a seed. Random initialization also matters, because starting at zero would leave the network stuck with zero gradients. Dropout and random augmentations add another source. These effects are the reason you need to ask whether two close results are really different or just noise.

切

Variance and paired tests 51:30

Different runs often vary by about 1 to 1.5 percent, and the spread from initialization, data order, and augmentation can look surprisingly similar. Small perturbations at the start can grow until they look like a fresh random draw. Even fully deterministic full batch training can show random looking spikes when the learning rate is high. Because of this, you should use paired significance tests when two methods are compared on the same test examples.

切

Stochasticity and variation 53:31

Separate run-to-run variation from variation in the examples. Pairing examples can remove noise you do not care about, which is why error bars in machine learning can look worse than the real effect. In agentic evals, the difficulty of the problems may matter more than model-to-model spread. Treat deep learning as semi-stochastic, watch for GPU nondeterminism, and use rough standard errors instead of formal tests when the scale is clear.

切

What to inspect 55:01

Debugging means checking outputs, loss curves, activations, gradients, and parameters with training state. Loss curves are the first thing to read, and pre-training makes anomalies easier to spot than noisy reinforcement learning. Learning-rate schedules leave clear marks on the curve: aggressive annealing drops loss faster, while cycling the rate can make loss dip, rise, and dip again. The same statistics also explain why good initialization keeps activations and backpropagated signals stable across layers.

切

Tracking internal statistics 1:07:02

QK norm puts layer norm in front of both queries and keys. In the example from Google’s 22 billion parameter work, the run without it trains well for a while and then diverges. The loss alone does not explain much. The gradient norm only says training went bad at that point. The parameter L2 norm, logit max, and attention max all rise, but the attention max gives the clearest warning because it blows up much earlier than the loss shows trouble. A small known good model is the right control for comparison. With QK norm, the logits and attention values stay bounded and the run remains stable.

AI-generated summary. It can be wrong or incomplete - check anything that matters against the original.

Summarize your own YouTube video

Paste a YouTube link, article, PDF, ebook or slide deck and get a summary like this in seconds. Free to try, no sign-up needed.

⚔️ Try the YouTube summarizer

Discussion

Sign in to join the discussion. Sign in

More from the Bento Box

Browse the Bento Box →

With your OK, Microsoft Clarity and Google Analytics set cookies (data goes to the US) so we can see what breaks. Cookie details