#!/bin/bash # Full experiment sweep. Each config reloads the model and quantises it # layer-sequentially, then evaluates WikiText-2 perplexity. set -u cd "$(dirname "$0")/.." N=32 S=2048 P=20 run () { echo "=========== $* ===========" python -u code/quant_model.py --nsamples $N --seqlen $S --ppl-limit $P "$@" 2>&1 \ | grep -Ev "^Loading checkpoint|it/s\]$" } python -u code/quant_model.py --fp16 --seqlen $S --ppl-limit $P 2>&1 | tail -2 run --stages 3 --tag main15 run --stages 4 --tag main20 run --stages 2 --tag main10 run --stages 3 --alloc freq --spread 1 --tag freq15 run --stages 3 --no-ldlq --tag noldlq15 run --stages 3 --no-rht --tag northt15 run --rtn 3 --tag rtn3 run --rtn 2 --tag rtn2 echo "ALL RUNS COMPLETE"