Smoke SFT: grad-accum=1 batch + batch-scaled LRs (verified)
Browse files- hf-jobs/launch.sh +8 -2
hf-jobs/launch.sh
CHANGED
|
@@ -59,9 +59,15 @@ case "$STAGE" in
|
|
| 59 |
--device-batch-size=16 --total-batch-size=16384 \
|
| 60 |
--num-iterations=50 --eval-every=25 --eval-tokens=524288 \
|
| 61 |
--core-metric-every=-1 --sample-every=-1 --run=dummy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
python -m scripts.chat_sft \
|
| 63 |
-
--num-iterations=
|
| 64 |
-
--
|
|
|
|
| 65 |
--chatcore-every=-1 --run=dummy
|
| 66 |
python -m scripts.chat_cli -p "Why is the sky blue?"
|
| 67 |
;;
|
|
|
|
| 59 |
--device-batch-size=16 --total-batch-size=16384 \
|
| 60 |
--num-iterations=50 --eval-every=25 --eval-tokens=524288 \
|
| 61 |
--core-metric-every=-1 --sample-every=-1 --run=dummy
|
| 62 |
+
# SFT: keep grad-accum=1 (total = device_batch*seq_len) so --num-iterations counts
|
| 63 |
+
# optimizer steps 1:1 (chat_sft's progress tracking is per micro-batch), and scale
|
| 64 |
+
# LRs to the batch like base_train does (sqrt(8192/524288) ~= 0.125 x defaults).
|
| 65 |
+
# Note: train/loss may log NaN due to fully-masked micro-batches (harmless, zero
|
| 66 |
+
# gradient) — judge SFT by val/bpb.
|
| 67 |
python -m scripts.chat_sft \
|
| 68 |
+
--num-iterations=20 --total-batch-size=8192 \
|
| 69 |
+
--embedding-lr=0.0375 --unembedding-lr=0.0005 --matrix-lr=0.0025 \
|
| 70 |
+
--eval-every=10 --eval-tokens=524288 \
|
| 71 |
--chatcore-every=-1 --run=dummy
|
| 72 |
python -m scripts.chat_cli -p "Why is the sky blue?"
|
| 73 |
;;
|