msq-plurality-gap / code /run_after_fetch.sh
adeerkhan's picture
MSQ: the unstated premise
5264032 verified
Raw History Blame Contribute Delete
731 Bytes
#!/usr/bin/env bash
# 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=$?"