Small vs GPT-2-sized model
lesson 1.9 · ScaleWhat does 30× the transformer buy on the same web text?
Run A
donefineweb_edu · 4L·256d · 16M params · bf16
tokens read
24,576,000
step
3,000 / 3,000
- train loss
- 5.082
- best val
- 5.282
- tokens/s
- 39k
- MFU
- 3.5%
- peak mem
- 5.9 GB
- lr
- 1.0e-4
0:14:52 · 0.018 kWh ≈ <$0.01 power · ≈ $0.07 to rent
Run B
donefineweb_edu · 12L·768d · 124M params · bf16
tokens read
24,576,000
step
3,000 / 3,000
- train loss
- 4.828
- best val
- 5.055
- tokens/s
- 19k
- MFU
- 13.0%
- peak mem
- 6.5 GB
- lr
- 1.0e-4
0:28:23 · 0.034 kWh ≈ <$0.01 power · ≈ $0.14 to rent
The machine, live
NVIDIA L4 · gcp-l4-lab2offline · just nowGPU 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.051 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 · Same data and steps; B is GPT-2 small's shape. Expect B's loss to stay below A's at every step, and B to use the GPU far better (MFU) even though each of its steps costs more.
Run A
Queued
done
Download data
done
Tokenize
done
Build and compile
done
Warm up
done
Train
done
Finished
done
Run B
Queued
done
Download data
done
Tokenize
done
Build and compile
done
Warm up
done
Train
done
Finished
done
The questions
| arithmetic | A 0.53 | B 0.42 |
| ice | A 0.57 | B 0.50 |
| ocean | A 0.52 | B 0.69 |
| orbit | A 0.67 | B 0.59 |
| paris | A 0.26 | B 0.32 |
| planet | A 0.17 | B 0.19 |
| sky | A 0.54 | B 0.64 |
| water | A 0.35 | B 0.44 |
| whale | A 0.07 | B 0.15 |
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.
Run A
Water is the most important part of the water. This can be used in the water. The water can also develop the water in the plant which will affect the soil. This can vary under temperature and will impact the plants. It can result in a particular area or location. For example, the water can be used to be performed by the water in order to help with the soil. Once the water is the water is to get the water that is done, the water will increase your water. How does the water? To the soil it take more nutrients to reduce the nitrogen flow. It can be recommended if the moisture pressure becomes better to make sure water is done. This is important if water is good enough, it is necessary to give a chance of dry in a container and not getting a good water. If the water is ready to provide water, it can also be required for a water water peroxide (see below below). In the other hand, it will be very great if the
Run B
Water is the most harmful to the future. The importance of reducing the global carbon emissions in China is the first step of the COVID-19 pandemic is a country-long new country in the state. In the next hand, a global global warming program is an increasing source of 2.5 million people to produce 1.4 million people. This is an important problem in the global economy. There are also other things that are needed to make this problem. In the past, there are some other types of things that can be done with people who would like to start with electricity. The first thing that the United States would be more likely is to be more serious than the world, it is quite a simple question. We have to know how much to make it more energy, we will not have to make it a difference in what energy is. But in the first time we will have a lot of energy but have a lot of ideas about it. What is the
What happened
- BFinished 3000 steps. Best val loss 5.055.
- BCheckpoint at step 3000: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.20s.
- BStep 3000: val 5.055, train 5.047 (gap +0.009).
- BStep 2800: val 5.056, train 5.049 (gap +0.007).
- BCheckpoint at step 2750: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.63s.
- BStep 2600: val 5.083, train 5.088 (gap -0.005).
- BCheckpoint at step 2500: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.12s.
- BStep 2400: val 5.142, train 5.124 (gap +0.018).
- BCheckpoint at step 2250: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.07s.
- BStep 2200: val 5.173, train 5.153 (gap +0.019).
- BStep 2130 / 3000 (71%), 17M tokens. Train loss 5.381, best val 5.236, fact probes 0.46. 18783 tok/s; about 00d 00h 08m left.
- BCheckpoint at step 2000: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.34s.
- BStep 2000: val 5.236, train 5.252 (gap -0.016).
- BStep 1800: val 5.338, train 5.276 (gap +0.061).
- BCheckpoint at step 1750: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 5.83s.
- BStep 1600: val 5.456, train 5.383 (gap +0.072).
- BCheckpoint at step 1500: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.57s.
- BStep 1400: val 5.497, train 5.445 (gap +0.053).
- AFinished 3000 steps. Best val loss 5.282.
- ACheckpoint at step 3000: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- AStep 3000: val 5.282, train 5.275 (gap +0.007).
- BCheckpoint at step 1250: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 5.88s.
- AStep 2800: val 5.284, train 5.270 (gap +0.014).
- BStep 1200: val 5.652, train 5.608 (gap +0.045).
- ACheckpoint at step 2750: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.83s.
- AStep 2600: val 5.299, train 5.301 (gap -0.003).
- ACheckpoint at step 2500: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.86s.
- BCheckpoint at step 1000: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.30s.
- AStep 2400: val 5.339, train 5.320 (gap +0.020).
- BStep 1000: val 5.723, train 5.679 (gap +0.044).
- ACheckpoint at step 2250: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.83s.
- AStep 2200: val 5.358, train 5.336 (gap +0.022).
- ACheckpoint at step 2000: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- AStep 2000: val 5.397, train 5.415 (gap -0.019).
- BStep 800: val 5.817, train 5.818 (gap -0.001).
- BCheckpoint at step 750: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.17s.
- AStep 1800: val 5.480, train 5.421 (gap +0.059).
- ACheckpoint at step 1750: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- AStep 1600: val 5.575, train 5.508 (gap +0.067).
- BStep 600: val 5.991, train 5.998 (gap -0.008).
- ACheckpoint at step 1500: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.84s.
- AStep 1400: val 5.604, train 5.554 (gap +0.051).
- BCheckpoint at step 500: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.22s.
- ACheckpoint at step 1250: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- AStep 1200: val 5.735, train 5.697 (gap +0.038).
- BStep 400: val 6.309, train 6.240 (gap +0.068).
- ACheckpoint at step 1000: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- AStep 1000: val 5.790, train 5.744 (gap +0.045).
- BCheckpoint at step 250: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.35s.
- AStep 800: val 5.895, train 5.895 (gap +0.000).
- ACheckpoint at step 750: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.84s.
- BStep 200: val 6.607, train 6.583 (gap +0.024).
- AStep 600: val 6.063, train 6.075 (gap -0.013).
- ACheckpoint at step 500: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.85s.
- BCheckpoint at step 100: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 6.15s.
- AStep 400: val 6.339, train 6.267 (gap +0.072).
- BCheckpoint at step 50: 1486.8 MB (weights, AdamW state, schedule position, RNG states) in 7.34s.
- ACheckpoint at step 250: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- AStep 200: val 6.634, train 6.612 (gap +0.023).
- ACheckpoint at step 100: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.82s.
- BCheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/71272462-4e44-457f-8dfa-535f781d411d/step-0000000.pt in 4.8s (in the background; training didn't wait).
- ACheckpoint at step 50: 193.3 MB (weights, AdamW state, schedule position, RNG states) in 0.86s.
- BCheckpoint at step 0: 495.6 MB (weights, AdamW state, schedule position, RNG states) in 2.14s.
- BExpected loss before training ≈ ln(vocab) = 10.83.
- BTraining 123.89M params on fineweb_edu for 3000 steps (bf16, batch 32×1, ctx 256).
- ACheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/35cd9bae-ad26-4927-88a6-5fa1484eaa88/step-0000000.pt in 1.3s (in the background; training didn't wait).
- ACheckpoint at step 0: 64.4 MB (weights, AdamW state, schedule position, RNG states) in 0.24s.
- AExpected loss before training ≈ ln(vocab) = 10.83.
- ATraining 16.10M params on fineweb_edu for 3000 steps (bf16, batch 32×1, ctx 256).