LoRA vs full fine-tuning (our GPT-2 124M)
lesson 2.3 · LoRA vs fullTrain 2% of the weights or all of them: what changes in quality, memory and speed?
Run A
failednull · ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt · 124M params ·
tokens read
31,036,784
step
3,760 / 0
- train loss
- 2.072
- best val
- 1.952
- tokens/s
- 16k
- MFU
- –
- peak mem
- 6.1 GB
- lr
- 3.9e-6
2d 21h · ≈ $21 to rent
Spot VM gcp-l4-ft7 was preempted by Google at 12:31 UTC (step 3760 of 4251; last checkpoint step 3000).
Run B
donenull · ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt · 127M params ·
tokens read
35,055,328
step
4,251 / 0
- train loss
- 2.055
- best val
- 1.966
- tokens/s
- 32k
- MFU
- –
- peak mem
- 4.7 GB
- lr
- 2.0e-5
0:23:49 · ≈ $0.12 to rent
The machine, live
GPU · gcp-l4-ft7offline · just nowGPU busy
– %
VRAM
– / 24 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
stopped here
Finished
next
Stopped at · Train · Forward, backward, AdamW update, again and again. The learning rate follows a cosine down to a tenth of its peak.
Evaluateevery 250 steps
last 3,750 · next 4,000
loss on held-out text, plus the fact probes (does it know water is a liquid?)
Checkpointevery 1,000 steps
last 3,000 · next 4,000
save weights + optimizer + RNG, upload to Cloud Storage; it appears in the Playground
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 3000)
Paris is the capital of France.
Run B
Paris.
What happened
- ANo progress for 339 minutes: the last metric was at 12:30 UTC. Check the worker and the GPU.
- AStep 3760 / (376000%), 31M tokens. Train loss 2.072, best val 1.952. 16163 tok/s; about left.
- ANo progress for 279 minutes: the last metric was at 12:30 UTC. Check the worker and the GPU.
- ANo progress for 219 minutes: the last metric was at 12:30 UTC. Check the worker and the GPU.
- AStep 3760 / (376000%), 31M tokens. Train loss 2.072, best val 1.952. 16163 tok/s; about left.
- ANo progress for 149 minutes: the last metric was at 12:30 UTC. Check the worker and the GPU.
- AStep 3760 / (376000%), 31M tokens. Train loss 2.072, best val 1.952. 16163 tok/s; about left.
- ANo progress for 89 minutes: the last metric was at 12:30 UTC. Check the worker and the GPU.
- ANo progress for 19 minutes: the last metric was at 12:30 UTC. Check the worker and the GPU.
- BFine-tuning finished: 3.3% → 5.3% of held-out questions. Best val loss on answers 1.966.
- BStep 4251: 5.3% of 300 held-out questions, 10/20 hand-written; val loss on answers 1.966.
- BStep 4000: 5.3% of 300 held-out questions, 11/20 hand-written; val loss on answers 1.967.
- BStep 3000: 5.3% of 300 held-out questions, 11/20 hand-written; val loss on answers 1.977.
- AStep 3000: 6.7% of 300 held-out questions, 10/20 hand-written; val loss on answers 1.964.
- BStep 2000: 5.3% of 300 held-out questions, 11/20 hand-written; val loss on answers 1.993.
- AStep 2000: 5.3% of 300 held-out questions, 11/20 hand-written; val loss on answers 1.983.
- BStep 1000: 4.7% of 300 held-out questions, 11/20 hand-written; val loss on answers 2.023.
- AStep 1000: 5.3% of 300 held-out questions, 11/20 hand-written; val loss on answers 2.013.
- BCheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/65f45660-5eb8-4bf9-829b-7a039f36a563/step-0000000.pt in 4.8s (in the background; training didn't wait).
- BStep 0: 3.3% of 300 held-out questions, 8/20 hand-written; val loss on answers 2.453.
- BFine-tuning ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt with LoRA on 'qa' (136,053 examples, 1 epoch(s), 4,251 steps). Trainable parameters: 2,359,296 of 126,835,200 (1.86%).
- ACheckpoint step 0 copied off the machine to gs://train-galvyn-xyz-checkpoints/runs/279de5a6-5c3e-4bf7-ae21-539137a3c7b0/step-0000000.pt in 1.7s (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.453.
- AFine-tuning ours:gs://train-galvyn-xyz-checkpoints/runs/1a0cd0c6-df9f-471e-b9fa-096a419cccea/step-0019073.pt on 'qa' (136,053 examples, 1 epoch(s), 4,251 steps). Trainable parameters: 124,475,904 of 124,475,904 (100.00%).