gpu-head-to-head
aien-dev/gpu-head-to-head
Brought by drakestapleton
gpu-head-to-head / q35-9b / tools / ref9b.sh
| 1 | #!/usr/bin/env bash |
| 2 | # Throwaway: capture LLAMA16 (BF16 GGUF) greedy reference outputs for the correctness gate. |
| 3 | # Not a timed cell. Holds /tmp/aien-gb10.lock for its few minutes. |
| 4 | set -u |
| 5 | H=/home/drakestapleton/handoffs/H2H9B; REPO=/home/drakestapleton/handoffs/HeadToHead/repo |
| 6 | LLAMA_DIR=/home/drakestapleton/h2h/dl/llama-bin/llama-b11913 |
| 7 | CUDART_DIR=/home/drakestapleton/h2h/dl/cudart-llama-b11913-bin-ubuntu-cuda-13.4-arm64 |
| 8 | mkdir -p $H/results/ref |
| 9 | exec 9>/tmp/aien-gb10.lock; flock 9 |
| 10 | echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) Main(H2H-9B): GPU-START LLAMA16 reference capture (lock held, <10 min)" >> /home/drakestapleton/handoffs/BOARD.md |
| 11 | LD_LIBRARY_PATH=$CUDART_DIR:$LLAMA_DIR taskset -c 5-9,15-19 $LLAMA_DIR/llama-server -m /home/drakestapleton/h2h/gguf/q35-9b-bf16.gguf \ |
| 12 | --host 127.0.0.1 --port 18293 -ngl 999 -fa on -c 32768 -np 1 --jinja < /dev/null > $H/results/ref/server.log 2>&1 & |
| 13 | SPID=$! |
| 14 | for _ in $(seq 1 300); do curl -s -m 2 127.0.0.1:18293/v1/models | grep -q q35 && break; sleep 1; done |
| 15 | taskset -c 0-1 python3 $REPO/bench/bench.py --port 18293 --model q35-9b-bf16 --arm LLAMA16 --round REF --metric agree \ |
| 16 | --prompts $REPO/prompts/decode.jsonl --concurrency 1 --max-tokens 128 --warmup 0 --reps 16 \ |
| 17 | --out $H/results/ref/LLAMA16-REF.jsonl --cell-run LLAMA16-REF-agree 2> $H/results/ref/client.log |
| 18 | echo "client exit $?" |
| 19 | kill $SPID; wait $SPID 2>/dev/null |
| 20 | echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) Main(H2H-9B): GPU-END LLAMA16 reference capture" >> /home/drakestapleton/handoffs/BOARD.md |