Seen Once on the Way Up

OptimizersMedium+20 XP+20

Seen Once on the Way Up

A 10,00010{,}00010,000-step training run uses a warmup followed by cosine decay. The learning rate ηt\eta_tηt​ at step ttt is

ηt={0.004⋅t1000,0≤t≤1000(warmup)0.0004+0.004−0.00042(1+cos⁡(π⋅t−10009000)),1000≤t≤10000(cosine decay)\eta_t = \begin{cases} 0.004 \cdot \dfrac{t}{1000}, & 0 \le t \le 1000 \quad \text{(warmup)} \\[2.5ex] 0.0004 + \dfrac{0.004 - 0.0004}{2}\left(1 + \cos\left(\pi \cdot \dfrac{t - 1000}{9000}\right)\right), & 1000 \le t \le 10000 \quad \text{(cosine decay)} \end{cases}ηt​=⎩⎨⎧​0.004⋅1000t​,0.0004+20.004−0.0004​(1+cos(π⋅9000t−1000​)),​0≤t≤1000(warmup)1000≤t≤10000(cosine decay)​

So the rate climbs in a straight line from 000 to its peak of 0.0040.0040.004 over the first 1,0001{,}0001,000 steps, then eases down along a cosine curve to a floor of 0.00040.00040.0004 at the final step. The cosine takes its argument in radians.

Reading through the training log, you note the learning rate recorded at step 325, during warmup.

At which step after the warmup does the schedule give exactly that same learning rate again?

Give a whole step number.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.