#!/bin/bash # Cold-NVMe tier experiment on the laptop: purge the page cache before each configuration, open the checkpoint with F_NOCACHE, # compare demand loading with prefetch predictors at 16 and 32 slots on held-out prompts. Writes one JSONL (append-only). cd "$(dirname "$0")/../.." M=$(ls -d ~/.cache/huggingface/hub/models--mlx-community--OLMoE-1B-7B-0125-Instruct-4bit/snapshots/*) OUT=benchmarks/raw/gateC/cold_nvme_laptop/sweep.jsonl mkdir -p $(dirname $OUT) for cap in 16 32; do for cfg in "none 8" "transition 8" "transition2 8" "transition3 8" "prev_rank 16" "transition2 16"; do set -- $cfg; pr=$1; m=$2 echo "$SUDO_PW" | sudo -S purge 2>/dev/null; sleep 2 .venv/bin/python benchmarks/scripts/bench_decode.py --model $M --backend titan --capacity $cap --predictor $pr --m $m --nocache \ --traces benchmarks/raw/gateC/traces_olmoe_v2_laptop --families general,code,reasoning --split heldout --repeats 2 --max-tokens 64 \ --tag cold_nvme --out $OUT 2>&1 | grep -v Fetching | tail -2 done done echo DONE