Phase 2: teach GPT-2 124M to answer questions (supervised fine-tuning)
lesson 2.1 · Teach it to answerPretraining taught it facts but not to answer and stop. What changes after ~140k question → answer examples?
Run A
donefineweb_edu_10b · 12L·768d · 124M params ·
tokens read
37,678,816
step
4,320 / 4,300
- train loss
- 1.920
- best val
- 1.975
- tokens/s
- 30k
- MFU
- –
- peak mem
- –
- lr
- 3.0e-6
0:22:35 · ≈ $0.11 to rent
The machine, live
NVIDIA L4 · gcp-l4-sftoffline · 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
–
starts with training
RAM
–
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
Queued
done
Download data
already on disk
Tokenize
already on disk
Build and compile
done
Warm up
skipped
Train
done
Finished
done
Run A
The capital of France is Paris.
What happened
- ARe-graded after the run: 11/20, not 12/20. "Boiling point of water in Celsius" was answered "approximately 32.8°C (100.6°F)" and the grader accepted it because the text contains "100". The grader now matches whole words and numbers.
- ASFT finished: 7/20 → 12/20 questions correct. Best val loss on answers 1.975.
- AStep 4320: 12/20 correct; val loss on answers 1.975.
- AStep 4000: 13/20 correct; val loss on answers 1.977.
- AStep 3500: 10/20 correct; val loss on answers 1.981.
- AStep 3000: 14/20 correct; val loss on answers 1.987.
- AStep 2500: 14/20 correct; val loss on answers 1.998.
- AStep 2000: 12/20 correct; val loss on answers 2.007.
- AStep 1500: 14/20 correct; val loss on answers 2.017.
- AStep 1000: 11/20 correct; val loss on answers 2.038.
- AStep 500: 10/20 correct; val loss on answers 2.066.
- ACheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/18b4f4d5-949c-4699-9246-8667a73dd218/step-0000000.pt in 1.7s (in the background; training didn't wait).
- ABefore fine-tuning: 7/20 questions answered correctly (greedy). Val loss on answers 2.453.
- ASFT of the base model (step 19,073, 10.0B tokens) on 138,268 Q&A examples for 4,320 steps.
- ASFT crashed: OutOfMemoryError: CUDA out of memory. Tried to allocate 2.96 GiB. GPU 0 has a total capacity of 22.03 GiB of which 1.46 GiB is free. Including non-PyTorch memory, this process has 20.56 GiB memory in use. Of the allocated memory 14.47 GiB is allocated by PyTorch, and 5.85 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management
- ASFT crashed: OutOfMemoryError: CUDA out of memory. Tried to allocate 608.00 MiB. GPU 0 has a total capacity of 22.03 GiB of which 52.00 MiB is free. Process 1805 has 20.61 GiB memory in use. Including non-PyTorch memory, this process has 1.36 GiB memory in use. Of the allocated memory 1.01 GiB is allocated by PyTorch, and 124.38 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentati
- ACheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/18b4f4d5-949c-4699-9246-8667a73dd218/step-0000000.pt in 1.7s (in the background; training didn't wait).
- ABefore fine-tuning: 7/20 questions answered correctly (greedy). Val loss on answers 2.453.
- ASFT of the base model (step 19,073, 10.0B tokens) on 138,268 Q&A examples for 4,320 steps.