Download code/run_queue.sh from adeerkhan/msq-plurality-gap: direct link, hf CLI and curl.
- Browser
- Download file 717 Bytes
-
https://huggingface.co/adeerkhan/msq-plurality-gap/resolve/main/code/run_queue.sh
- Command line
-
hf download hf://adeerkhan/msq-plurality-gap/code/run_queue.sh
-
curl -L -o run_queue.sh https://huggingface.co/adeerkhan/msq-plurality-gap/resolve/main/code/run_queue.sh
717 Bytes
| # Run the MSQ battery over a list of models, one at a time, waiting for the | |
| # GPU to be free between runs. | |
| set -u | |
| cd /home/adeerkhan/github/fatima | |
| source .venv/bin/activate | |
| export HF_TOKEN="$(cat "$HOME/.config/fatima/hf_token")" | |
| export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True | |
| wait_for_gpu () { | |
| while pgrep -f 'run_model.py' > /dev/null 2>&1; do sleep 15; done | |
| sleep 10 | |
| } | |
| for m in "$@"; do | |
| wait_for_gpu | |
| echo "[$(date +%T)] running $m" | |
| python code/run_model.py --model "$m" --out "results/raw/$m.jsonl" \ | |
| --load-in-4bit --batch-size 8 --max-new-tokens 280 \ | |
| > "logs/run_$m.log" 2>&1 | |
| echo "[$(date +%T)] finished $m rc=$?" | |
| done | |
| echo "[$(date +%T)] QUEUE COMPLETE" | |