train.galvyn.xyz · lab
read-onlySign in

Warmup vs no warmup

lesson 1.4 · Warmup

Why ramp the learning rate up instead of starting at full speed?

warmup: A 200 vs B 0

Run A

done

fineweb_edu · 6L·384d · 30M params · bf16

tokens read

16,384,000

step

2,000 / 2,000

train loss
5.232
best val
5.206
tokens/s
22k
MFU
3.7%
peak mem
6.4 GB
lr
3.0e-4

0:13:35 · 0.016 kWh ≈ <$0.01 power · ≈ $0.07 to rent

Run B

done

fineweb_edu · 6L·384d · 30M params · bf16

tokens read

16,384,000

step

2,000 / 2,000

train loss
6.342
best val
6.389
tokens/s
22k
MFU
3.7%
peak mem
6.4 GB
lr
3.0e-4

0:12:26 · 0.015 kWh ≈ <$0.01 power · ≈ $0.06 to rent

Losslower is better · starts near ln(vocab)
6810500100015002000stepB checkpoint @ 50A checkpoint @ 50A checkpoint @ 100B checkpoint @ 100B checkpoint @ 250A checkpoint @ 250A checkpoint @ 500B checkpoint @ 500B checkpoint @ 750A checkpoint @ 750A checkpoint @ 1000B checkpoint @ 1000A checkpoint @ 1250B checkpoint @ 1250A checkpoint @ 1500B checkpoint @ 1500B checkpoint @ 1750A checkpoint @ 1750A checkpoint @ 2000B checkpoint @ 2000

The machine, live

NVIDIA L4 · gcp-l4-laboffline · just now

GPU busy

– %

VRAM

– / 22 GB

Power

– / 230 W

Temperature

– °C

SM clock

– MHz

Memory bus

– %

Fan

– %

CPU

– %

PCIe

to GPU –from GPU –

Batches of token ids cross the PCIe bus into the GPU each step; weights never leave it.

Disk

read –write –

Reads: token windows from the tokenized dataset (mostly from page cache). Writes: checkpoints, about 1.5 GB each for GPT-2 124M.

Network

in –out –

In: dataset downloads from Hugging Face. Out: metrics to Supabase and checkpoint uploads to Cloud Storage.

drawing now

–

last 5 minutes

–

from the card's energy counter

this experiment

0.031 kWh

≈ <$0.01 of electricity

RAM

–

of 31.3 GB in WSL

Sampled every 2 s on the box (NVML + psutil) and pushed here over Supabase Realtime. GPU energy is the whole card. Electricity at an assumed $0.15/kWh.

What's happening

What to watch · Without warmup the first steps hit freshly initialised weights at full learning rate: look for an early spike in B's loss and gradient norm.

Run A

  1. Queued

    done

  2. Download data

    done

  3. Tokenize

    done

  4. Build and compile

    done

  5. Warm up

    done

  6. Train

    done

  7. Finished

    done

Run B

  1. Queued

    done

  2. Download data

    done

  3. Tokenize

    done

  4. Build and compile

    done

  5. Warm up

    skipped

  6. Train

    done

  7. Finished

    done

solid = train (smoothed) · dots = validation · dashed = after a crash-test resume
Learning ratewarmup, then cosine
0e+01e-32e-33e-3500100015002000step
Gradient normbefore clipping to 1.0 · log scale
0.5125500100015002000step
Throughputtokens per second
20k40k60k500100015002000step
MFUshare of this precision's peak (bf16 111, fp32 27.8 TFLOPS)
5.0%10.0%500100015002000step
GPU memory (measured)peak per log window · dashed = activations + workspace
5.9 GB6.3 GB500100015002000step
Does it know? Fact probesP(right word) / P(right + wrong): 0.5 = no idea, 1 = sure and right
0.350.40.45500100015002000step
The questions
arithmeticA 0.55B 0.52
iceA 0.31B 0.63
oceanA 0.54B 0.62
orbitA 0.73B 0.54
parisA 0.29B 0.15
planetA 0.44B 0.43
skyA 0.70B 0.42
waterA 0.60B 0.22
whaleA 0.07B 0.16

Prompts include "Q: Is water a liquid at room temperature? A:" (Yes vs No), "The capital of France is" (Paris vs London) and "The largest planet in our solar system is" (Jupiter vs Mars). Full list: trainer/src/galtrain/train.py.

Samplessame prompt and random draw every time, so only the model changes

Run A

