File size: 658 Bytes
643267a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/usr/bin/env bash
# FA-32: two ranks, two 25K-token microbatches per rank, about 100K tokens/update.
# Required: DATA, VALIDATION. OUTPUT defaults to runs/fa32.
# Additional arguments are passed to the trainer, e.g. --resume runs/fa32/step-....
set -euo pipefail
: "${DATA:?Set DATA to the prepared training directory}"
: "${VALIDATION:?Set VALIDATION to the prepared validation directory}"
PAT_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
exec torchrun --standalone --nproc_per_node=2 -m pat.train \
--config "$PAT_ROOT/configs/fa32.json" \
--data "$DATA" \
--validation "$VALIDATION" \
--output "${OUTPUT:-runs/fa32}" \
"$@"
|