Cosine Learning Rate Schedule › Trapezoidal Schedules: A Modern Alternative

Michael BrenndoerferJanuary 26, 20263 min read
Language AI HandbookAll chapters
Part 32 of 67Training Optimization
Chapter 233Cosine Learning Rate Schedule › Trapezoidal Schedules: A Modern Alternative
Reading section 10 of 14 · Trapezoidal Schedules: A Modern Alternative · 3 minSection 10 of 14 · 3 min

Book contents

Section 10 of 14 · 3 min read

Cosine Learning Rate Schedule › Trapezoidal Schedules: A Modern AlternativeOne section · Sections in this chapter10 / 14 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

A more recent alternative that has gained attention for large-scale language model training is the trapezoidal (or "trapezoid") schedule. Rather than decaying from the very beginning, the trapezoidal schedule keeps the learning rate at its peak for most of training, then drops it sharply in a brief cooldown phase at the end.

The schedule has three phases:

  1. Warmup: Linear ramp from 0 to ηmax⁡\eta_{\max} over TwarmupT_{\text{warmup}} steps.
  2. Stable: Constant learning rate at ηmax⁡\eta_{\max} for TstableT_{\text{stable}} steps (typically 80-90% of total training).
  3. Cooldown: Cosine or linear decay from ηmax⁡\eta_{\max} to ηmin⁡\eta_{\min} over TcooldownT_{\text{cooldown}} steps.

The motivation for this schedule is compute-budget flexibility. With a cosine schedule, you must decide the total training duration TT in advance, because the decay rate depends on TT. If you want to train for 20% longer (perhaps because the model is still improving), the entire cosine curve needs to be rescaled. With a trapezoidal schedule, you can extend the stable phase arbitrarily without affecting the decay curve: just train for longer at the constant peak rate, then apply the same cooldown at the end.

Recent work including the Chinchilla analysis and follow-up scaling papers has noted that the final cooldown phase is disproportionately important for model quality. A model trained at constant learning rate for a very long time, then cooled down over a few thousand steps, can match or exceed the quality of a model trained with a cosine schedule for the same total compute. This property makes the trapezoidal schedule particularly useful for continual or incremental training, where the exact endpoint is not known in advance.

Out[21]:
Visualization
Comparison of trapezoidal and cosine learning rate schedules showing the stable plateau phase of the trapezoidal approach.
Trapezoidal learning rate schedule compared to cosine decay over 1,000 steps. The trapezoidal schedule maintains its peak learning rate through 80% of training, then decays steeply in a short cooldown window. This contrasts with the cosine schedule, which begins decaying immediately. The trapezoidal approach offers more flexibility for extending training runs without redesigning the entire schedule.