at 28 and above we start to need batch size 8

This commit is contained in:
Andrej Karpathy 2026-02-08 18:26:34 +00:00
parent ff46300720
commit 1ec0a34779

View File

@ -57,8 +57,10 @@ for d in "${DEPTHS[@]}"; do
TAG="${SERIES_NAME}_miniseries_d${d}"
START_TIME=$(date +%s)
# For depths >= 22, use smaller device batch size to avoid OOM
if [ $d -ge 22 ]; then
# Reduce --device-batch-size to avoid OOM at larger depths
if [ $d -ge 28 ]; then
DEVICE_BATCH_SIZE_ARG="--device-batch-size=8"
elif [ $d -ge 20 ]; then
DEVICE_BATCH_SIZE_ARG="--device-batch-size=16"
else
DEVICE_BATCH_SIZE_ARG="--device-batch-size=32"