Download tools/train_ctl.sh from RightNowAI/duplex-v0: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/RightNowAI/duplex-v0/resolve/main/tools/train_ctl.sh
- Command line
-
hf download hf://RightNowAI/duplex-v0/tools/train_ctl.sh
-
curl -L -o train_ctl.sh https://huggingface.co/RightNowAI/duplex-v0/resolve/main/tools/train_ctl.sh
1.09 kB
| # Controller training on GPUs 1 to 7 (36 minutes, a checkpoint every 10), then the held-out evaluation. | |
| # Shorter than first planned so that every evaluation ends before the sign-in certificate does. | |
| set -uo pipefail | |
| cd /data/train/duplex && . /data/train/venv/bin/activate | |
| export HF_HOME=/data/train/hf OMP_NUM_THREADS=4 MKL_NUM_THREADS=4 OPENBLAS_NUM_THREADS=4 | |
| date -u +%FT%TZ > runs/ctl_run_start | |
| CUDA_VISIBLE_DEVICES=1,2,3,4,5,6,7 torchrun --nproc_per_node=7 -m controller.model.train --data data/out/dataset \ | |
| --encoder runs/encoder/final.pt --out runs/controller \ | |
| --max-hours 0.6 --batch 24 --workers 10 --eval-every 1000 --ckpt-minutes 10 > /data/train/logs/train.log 2>&1 | |
| [ -f runs/controller/final.pt ] || { echo "controller training failed" > runs/ctl_run_failed; exit 1; } | |
| CUDA_VISIBLE_DEVICES=1 python -m eval.eval_controller --data data/out/dataset --encoder runs/encoder/final.pt \ | |
| --controller runs/controller/final.pt --out eval/results/controller --device cuda:0 > /data/train/logs/eval_controller.log 2>&1 | |
| date -u +%FT%TZ > runs/ctl_run_end | |