Documentation Index
Fetch the complete documentation index at: https://mintlify.com/itsubaki/gpt/llms.txt
Use this file to discover all available pages before exploring further.
D2Z (Decay to Zero) is a simple learning rate scheduler that linearly warms up the learning rate from 0 to MaxLearningRate over the first WarmupIters steps, then linearly decays it back to 0 by MaxIters. After MaxIters, the learning rate is held at exactly 0.0.
D2Z struct
The peak learning rate reached at the end of the warmup phase (i.e., at step
WarmupIters).Number of steps over which the learning rate linearly increases from
0 to MaxLearningRate.Total number of training steps. The learning rate reaches
0 at this point and stays there.GetLearningRate()
it according to the three-phase schedule:
| Phase | Condition | Formula |
|---|---|---|
| Warmup | it < WarmupIters | MaxLearningRate × it / WarmupIters |
| Decay | WarmupIters ≤ it < MaxIters | MaxLearningRate × (1 − progress) |
| Zero | it ≥ MaxIters | 0.0 |
progress during the decay phase is:
MaxLearningRate=0.1, WarmupIters=5, MaxIters=10):
The default
pretrain and SFT commands in itsubaki/gpt use a fixed learning rate set directly on the AdamW optimizer’s Alpha field and do not attach a scheduler. D2Z is available when you want explicit learning rate scheduling — simply call GetLearningRate(step) each iteration and pass the result to your optimizer before the parameter update.