Download source/scripts/training/launch_v45_all.sh from Voltline/vimeml-tiny-zh-v1: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/Voltline/vimeml-tiny-zh-v1/resolve/main/source/scripts/training/launch_v45_all.sh
- Command line
-
hf download hf://Voltline/vimeml-tiny-zh-v1/source/scripts/training/launch_v45_all.sh
-
curl -L -o launch_v45_all.sh https://huggingface.co/Voltline/vimeml-tiny-zh-v1/resolve/main/source/scripts/training/launch_v45_all.sh
1.11 kB
| # Start all eight V4.5 students on one node, one GPU each, detached from this shell. | |
| # GPUs default to 0-7; override with VIMEML_V45_GPUS. With fewer free GPUs, run waves: | |
| # VIMEML_V45_ARMS="geo-v42 geo-s1 geo-s2 geo-s3" VIMEML_V45_GPUS="0 1 2 3". | |
| # Rerunning resumes arms whose process has stopped and skips arms still running. | |
| set -euo pipefail | |
| cd "$(dirname "$0")/../.." | |
| read -r -a arms <<< "${VIMEML_V45_ARMS:-geo-v42 geo-s1 geo-s2 geo-s3 mix-v42 mix-s1 mix-s2 mix-s3}" | |
| read -r -a gpus <<< "${VIMEML_V45_GPUS:-0 1 2 3 4 5 6 7}" | |
| (( ${#gpus[@]} == ${#arms[@]} )) || { echo "Need ${#arms[@]} GPUs, got ${#gpus[@]}" >&2; exit 2; } | |
| mkdir -p logs/v45 | |
| for i in "${!arms[@]}"; do | |
| arm="${arms[$i]}" | |
| pidfile="logs/v45/${arm}.pid" | |
| if [[ -f "$pidfile" ]] && kill -0 "$(cat "$pidfile")" 2>/dev/null; then | |
| echo "$arm already running (pid $(cat "$pidfile"))"; continue | |
| fi | |
| setsid nohup bash scripts/training/cluster_v45.sh "$arm" "${gpus[$i]}" \ | |
| >> "logs/v45/${arm}.log" 2>&1 < /dev/null & | |
| echo $! > "$pidfile" | |
| echo "$arm -> GPU ${gpus[$i]}, pid $!, log logs/v45/${arm}.log" | |
| done | |