docs+scripts: VRAM footprint account (ours vs vanilla), slots-footprint A/B job and static-tier identity job
docs/experiments/vram-footprint-5090.md: stage-by-stage account from the speedtrain-ab logs (882 MiB of the 2.27 GiB gap is driver rounding, 324 MiB a second token table, ~1 GiB the prompt/MoE/MTP side), the three reductions with estimated slots, the candidates not done, what is not verified. slots-footprint-ab.sh: base-noseed vs slots-noseed (and the alias arm, and a short ledger arm), 100 ms card sampler, FOOTPRINT.txt per run. slots-id.sh: replay with a static tier and an equal fixed slot count; the footprint changes must not move a logit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
521bfc91d5
commit
7823672f04
@@ -0,0 +1,214 @@
|
||||
#!/usr/bin/env bash
|
||||
# STRA-245 slots-footprint: paired A/B of the fixed-VRAM-footprint reductions (claude/slots-footprint) against the speed-train base, ours vs ours, seed OFF,
|
||||
# same harness, same frozen corpus, upstream ranked profile, alternating arms. HOLDER JOB (run on rnr5090 under the holder, like speedtrain-ab.sh, which this is a copy of). Install:
|
||||
# cp scripts/e2e/decode/slots-footprint-ab.sh /data/leleka-e2e/decode/dt/jobs/slots-footprint-ab.sh
|
||||
# queue stub (~/work/gpu-runs/holder2/jobs/slots-footprint-ab.sh): #!/usr/bin/env bash / exec bash /data/leleka-e2e/decode/dt/jobs/slots-footprint-ab.sh (+ one line in jobs/PRIORITY)
|
||||
# It takes /data/leleka-e2e/gpu.lock per arm (one arm at a time) and skips an arm when something else uses the GPU. ~12 min an arm; default 4 arms = 2 alternating pairs.
|
||||
#
|
||||
# ARMS="base-noseed slots-noseed base-noseed slots-noseed" bash slots-footprint-ab.sh # the order IS the repeat order; this is the default
|
||||
# ARMS="slots-ledger" bash slots-footprint-ab.sh # the per-call-site VRAM account of the new build (short session), no performance claim
|
||||
# ARMS="slots-embed-noseed base-noseed slots-embed-noseed" ... # the opt-in token-table alias (LELEKA_PROMPT_EMBED_ALIAS=1)
|
||||
#
|
||||
# Arms (the only variable between base and slots is the binary; both seed OFF as in the owner's baseline):
|
||||
# base-noseed ours, /data/leleka-e2e/decode/dt/bin-speedtrain (claude/speed-train 47d2d389), env of speedtrain-ab.sh seed OFF
|
||||
# slots-noseed ours, /data/leleka-e2e/decode/dt/bin-slots (claude/slots-footprint), same env, defaults of the new build (dense slabs ON, decode reserve 130 MiB)
|
||||
# slots-embed-noseed slots-noseed plus LELEKA_PROMPT_EMBED_ALIAS=1 (prompt-path token table aliased onto the mapped host copy: -324 MiB VRAM, -322 MiB pinned RAM; EXPERIMENTAL)
|
||||
# slots-ledger slots-noseed plus LELEKA_VRAM_LEDGER=1 and a short session (2 turns, ~60k tokens): the full allocation account; the ledger takes a backtrace per allocation, so this arm is never a performance arm
|
||||
# v-def vanilla Strata 0.2.6 as in speedtrain-ab.sh (not in the default ARMS)
|
||||
# Workload (the only valid one): the FROZEN corpus /data/leleka-e2e/decode/corpus/src/crates (MANIFEST.txt), 5 turns, target 245000 tokens, --max-output 300.
|
||||
# Validity per run (VALIDITY.txt): no turn failed, 5 turns, final-turn input tokens >= 200000, turn-5 window.ple mean < 5 ms (as speedtrain-ab.sh).
|
||||
# Footprint per run (FOOTPRINT.txt): the expert-cache slot count, the DBG vram lines (free after each opening stage, at decode, lowest note), the memory ledger table, the
|
||||
# dense-weights slab line, and the card's peak used memory from a 100 ms nvidia-smi sampler (gpumem.csv; nvidia-smi total 32607 MiB = CUDA total 32110 + 497).
|
||||
# Metric: per-turn decode_tok_s of the client, per-turn mean of the repeats, never a single run. Quality: the arms are greedy but the auto-sized caches differ in slot count, so
|
||||
# placement (and with it GPU-vs-CPU expert rounding) differs: the lossless claim is the static-tier identity job slots-id.sh at an equal fixed slot count, not these arms.
|
||||
set -uo pipefail
|
||||
D=/data/leleka-e2e/decode/dt
|
||||
LOCK=/data/leleka-e2e/gpu.lock
|
||||
OUTR=/data/leleka-e2e/runs/slots-footprint
|
||||
CORPUS=/data/leleka-e2e/decode/corpus/src/crates
|
||||
UP=/data/leleka-e2e/decode/assets/expert-profile-upstream.bin # ranked upstream profile; run-e2e.sh refuses any other digest
|
||||
ARMS=${ARMS:-"base-noseed slots-noseed base-noseed slots-noseed"}
|
||||
SESSION_ARGS="--turns 5 --target-tokens 245000 --max-output 300 --min-final-tokens 200000"
|
||||
for f in "$UP" "$D/tools/long-session.py" "$D/scripts/e2e/run-e2e.sh" "$D/bin-speedtrain/leleka-inference" "$D/bin-slots/leleka-inference" "$CORPUS/backend-api/src/lib.rs" \
|
||||
"$HOME/work/vanilla-strata/control/bin/strata" "$HOME/.config/strata/settings.json"; do
|
||||
[ -r "$f" ] || { echo "missing $f" >&2; exit 3; }
|
||||
done
|
||||
|
||||
ours() { # $1 tag, $2 arm
|
||||
local tag=$1 arm=$2 bin=bin-slots session="$SESSION_ARGS"
|
||||
case $arm in base-*) bin=bin-speedtrain ;; esac
|
||||
( export E2E_BIN=$D/$bin E2E_OUT=$OUTR/$tag
|
||||
mkdir -p "$E2E_OUT"
|
||||
export LELEKA_BRINGUP_TRACE=1 LELEKA_PREFIX_TRACE=1
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=auto E2E_GPU_BUDGET=32212254720
|
||||
export E2E_ENGINE_ARGS="--prefix-cache-mib auto --prefix-cache-tail reply --original-prefill-capacity 8192 --prefix-cache-block 8192 --spec-min-p 0"
|
||||
export E2E_SAMPLE_S=10 LELEKA_CHAIN=all
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE=$UP
|
||||
unset LELEKA_ORIGINAL_SERVE_SEED LELEKA_ORIGINAL_SERVE_SEED_MAX_ROWS LELEKA_SM120_ATTN_DAILY LELEKA_SM120_GU_SWIGLU LELEKA_SM120_SIDE_MIXER LELEKA_SM120_PERF
|
||||
export LELEKA_ORIGINAL_SERVE_SEED=off
|
||||
unset LELEKA_PROMPT_EMBED_ALIAS LELEKA_VRAM_LEDGER LELEKA_DENSE_SLAB
|
||||
case $arm in
|
||||
base-noseed|slots-noseed) ;;
|
||||
slots-embed-noseed) export LELEKA_PROMPT_EMBED_ALIAS=1 ;;
|
||||
slots-ledger) export LELEKA_VRAM_LEDGER=1; session="--turns 2 --target-tokens 60000 --max-output 100 --min-final-tokens 40000" ;;
|
||||
*) echo "unknown ours arm $arm" >&2; exit 2 ;;
|
||||
esac
|
||||
{ echo "arm=$arm tag=$tag"; date -u +%FT%TZ; free -g | sed -n 2p; sha256sum "$UP" "$E2E_BIN"/leleka-inference "$E2E_BIN"/leleka-daemon "$E2E_BIN"/leleka-cli "$E2E_BIN"/strata-next
|
||||
cat "$E2E_BIN/COMMIT.txt" 2>/dev/null; head -1 /data/leleka-e2e/decode/corpus/MANIFEST.txt
|
||||
env | grep -E '^(LELEKA_|STRATA_|E2E_)' | sort; } >"$E2E_OUT/env-arm.txt"
|
||||
export E2E_RUN_CMD="python3 -I $D/tools/long-session.py --src $CORPUS $session"
|
||||
( while sleep 5; do echo "$(date +%T) $(grep -E "SwapFree|MemAvailable|^Cached|Shmem:|Dirty" /proc/meminfo | tr -s " " | tr "
|
||||
" " ") $(head -1 /proc/pressure/io) $(head -1 /proc/pressure/memory) $(awk "/pswpin|pgmajfault/{printf \"%s=%s \",\$1,\$2}" /proc/vmstat)"; done > "$E2E_OUT/memsample.txt" 2>/dev/null ) & SAMP=$!
|
||||
( while true; do echo "$(date +%T.%N | cut -c1-12),$(nvidia-smi --query-gpu=memory.used,memory.total --format=csv,noheader,nounits)"; sleep 0.1; done > "$E2E_OUT/gpumem.csv" 2>/dev/null ) & GSAMP=$!
|
||||
bash "$D/scripts/e2e/run-e2e.sh" 2>&1 | grep -a -E "^\{|expert cache|request outcome|ready after|rc=|refus|error|Error|long_session|client exit" | cut -c1-300
|
||||
kill $SAMP $GSAMP 2>/dev/null
|
||||
echo "run-e2e done $tag $(date -u +%FT%TZ)" )
|
||||
}
|
||||
|
||||
vanilla() { # $1 tag
|
||||
local tag=$1
|
||||
local R=$OUTR/$tag; mkdir -p "$R"
|
||||
( export XDG_CONFIG_HOME=$R/xdg-config XDG_STATE_HOME=$R/xdg-state
|
||||
mkdir -p "$XDG_CONFIG_HOME/strata" "$XDG_STATE_HOME"
|
||||
cp ~/.config/strata/settings.json "$XDG_CONFIG_HOME/strata/"
|
||||
{ echo "arm=v-def tag=$tag"; date -u +%FT%TZ; free -g | sed -n 2p; head -1 /data/leleka-e2e/decode/corpus/MANIFEST.txt; env | grep -E '^(STRATA_|LELEKA_)' | sort; } > "$R/env.txt"
|
||||
( while sleep 5; do echo "$(date +%T) $(grep -E "SwapFree|MemAvailable|^Cached|Shmem:|Dirty" /proc/meminfo | tr -s " " | tr "
|
||||
" " ") $(head -1 /proc/pressure/io) $(head -1 /proc/pressure/memory) $(awk "/pswpin|pgmajfault/{printf \"%s=%s \",\$1,\$2}" /proc/vmstat)"; done > "$R/memsample.txt" 2>/dev/null ) & SAMP=$!
|
||||
S=$HOME/work/vanilla-strata/control/bin/strata
|
||||
cd "$HOME/work/vanilla-strata/control"
|
||||
T0=$(date +%s)
|
||||
timeout 2400 $S launch --model iq3_s --family qwen --model-path /home/para/leleka-gates/assets/model --context 256k --kv int8 --vision off --parallel 1 --tune skip --access local --port 8090 --no-api-key --no-tui --yes > "$R/launch.out" 2>&1
|
||||
echo "launch_rc=$? ready_wall_s=$(( $(date +%s) - T0 ))" >> "$R/env.txt"
|
||||
if curl -fs http://127.0.0.1:8090/v1/models > "$R/models.json"; then
|
||||
( while true; do echo "$(date +%T),$(nvidia-smi --query-gpu=temperature.gpu,utilization.gpu,power.draw,clocks.sm,memory.used --format=csv,noheader)" >> "$R/mon.csv"; sleep 5; done ) & MON=$!
|
||||
MODEL=$(python3 -c "import json;print(json.load(open('$R/models.json'))['data'][0]['id'])")
|
||||
E2E_BASE_URL=http://127.0.0.1:8090 E2E_MODEL=$MODEL E2E_API_KEY=none E2E_OUT_DIR=$R python3 -I $D/tools/long-session.py --src $CORPUS $SESSION_ARGS > "$R/client.log" 2>&1
|
||||
echo "session_rc=$?" >> "$R/env.txt"
|
||||
kill $MON 2>/dev/null
|
||||
cp "$XDG_STATE_HOME/strata/launch/iq3_s-256k.engine.log" "$R/engine.log"
|
||||
else
|
||||
echo "not ready" >> "$R/env.txt"
|
||||
fi
|
||||
$S launch --stop >> "$R/launch.out" 2>&1
|
||||
sleep 8
|
||||
kill $SAMP 2>/dev/null
|
||||
date -u +%FT%TZ >> "$R/env.txt"
|
||||
cut -c1-300 "$R/client.log" 2>/dev/null )
|
||||
}
|
||||
|
||||
footprint() { # $1 run dir, $2 arm kind: what the arm's VRAM looked like (the numbers the slot count and the reserve are judged by)
|
||||
local d=$1 kind=$2
|
||||
{ echo "== $(basename "$d")"
|
||||
if [ "$kind" = ours ]; then
|
||||
grep -a -E "expert cache [0-9]+ slots|DBG vram|DBG memory stage|dense weights:|leleka-vram-ledger|WARNING: the VRAM reserves|^ +[-+][0-9.]+ MiB req" "$d/inference.log" | cut -c1-330
|
||||
else
|
||||
grep -a -E "expert cache [0-9]+ slots|VRAM free|MiB of VRAM|prompt path borrows" "$d/engine.log" 2>/dev/null | cut -c1-300
|
||||
fi
|
||||
python3 -I - "$d" <<'PY'
|
||||
import csv, os, sys
|
||||
d = sys.argv[1]
|
||||
f = os.path.join(d, "gpumem.csv") if os.path.exists(os.path.join(d, "gpumem.csv")) else os.path.join(d, "mon.csv")
|
||||
used, total = [], 32607
|
||||
if os.path.exists(f):
|
||||
for row in csv.reader(open(f, errors="replace")):
|
||||
try:
|
||||
used.append(int(row[1].split()[0]))
|
||||
if len(row) > 2:
|
||||
total = int(row[2].split()[0])
|
||||
except Exception:
|
||||
pass
|
||||
if used:
|
||||
print("card peak used %d MiB of %d (nvidia-smi); lowest free %d MiB (CUDA free = this - 497); %d samples" % (max(used), total, total - max(used), len(used)))
|
||||
PY
|
||||
} > "$d/FOOTPRINT.txt" 2>&1
|
||||
tail -3 "$d/FOOTPRINT.txt" | cut -c1-200
|
||||
}
|
||||
|
||||
validity() { # $1 run dir, $2 arm kind (ours|vanilla)
|
||||
python3 -I - "$1" "$2" <<'PY'
|
||||
import json, os, re, sys
|
||||
d, kind = sys.argv[1], sys.argv[2]
|
||||
f = os.path.join(d, "long-session.json")
|
||||
verdict = "INVALID: no long-session.json"
|
||||
if os.path.exists(f):
|
||||
t = json.load(open(f))
|
||||
final = (t[-1].get("input_tokens") or 0) if t else 0
|
||||
if any("error" in r for r in t):
|
||||
verdict = "INVALID: a turn failed"
|
||||
elif os.path.basename(d).startswith("slots-ledger"):
|
||||
verdict = "LEDGER-ONLY (not a performance run): %d turns, final-turn input tokens %d" % (len(t), final)
|
||||
elif len(t) < 5 or final < 200000:
|
||||
verdict = "INVALID: %d turns, final-turn input tokens %d < 200000 (short corpus?)" % (len(t), final)
|
||||
else:
|
||||
verdict = "VALID: 5 turns, final-turn input tokens %d" % final
|
||||
if kind == "ours":
|
||||
wins, last = [], []
|
||||
for ln in open(os.path.join(d, "inference.log"), errors="replace"):
|
||||
if ln.startswith("DBG window "):
|
||||
last.append(dict((k, float(v)) for k, v in re.findall(r"(\w+)=([-\d.]+)", ln)))
|
||||
elif "leleka-serve request outcome" in ln:
|
||||
wins.append(last); last = []
|
||||
w = wins[-1] if wins else []
|
||||
ple = sum(x.get("ple", 0) for x in w) / max(len(w), 1)
|
||||
verdict += "; turn-5 window.ple mean %.2f ms over %d windows" % (ple, len(w))
|
||||
if not w:
|
||||
verdict = "INVALID: no turn-5 window lines (trace env missing?)"
|
||||
elif ple >= 5:
|
||||
verdict = "INVALID: turn-5 window.ple mean %.2f ms >= 5 ms (PLE scan back?)" % ple
|
||||
open(os.path.join(d, "VALIDITY.txt"), "w").write(verdict + "\n")
|
||||
print(os.path.basename(d), verdict)
|
||||
PY
|
||||
}
|
||||
|
||||
n=0
|
||||
for arm in $ARMS; do
|
||||
n=$((n + 1)); tag="$arm-r$n"
|
||||
got=0
|
||||
for _ in $(seq 1 1080); do
|
||||
if mkdir "$LOCK" 2>/dev/null; then echo "speedtrain-ab $tag $(date -u +%FT%TZ)" >"$LOCK/owner"; got=1; break; fi
|
||||
sleep 5
|
||||
done
|
||||
[ $got = 1 ] || { echo "GPU lock held by: $(cat $LOCK/owner 2>/dev/null)"; exit 3; }
|
||||
echo "=== $tag $(date -u +%FT%TZ)"; free -g | sed -n 2p
|
||||
if [ -n "$(nvidia-smi --query-compute-apps=pid --format=csv,noheader)" ]; then
|
||||
echo "GPU busy, skipping $tag"; rm -f "$LOCK/owner"; rmdir "$LOCK" 2>/dev/null; continue
|
||||
fi
|
||||
case $arm in
|
||||
v-def) vanilla "$tag"; kind=vanilla ;;
|
||||
base-noseed|slots-noseed|slots-embed-noseed|slots-ledger) ours "$tag" "$arm"; kind=ours ;;
|
||||
*) echo "unknown arm $arm" >&2; rm -f "$LOCK/owner"; rmdir "$LOCK" 2>/dev/null; exit 2 ;;
|
||||
esac
|
||||
validity "$OUTR/$tag" $kind
|
||||
footprint "$OUTR/$tag" $kind
|
||||
echo "arm done $tag $(date -u +%FT%TZ)"
|
||||
rm -f "$LOCK/owner"; rmdir "$LOCK" 2>/dev/null
|
||||
sleep 15
|
||||
done
|
||||
|
||||
# summary: decode tok/s per turn per VALID run, the per-turn mean of the repeats of each arm, and every ours arm against v-def (per turn and over turns 1-5)
|
||||
python3 -I - "$OUTR" <<'PY'
|
||||
import glob, json, os, statistics, sys
|
||||
root = sys.argv[1]
|
||||
runs = {}
|
||||
for d in sorted(glob.glob(os.path.join(root, "*"))):
|
||||
v = os.path.join(d, "VALIDITY.txt")
|
||||
if not os.path.exists(v) or not open(v).read().startswith("VALID"):
|
||||
print(os.path.basename(d), "not used:", open(v).read().strip() if os.path.exists(v) else "no VALIDITY.txt")
|
||||
continue
|
||||
t = json.load(open(os.path.join(d, "long-session.json")))
|
||||
runs[os.path.basename(d)] = [x.get("decode_tok_s") or 0.0 for x in t]
|
||||
for k, v in runs.items():
|
||||
print(k, " ".join("%.1f" % x for x in v), "mean %.1f" % statistics.mean(v))
|
||||
by = {}
|
||||
for k, v in runs.items():
|
||||
by.setdefault(k.rsplit("-r", 1)[0], []).append(v)
|
||||
mean = {a: [statistics.mean(c) for c in zip(*vs)] for a, vs in by.items()}
|
||||
for a, m in sorted(mean.items()):
|
||||
print("%s (%d runs) per-turn mean: %s all-turn mean %.1f" % (a, len(by[a]), " ".join("%.1f" % x for x in m), statistics.mean(m)))
|
||||
base = mean.get("base-noseed") or mean.get("v-def")
|
||||
if base:
|
||||
for a, m in sorted(mean.items()):
|
||||
if m is not base:
|
||||
print("%s minus the base per turn: %s mean %+.1f tok/s (%+.1f %%)" % (a, " ".join("%+.1f" % (x - y) for x, y in zip(m, base)),
|
||||
statistics.mean(m) - statistics.mean(base), 100 * (statistics.mean(m) / statistics.mean(base) - 1)))
|
||||
PY
|
||||
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
# STRA-245 slots-footprint: greedy/logprob identity gate of the fixed-VRAM-footprint reductions (claude/slots-footprint) against the speed-train base.
|
||||
# HOLDER JOB (copy of dt-id2.sh): teacher-forced replay of the 256k-class capture night5-long-256k (5 requests, recorded replies, decode capped at 48 tokens each), production shape,
|
||||
# top-16 logprobs of every row, STATIC tier (ADAPT_EVERY=0) and an EQUAL FIXED slot count (EXPERT_SLOTS=8000, per-layer sized: the cache is capped at 8000 x the largest blob,
|
||||
# which both builds can hold, so the placement is the same 11,xxx-independent quota in both). The footprint changes only move buffers; they must not move a single logit:
|
||||
# p1 base rt-speedtrain (claude/speed-train 47d2d389) two identical arms I1 I2 (the A/A noise floor, expected 0)
|
||||
# p2 slots rt-slots, defaults (dense slabs ON, decode reserve 130) two arms
|
||||
# p3 alias rt-slots + LELEKA_PROMPT_EMBED_ALIAS=1 (prompt table on the mapped host copy) two arms
|
||||
# Then q_pair across processes: every comparison must report 0 flips and max |dlogprob| 0 (bitwise): the kernels read the same bytes in the same order.
|
||||
# Install: cp scripts/e2e/decode/slots-id.sh /data/leleka-e2e/decode/dt/jobs/slots-id.sh; stub in ~/work/gpu-runs/holder2/jobs/slots-id.sh (exec bash that file); one line in jobs/PRIORITY.
|
||||
set -uo pipefail
|
||||
LOCK=/data/leleka-e2e/gpu.lock
|
||||
D=/data/leleka-e2e/decode/dt
|
||||
O=/data/leleka-e2e/runs/slots-footprint-id
|
||||
mkdir -p $O
|
||||
export LD_LIBRARY_PATH=$HOME/cuda-toolkits/cublas-12.9.1.4/lib:$HOME/cuda-toolkits/13.2.2/lib64:${LD_LIBRARY_PATH:-}
|
||||
A=$HOME/leleka-gates/assets
|
||||
G=$HOME/work/gpu-runs
|
||||
CAP=/data/leleka-e2e/sm120/capture
|
||||
export LELEKA_STRA169_KAR_PROVENANCE=$A/qwen-iq3-s-l2-v4.kar.provenance.json
|
||||
export LELEKA_STRA169_IQ3S_SHARD0=$A/model/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf
|
||||
export LELEKA_STRA169_IQ3S_SHARD1=$A/model/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf
|
||||
export LELEKA_STRA169_MTP_PACK=$A/data/mtp-rt LELEKA_STRA169_MTP_STAGING=$G/mtp-staging-own LELEKA_ORIGINAL_SERVE_BUDGET_GIB=30
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=yes LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.55
|
||||
export LELEKA_SMOKE_PROMPT_CACHE=0 LELEKA_SERVE_PROFILE=1 LELEKA_GRAPH_EXEC_REUSE=off
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE=/data/leleka-e2e/decode/assets/expert-profile-upstream.bin
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=8000 LELEKA_CHAIN=all
|
||||
export LELEKA_ORIGINAL_SERVE_ADAPT_EVERY=0 LELEKA_ORIGINAL_SERVE_SEED=off LELEKA_ORIGINAL_SERVE_CPU_WORKERS=1 LELEKA_SPEC=4 LELEKA_SPEC_SUFFIX=0
|
||||
sha256sum $D/rt-speedtrain $D/rt-slots
|
||||
shape="reply@8192/8192!orig!fast!nocluster!store!qpf!gpool!mspan"
|
||||
run() { # label bin extra-env arms
|
||||
BIN=$D/$2
|
||||
got=0
|
||||
for i in $(seq 1 1080); do
|
||||
if mkdir $LOCK 2>/dev/null; then echo "DEV slots-footprint identity $1 $(date -u +%FT%TZ)" >$LOCK/owner; got=1; break; fi
|
||||
sleep 5
|
||||
done
|
||||
[ $got = 1 ] || { echo "GPU lock held by: $(cat $LOCK/owner 2>/dev/null)"; return 3; }
|
||||
avail=$(awk '/MemAvailable/{print int($2/1048576)}' /proc/meminfo); echo "=== $1 bin=$2 extra=[$3] MemAvailable GiB: $avail"; free -g | sed -n 2,3p
|
||||
if [ "$avail" -lt 60 ]; then echo "abort: less than 60 GiB available"; rm -f $LOCK/owner; rmdir $LOCK; return 4; fi
|
||||
date -u +%FT%TZ
|
||||
env $3 LELEKA_ORIGINAL_SERVE_REPLAY=yes LELEKA_BRINGUP_TRACE=1 LELEKA_REPLAY_DIR=$CAP/night5-long-256k LELEKA_PREFIX_TRACE=1 LELEKA_REPLAY_PREFIX_MIB=6000 LELEKA_TRACE_PREFILL_R=1 LELEKA_TRACE_LOGPROBS=16 \
|
||||
LELEKA_REPLAY_MAX_NEW=48 LELEKA_REPLAY_FORCE=1 LELEKA_REPLAY_ARMS=$4 \
|
||||
nice -n 5 $BIN --ignored --exact --test-threads=1 --nocapture backend::original_serve_replay::original_serve_replay_smoke > $O/$1.full 2>&1
|
||||
echo "rc=$? label=$1"; date -u +%FT%TZ
|
||||
grep -a -E "^REPLAY|test result|panicked|FAILED|expert cache [0-9]+ slots|leleka-serve dense weights" $O/$1.full | cut -c1-300 | tail -10
|
||||
rm -f $LOCK/owner; rmdir $LOCK 2>/dev/null
|
||||
sleep 15
|
||||
}
|
||||
run idBase rt-speedtrain "LELEKA_X=1" "I1=$shape,I2=$shape"
|
||||
run idSlots rt-slots "LELEKA_X=1" "I1=$shape,I2=$shape"
|
||||
run idAlias rt-slots "LELEKA_PROMPT_EMBED_ALIAS=1" "I1=$shape,I2=$shape"
|
||||
T=$D/tools
|
||||
for p in idBase idSlots idAlias; do echo "== q_tail_gate $p"; python3 $T/q_tail_gate.py $O/$p.full $CAP/night5-long-256k 2>&1 | tail -12; done
|
||||
python3 - <<PY
|
||||
import sys
|
||||
sys.path.insert(0, "$T")
|
||||
import q_pair
|
||||
rows = {p: [q_pair.rows_of("$O/%s.full" % p, i) for i in (0, 1)] for p in ("idBase", "idSlots", "idAlias")}
|
||||
q_pair.compare(rows["idBase"][0], rows["idBase"][1], "base, arm1 against arm0 (A/A noise floor)")
|
||||
q_pair.compare(rows["idBase"][0], rows["idSlots"][0], "slots (slabs, reserve 130) against base, arm0")
|
||||
q_pair.compare(rows["idBase"][1], rows["idSlots"][1], "slots against base, arm1")
|
||||
q_pair.compare(rows["idBase"][0], rows["idAlias"][0], "slots + prompt-table alias against base, arm0")
|
||||
q_pair.compare(rows["idBase"][1], rows["idAlias"][1], "slots + prompt-table alias against base, arm1")
|
||||
PY
|
||||
sha256sum $O/*.full
|
||||
date -u +%FT%TZ
|
||||
Reference in New Issue
Block a user