PAT-code / scripts /train_pat32.sh
ICLRPAT27's picture
Publish reviewed PAT training and inference supplement
643267a verified
Raw History Blame Contribute Delete
662 Bytes
#!/usr/bin/env bash
# PAT-32: four ranks, one 25K-token microbatch per rank, about 100K tokens/update.
# Required: DATA, VALIDATION. OUTPUT defaults to runs/pat32.
# Additional arguments are passed to the trainer, e.g. --resume runs/pat32/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=4 -m pat.train \
--config "$PAT_ROOT/configs/pat32.json" \
--data "$DATA" \
--validation "$VALIDATION" \
--output "${OUTPUT:-runs/pat32}" \
"$@"