Download scripts/phase2b_run_all.sh from Anupam-Rawat-IITB/code-switch-mtp: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/Anupam-Rawat-IITB/code-switch-mtp/resolve/main/scripts/phase2b_run_all.sh
- Command line
-
hf download hf://Anupam-Rawat-IITB/code-switch-mtp/scripts/phase2b_run_all.sh
-
curl -L -o phase2b_run_all.sh https://huggingface.co/Anupam-Rawat-IITB/code-switch-mtp/resolve/main/scripts/phase2b_run_all.sh
1.96 kB
| # Launch every Phase 2b measurement concurrently across the four GPUs. | |
| # | |
| # GPU 3 (24GB P6000) is the only card that fits Sarvam-1 in fp32, so both | |
| # Sarvam cells run there back to back; the Llama cells and the ByT5 driving | |
| # mode comparison occupy GPUs 0-2 in parallel. Start timestamps are recorded | |
| # so the concurrency can be checked after the fact rather than assumed. | |
| set -uo pipefail | |
| cd "$(dirname "$0")/.." | |
| source .venv/bin/activate | |
| OUT="${1:?usage: phase2b_run_all.sh <output_dir>}" | |
| mkdir -p "$OUT" | |
| : > "$OUT/concurrency.log" | |
| launch() { | |
| local gpu="$1" tag="$2"; shift 2 | |
| echo "$(date '+%F %T') launch tag=$tag gpu=$gpu" >> "$OUT/concurrency.log" | |
| CUDA_VISIBLE_DEVICES="$gpu" "$@" > "$OUT/$tag.log" 2>&1 | |
| echo "$(date '+%F %T') finish tag=$tag gpu=$gpu rc=$?" >> "$OUT/concurrency.log" | |
| } | |
| # GPU 3: both Sarvam cells, sequential (memory-bound) | |
| ( launch 3 sarvam_dev python scripts/phase2b_blocker_a.py --cell sarvam_dev --out "$OUT/a_sarvam_dev.json" | |
| launch 3 sarvam_rom python scripts/phase2b_blocker_a.py --cell sarvam_rom --out "$OUT/a_sarvam_rom.json" ) & | |
| # GPUs 0,1: the two Llama cells, fully parallel | |
| ( launch 0 llama_dev python scripts/phase2b_blocker_a.py --cell llama_dev --out "$OUT/a_llama_dev.json" ) & | |
| ( launch 1 llama_rom python scripts/phase2b_blocker_a.py --cell llama_rom --out "$OUT/a_llama_rom.json" ) & | |
| # GPU 2: blocker B architecture test (both driving modes, spread positions, | |
| # full horizon grid), then the trough-depth comparison across L1/L4/L5 at | |
| # horizon 1 only -- trough depth reads horizon-1 points exclusively, so the | |
| # higher horizons would be paid for and discarded. | |
| ( launch 2 b_arch python scripts/phase2b_blocker_b.py --limit 40 --strategies first,spread --out "$OUT/b_arch.json" | |
| launch 2 b_trough_L5 python scripts/phase2b_blocker_b.py --limit 400 --max-horizon 1 --strategies spread --out "$OUT/b_trough_L5.json" ) & | |
| wait | |
| echo "$(date '+%F %T') all done" >> "$OUT/concurrency.log" | |