Water is the most important part of the soil. This can also be the most important factor in the soil when it is the soil is in which the pH and is a pH of the soil.
This is the most important part of the soil, which is the plant is made by the root and the alkal. This can be the soil in the soil as it is the roots of your soil. A pH in the soil, the soil, is an mineral nutrient that uses the soil.
This is a good place in a soil, with the leaves, especially if these plant roots will be collected at the leaves, the moisture, the leaves are also found in different ways. This is the place in the soil and the soil is the roots. It is also used in soil and it’s a unique tree that is the area of the soil and soil. It also can also help to reduce the soil and soil. It is also not required that water is done.
In general, the

Run B

Water is. The year is a few. We are the child is the child for the more important to the time is the very important is a good of any and a few-to-year years. If the
In the most important of a day is that is the same type of the most. The time were to its children are only the most of a small data can be used on the more.
There are to get you find that is an important to go on the right.
-level in fact can learn a lot of the other.
The new and the same will be to take the first can be the body.
You can need to be done what are all the time, it is a child to do the same point and a high quality of a result of the world, a lot of these kinds of the first way to prevent a few.
The next change, it will be the time.
For example have a lot of the next.
In this is the

What happened

  1. BFinished 2000 steps. Best val loss 6.389.
  2. BCheckpoint at step 2000: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.54s.
  3. BStep 2000: val 6.389, train 6.419 (gap -0.030).
  4. BStep 1800: val 6.425, train 6.402 (gap +0.023).
  5. BCheckpoint at step 1750: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.54s.
  6. BStep 1600: val 6.506, train 6.430 (gap +0.076).
  7. BCheckpoint at step 1500: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.55s.
  8. BStep 1400: val 6.484, train 6.444 (gap +0.039).
  9. BCheckpoint at step 1250: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.55s.
  10. BStep 1200: val 6.579, train 6.563 (gap +0.016).
  11. BCheckpoint at step 1000: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.53s.
  12. BStep 1000: val 6.605, train 6.562 (gap +0.043).
  13. AFinished 2000 steps. Best val loss 5.206.
  14. ACheckpoint at step 2000: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.59s.
  15. BStep 800: val 6.635, train 6.616 (gap +0.019).
  16. AStep 2000: val 5.206, train 5.221 (gap -0.015).
  17. BCheckpoint at step 750: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.56s.
  18. AStep 1800: val 5.277, train 5.209 (gap +0.068).
  19. BStep 600: val 6.693, train 6.713 (gap -0.020).
  20. ACheckpoint at step 1750: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.65s.
  21. BCheckpoint at step 500: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.56s.
  22. BStep 400: val 6.840, train 6.770 (gap +0.070).
  23. AStep 1600: val 5.370, train 5.299 (gap +0.071).
  24. ACheckpoint at step 1500: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.58s.
  25. BCheckpoint at step 250: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.57s.
  26. BStep 200: val 7.026, train 6.999 (gap +0.027).
  27. AStep 1400: val 5.414, train 5.362 (gap +0.052).
  28. BCheckpoint at step 100: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.56s.
  29. BCheckpoint at step 50: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.63s.
  30. ACheckpoint at step 1250: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.96s.
  31. BCheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/ada51cf3-d298-42f1-ac0e-f271e31e08e1/step-0000000.pt in 0.7s (in the background; training didn't wait).
  32. BCheckpoint at step 0: 120.3 MB (weights, AdamW state, schedule position, RNG states) in 0.48s.
  33. BExpected loss before training ≈ ln(vocab) = 10.83.
  34. BTraining 30.06M params on fineweb_edu for 2000 steps (bf16, batch 32×1, ctx 256).
  35. AStep 1200: val 5.571, train 5.525 (gap +0.046).
  36. ACheckpoint at step 1000: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.13s.
  37. AStep 1000: val 5.658, train 5.612 (gap +0.046).
  38. AStep 800: val 5.783, train 5.787 (gap -0.004).
  39. ACheckpoint at step 750: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.43s.
  40. AStep 600: val 6.003, train 6.015 (gap -0.012).
  41. ACheckpoint at step 500: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 2.29s.
  42. AStep 400: val 6.295, train 6.223 (gap +0.072).
  43. ACheckpoint at step 250: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.98s.
  44. AStep 200: val 6.635, train 6.612 (gap +0.023).
  45. ACheckpoint at step 100: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.54s.
  46. ACheckpoint at step 50: 360.9 MB (weights, AdamW state, schedule position, RNG states) in 1.61s.
  47. ACheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/d1c5b52f-464f-47aa-b8fa-1431f3970020/step-0000000.pt in 0.7s (in the background; training didn't wait).
  48. ACheckpoint at step 0: 120.3 MB (weights, AdamW state, schedule position, RNG states) in 0.48s.
  49. AExpected loss before training ≈ ln(vocab) = 10.83.
  50. ATraining 30.06M params on fineweb_edu for 2000 steps (bf16, batch 32×1, ctx 256).