duplex-v0 / tools /train_run.sh
Jr23xd23's picture
RightNow Duplex v0
f730521 verified
Raw History Blame Contribute Delete
1.57 kB
#!/usr/bin/env bash
# The two training runs on GPUs 1 to 7, back to back, then the held-out controller evaluation.
# Budgets (changed on 2026-11-30 to use all 8 GPUs and finish fast): 25 min of distillation and 55 min of
# controller training on 7 GPUs, about 9.3 GPU-hours, instead of the plan's 4 hours on 3 GPUs.
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
export CUDA_VISIBLE_DEVICES=1,2,3,4,5,6,7
date -u +%FT%TZ > runs/train_run_start
torchrun --nproc_per_node=7 -m controller.encoder.distill --data data/out/dataset \
--baseline-dir /data/train/models/Step-Audio-R1.1 --out runs/encoder \
--max-hours 0.42 --batch 12 --workers 10 --eval-every 1000 --ckpt-minutes 10 > /data/train/logs/distill.log 2>&1
[ -f runs/encoder/final.pt ] || { echo "distillation failed" > runs/train_run_failed; exit 1; }
torchrun --nproc_per_node=7 -m controller.model.train --data data/out/dataset \
--encoder runs/encoder/final.pt --out runs/controller \
--max-hours 0.92 --batch 24 --workers 10 --eval-every 1000 --ckpt-minutes 15 > /data/train/logs/train.log 2>&1
[ -f runs/controller/final.pt ] || { echo "controller training failed" > runs/train_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/train_run_end