Download scripts/train_fa32.sh from ICLRPAT27/PAT-code: direct link, hf CLI and curl.
- Browser
- Download file 658 Bytes
-
https://huggingface.co/ICLRPAT27/PAT-code/resolve/main/scripts/train_fa32.sh
- Command line
-
hf download hf://ICLRPAT27/PAT-code/scripts/train_fa32.sh
-
curl -L -o train_fa32.sh https://huggingface.co/ICLRPAT27/PAT-code/resolve/main/scripts/train_fa32.sh
658 Bytes
| # 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}" \ | |
| "$@" | |