mirror of
https://github.com/Helldez/BigMoeOnEdge.git
synced 2026-10-03 03:25:42 +00:00
* 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.
38 lines
1.9 KiB
Bash
Executable file
38 lines
1.9 KiB
Bash
Executable file
#!/system/bin/sh
|
|
# Warm-up-only validation: dense warm-up ON, dense reservation OFF (default binary now).
|
|
# One run per model at the higher k tested before, same recipes as the full battery.
|
|
# Confirms the gpt-oss startup win survives and gemma/qwen show no budget-driven regression.
|
|
#
|
|
# Model paths default to where they sit on the test device; override any of them from the
|
|
# environment to bench a different copy, e.g.
|
|
# GPTOSS=/sdcard/Download/other.gguf sh bench-warmonly.sh
|
|
GPTOSS=${GPTOSS:-/data/local/tmp/bmoe/gpt-oss-120b-Q4_K_M.gguf}
|
|
QWEN=${QWEN:-/sdcard/Download/Qwen3-30B-A3B-Q4_K_M.gguf}
|
|
GEMMA=${GEMMA:-/sdcard/Download/google_gemma-4-26B-A4B-it-Q4_K_M.gguf}
|
|
PSHORT="What is 17 times 23? Then name the capital of Australia."
|
|
PLONG="Write a long detailed essay about the history of computing including its origins its key milestones the people involved and the future directions of the field"
|
|
cd /data/local/tmp || exit 1
|
|
|
|
settle() {
|
|
pkill -f bmoe-cli 2>/dev/null; sleep 2
|
|
while pgrep -x bmoe-cli >/dev/null 2>&1; do pkill -9 -f bmoe-cli 2>/dev/null; sleep 1; done
|
|
echo "--- cooldown ${1}s ---"; sleep "$1"
|
|
}
|
|
|
|
run() {
|
|
TAG="$1"; M="$2"; N="$3"; K="$4"; IO="$5"; CEIL="$6"; shift 6
|
|
echo "==================== $TAG (k=$K io=$IO n=$N) ===================="
|
|
echo "start batt=$(dumpsys battery 2>/dev/null | sed -n 's/.*temperature: *//p')dC"
|
|
rm -f "/data/local/tmp/wo_$TAG.csv"
|
|
LD_LIBRARY_PATH=/data/local/tmp ./bmoe-cli -m "$M" --chatml -n "$N" \
|
|
--moe-stream --cache-mb auto --cache-ceil-mb "$CEIL" --io-threads "$IO" -t 4 --overlap \
|
|
--n-expert-used "$K" --csv "/data/local/tmp/wo_$TAG.csv" "$@" 2>&1 \
|
|
| grep -E "cache auto|dense warm-up|generation:|moe-cache:"
|
|
echo "csv rows: $(wc -l < /data/local/tmp/wo_$TAG.csv)"
|
|
}
|
|
|
|
run gptoss_k4 "$GPTOSS" 24 4 8 3000 --no-think -p "$PSHORT"; settle 90
|
|
run qwen_k8 "$QWEN" 256 8 4 4000 -p "$PLONG"; settle 90
|
|
run gemma_k8 "$GEMMA" 256 8 4 4000 -p "$PLONG"
|
|
settle 1
|
|
echo "ALL DONE"
|