EducationOptimizers
Optimizers
How weights move: update rules, schedules, clipping, averaging and evolution.
- BaseBase optimizer/scheduler builder + factory interface.Not written yet
- ConfigOptimizer config dataclasses (type, lr, wd, betas, schedule).Not written yet
- DocsOptimizer templates — swappable training-component configs.Not written yet
- EMA and SWAKeeps a running average of a model's weights during training, as an exponential moving average or a plain mean, and uses the average for evaluation.Lesson and interactive
- EvolutionBlack-box / gradient-free optimizers.4 parts
- Grad clipLimits the size of the gradient before the optimizer uses it, by rescaling its overall length or by capping each entry.Lesson and interactive
- OptimizersThe rules that turn a gradient into a change of the weights: SGD with momentum, Adam, AdamW and Lion.Lesson and interactive
- RegistryRegistry: select optimizer/scheduler by config name.Not written yet
- SchedulersFunctions that set the learning rate for every training step: a warmup at the start, then a decay by step, cosine, linear, exponential, inverse square root or one cycle.Lesson and interactive
- Weight decayShrinks the weights a little on every step to discourage large values, either directly (decoupled) or through an L2 term in the gradient.Lesson and interactive