General vs narrow fine-tuning data
lesson 2.4 · Data mattersFine-tune on general instructions or on one narrow task: how does each do on both kinds of question?
Run A
donenull · ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt · 124M params ·
tokens read
18,136,392
step
1,558 / 0
- train loss
- 1.827
- best val
- 1.885
- tokens/s
- 31k
- MFU
- –
- peak mem
- 6.1 GB
- lr
- 3.0e-6
0:15:48 · ≈ $0.08 to rent
Run B
donenull · ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt · 124M params ·
tokens read
2,154,640
step
2,692 / 0
- train loss
- 2.342
- best val
- 2.464
- tokens/s
- 5979
- MFU
- –
- peak mem
- 2.5 GB
- lr
- 3.0e-6
0:08:42 · ≈ $0.04 to rent
The machine, live
NVIDIA L4 · gcp-l4-ft2offline · neverGPU 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
Run A
Queued
done
Download data
already on disk
Tokenize
already on disk
Build and compile
done
Warm up
done
Train
done
Finished
done
Run B
Queued
done
Download data
already on disk
Tokenize
already on disk
Build and compile
done
Warm up
done
Train
done
Finished
done
Run A (step 1558)
The capital of France is Paris.
Run B
Paris.
What happened
- BFine-tuning finished: 3.3% → 8.0% of held-out questions. Best val loss on answers 2.464.
- BStep 2692: 8.0% of 300 held-out questions, 8/20 hand-written; val loss on answers 2.464.
- BStep 2500: 8.7% of 300 held-out questions, 8/20 hand-written; val loss on answers 2.468.
- BStep 2000: 8.7% of 300 held-out questions, 7/20 hand-written; val loss on answers 2.506.
- BStep 1500: 7.3% of 300 held-out questions, 7/20 hand-written; val loss on answers 2.561.
- BStep 1000: 5.7% of 300 held-out questions, 7/20 hand-written; val loss on answers 2.632.
- BStep 500: 6.3% of 300 held-out questions, 6/20 hand-written; val loss on answers 2.735.
- BCheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/5197a448-829f-44d3-86c0-a0bb57dd84b9/step-0000000.pt in 1.7s (in the background; training didn't wait).
- BStep 0: 3.3% of 300 held-out questions, 8/20 hand-written; val loss on answers 4.644.
- BFine-tuning ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt on 'nq' (86,167 examples, 1 epoch(s), 2,692 steps). Trainable parameters: 124,475,904 of 124,475,904 (100.00%).
- AFine-tuning finished: 3.3% → 3.3% of held-out questions. Best val loss on answers 1.885.
- AStep 1558: 3.3% of 300 held-out questions, 12/20 hand-written; val loss on answers 1.885.
- AStep 1500: 3.7% of 300 held-out questions, 11/20 hand-written; val loss on answers 1.885.
- AStep 1000: 4.0% of 300 held-out questions, 13/20 hand-written; val loss on answers 1.904.
- AStep 500: 3.3% of 300 held-out questions, 13/20 hand-written; val loss on answers 1.944.
- ACheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/9cba1796-db07-42d1-bbdf-92d0754c55a7/step-0000000.pt in 1.8s (in the background; training didn't wait).
- AStep 0: 3.3% of 300 held-out questions, 8/20 hand-written; val loss on answers 2.320.
- AFine-tuning ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt on 'alpaca' (49,886 examples, 1 epoch(s), 1,558 steps). Trainable parameters: 124,475,904 of 124,475,904 (100.00%).