Download code/run_after_fetch.sh from adeerkhan/msq-plurality-gap: direct link, hf CLI and curl.
- Browser
- Download file 731 Bytes
-
https://huggingface.co/adeerkhan/msq-plurality-gap/resolve/main/code/run_after_fetch.sh
- Command line
-
hf download hf://adeerkhan/msq-plurality-gap/code/run_after_fetch.sh
-
curl -L -o run_after_fetch.sh https://huggingface.co/adeerkhan/msq-plurality-gap/resolve/main/code/run_after_fetch.sh
731 Bytes
| # Wait for a model to finish downloading, then run the MSQ battery on it. | |
| 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 | |
| name="$1"; repo="$2" | |
| echo "[$(date +%T)] waiting for $name to finish downloading" | |
| for _ in $(seq 1 240); do | |
| if grep -q "done $name rc=" logs/fetch_$name.log 2>/dev/null; then break; fi | |
| sleep 20 | |
| done | |
| echo "[$(date +%T)] $name download finished; running" | |
| python code/run_model.py --model "$name" --out "results/raw/$name.jsonl" \ | |
| --load-in-4bit --batch-size 8 --max-new-tokens 280 > "logs/run_$name.log" 2>&1 | |
| echo "[$(date +%T)] finished $name rc=$?" | |