BigMoeOnEdge/scripts/gptoss-matrix.sh
gjjkbssg 47c84feb20
Mark the two doc-invoked host scripts executable (#164)
* Mark the two doc-invoked host scripts executable

README, AGENTS, CONTRIBUTING and docs/seam.md run scripts/build-host.sh
directly, and docs/benchmarks.md runs scripts/bench-run.sh the same way,
but both are committed 100644, so a fresh POSIX clone answers permission
denied at the first documented step. Windows trees never see the mode
bit, which is likely how it went unnoticed.

* Mark the remaining host scripts executable too

Per the discussion in #163: leaving only the two doc-invoked scripts
executable hides the next instance of the same failure behind an
inconsistent set, so all five scripts/*.sh get the bit.
2026-08-25 11:41:24 +02:00

31 lines
1.3 KiB
Bash
Executable file

#!/system/bin/sh
# gpt-oss benchmark matrix: cache auto (ceil 3000) + O_DIRECT + overlap + --no-think.
# Sweep io-threads {4,8} x prefetch {0,4} x top-k {2,3,4} = 12 cells.
# Per cell: full bmoe-cli stdout (the direct answer + perf lines). Deterministic greedy,
# so the answer depends only on k -> quality read once per k, perf per cell.
#
# Model path, output log and cooldown default to the test device's setup; override from the
# environment, e.g. M=/sdcard/Download/other.gguf COOLDOWN=60 sh gptoss-matrix.sh
M=${M:-/data/local/tmp/bmoe/gpt-oss-120b-Q4_K_M.gguf}
P="What is 17 times 23? Then name the capital of Australia."
OUT=${OUT:-/data/local/tmp/gptoss-matrix.out}
COOLDOWN=${COOLDOWN:-20}
cd /data/local/tmp || exit 1
: > "$OUT"
for K in 2 3 4; do
for IO in 4 8; do
for PF in 0 4; do
PFFLAG=""
[ "$PF" -gt 0 ] && PFFLAG="--prefetch $PF"
TAG="k${K}_io${IO}_pf${PF}"
echo "==================== $TAG ====================" >> "$OUT"
sleep "$COOLDOWN"
LD_LIBRARY_PATH=/data/local/tmp ./bmoe-cli -m "$M" --chatml --no-think -c 2048 -n 24 \
--moe-stream --cache-mb auto --cache-ceil-mb 3000 --overlap \
--io-threads "$IO" --n-expert-used "$K" $PFFLAG \
-p "$P" >> "$OUT" 2>/dev/null
echo "" >> "$OUT"
done
done
done
echo "ALL DONE" >> "$OUT"