okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge branch 'f-1402-w' into f-140253623e56f

main
1.1 KiB37 linesraw
1#!/usr/bin/env bash
2# The batch arms' concurrency test: N 500-token generations at once against the
3# --batch N config. scripts/ab-run.sh (which measures one request at a time) runs
4# first, in run-all.sh; this is the measurement that actually fills the slots.
5#
6# Usage: run-batch-concurrent.sh
7set -u
8REPORT="$(cd -- "$(dirname -- "$0")/.." && pwd)"
9ROOT="$(cd -- "$REPORT/../../.." && pwd)"
10DATA=$REPORT/data
11S=$REPORT/scripts
12PY=$ROOT/.venv/bin/python
13MODEL=qwen3.8-flash-next-coder-iq1_m
14LOG=$ROOT/strata-coder-iq1_m.log
15
16step() { echo; echo "[$(date -Is)] === $* ==="; echo; }
17
18kill_server() {
19  pkill -f "serve/server.py" 2>/dev/null
20  pkill -f "engine/strata --serve" 2>/dev/null
21  sleep 5
22}
23
24for n in 2 4; do
25  cfg=$DATA/cfg-batch$n-B.json
26  if [ ! -f "$cfg" ]; then
27    step "batch $n: $cfg missing, skipped"
28    continue
29  fi
30  kill_server
31  step "batch $n: $n concurrent 500-token requests"
32  "$PY" "$S/batch_concurrent.py" --config "$cfg" --model "$MODEL" \
33    --engine-log "$LOG" --out "$DATA/batch-concurrent-batch$n.json" --n "$n"
34done
35
36step "batch concurrency done"
37kill_server