Download scripts/phase5_group_pilot.sh from Anupam-Rawat-IITB/code-switch-mtp: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/Anupam-Rawat-IITB/code-switch-mtp/resolve/main/scripts/phase5_group_pilot.sh
- Command line
-
hf download hf://Anupam-Rawat-IITB/code-switch-mtp/scripts/phase5_group_pilot.sh
-
curl -L -o phase5_group_pilot.sh https://huggingface.co/Anupam-Rawat-IITB/code-switch-mtp/resolve/main/scripts/phase5_group_pilot.sh
1.66 kB
| # Word-group loss pilot: 2.3M tokens, dependent heads with backbone targets, | |
| # look-ahead targets that start a word group weighted 1 (baseline), 0, 0.25 and 3. | |
| # | |
| # phase5_group_pilot.sh GPU NAME SEED (waits until the GPU is idle) | |
| set -u | |
| cd "$(dirname "$0")/.." | |
| set -a; [ -f .env ] && . ./.env; set +a | |
| export CUDA_DEVICE_ORDER=PCI_BUS_ID | |
| gpu=$1; name=$2; seed=$3 | |
| until [ "$(nvidia-smi -i "$gpu" --query-gpu=memory.used --format=csv,noheader,nounits)" -lt 500 ]; do sleep 30; done | |
| export CUDA_VISIBLE_DEVICES=$gpu | |
| case $name in | |
| Devanagari) DATA=/data/cs769_mtp/scratch/data/phase3/L4 ;; | |
| ITRANS) DATA=/data/cs769_mtp/scratch/data/phase3/L2 ;; | |
| IAST|ISO) DATA=/data/cs769_mtp/scratch/data/phase4_fertility/$name ;; | |
| *) echo "unknown condition $name"; exit 1 ;; | |
| esac | |
| CK=/data/cs769_mtp/scratch/checkpoints/phase5_group_pilot | |
| LOGS=/data/cs769_mtp/scratch/logs/phase5 | |
| OUT=results/phase5_dependent | |
| ARMS=dependent_teacher,dependent_teacher_gs0,dependent_teacher_gs0.25,dependent_teacher_gs3 | |
| .venv/bin/python scripts/phase5_dependent_train.py --name "$name" --train-ids "${DATA}_train_ids.npy" --seed "$seed" --arms "$ARMS" \ | |
| --scheme "$name" --max-steps 2245 --save-every 0 --checkpoint-dir "$CK" \ | |
| --out "$OUT/grouppilot_train_${name}_seed${seed}.json" > "$LOGS/grouppilot_train_${name}_seed${seed}.log" 2>&1 | |
| .venv/bin/python scripts/phase5_tree_draft.py --name "$name" --ckpt-dir "$CK/${name}_seed${seed}" --heldout "${DATA}_heldout.jsonl" \ | |
| --arms "$ARMS" --scheme "$name" --train-ids "${DATA}_train_ids.npy" \ | |
| --out "$OUT/grouppilot_tree_${name}_seed${seed}.json" > "$LOGS/grouppilot_tree_${name}_seed${seed}.log" 2>&1 | |