Merge main into claude/speed-vs-strata-08143a
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> # Conflicts: # docs/experiments/step-ledger.md
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,183 @@
|
||||
#!/usr/bin/env bash
|
||||
# Codex + runtime + model comparison, vanilla Strata against Leleka, on the owner's two tasks (docs/experiments/codex-compare-5090.md). Test tooling, never in serving.
|
||||
#
|
||||
# ONE BLOCK = one stack start of one arm, then the warm-up cell and the requested cells of ONE repetition. A queue stub sets CMP_ARM / CMP_REPS / CMP_TASKS:
|
||||
# CMP_ARM=ours HOLDER JOB (inherits the sealed KAR memfd): the release package, `leleka up --foreground --kar-fd`, shipped configuration (KAR PLE, prefix cache auto / tail reply).
|
||||
# CMP_ARM=vanilla holder-free window payload (started by cmp_window.sh): vanilla Strata 0.2.6 launcher, shipped defaults (route tail skip and CPU prefill share ON).
|
||||
# CMP_VANILLA_LOSSY=0 turns both lossy defaults off (variant VANL instead of VAN).
|
||||
# CMP_TASKS ("ttt nestng-crm") CMP_OPTIONAL (tasks dropped, with a note, when not ready) CMP_REPS ("1") CMP_WALL (cell wall limit s, default 3000) CMP_ROUNDS (round cap, default 150) CMP_RUN (default $CMP/runs/main)
|
||||
# CMP_TARBALL (ours; default the final release package)
|
||||
# Cells: cell.py of the codex-lossy-delta study (logging proxy, temperature 0 injected for BOTH arms, real Codex CLI, task acceptance); no AGENTS.md pad: the sessions are what a
|
||||
# user gets. Output: $RUN/<VARIANT>/<task>-r<rep>/ (cell.json, proxy/, acceptance.log ...), $RUN/<VARIANT>/stack-r<rep>/. Variants: LEL = Leleka, VAN = vanilla shipped, VANL = vanilla lossless.
|
||||
set -uo pipefail
|
||||
ARM=${CMP_ARM:?CMP_ARM ours|vanilla}
|
||||
CMP=/data/leleka-e2e/codex-compare
|
||||
TASKS_ROOT=$CMP/tasks
|
||||
CELLPY=$CMP/delta/cell.py
|
||||
CODEX=/home/para/work/codex-e2e/bin/codex
|
||||
LOCK=/data/leleka-e2e/gpu.lock
|
||||
G=$HOME/work/gpu-runs
|
||||
A=/home/para/work/leleka/models/leleka-gates/assets
|
||||
CUBLAS=$HOME/cuda-toolkits/cublas-12.9.1.4/lib
|
||||
TASKS=${CMP_TASKS:-"ttt"}
|
||||
REPS=${CMP_REPS:-"1"}
|
||||
RUN=${CMP_RUN:-$CMP/runs/main}
|
||||
WALL=${CMP_WALL:-3000}; ROUNDS=${CMP_ROUNDS:-150}
|
||||
NODE_BIN=$(ls -d "$CMP"/toolchain/node-v*-linux-x64/bin 2>/dev/null | tail -1)
|
||||
NM=$CMP/nm
|
||||
case $ARM in ours) VAR=LEL;; vanilla) if [ "${CMP_VANILLA_LOSSY:-1}" = 1 ]; then VAR=VAN; else VAR=VANL; fi;; *) echo "bad CMP_ARM"; exit 2;; esac
|
||||
BLK=$(echo "$REPS" | tr ' ' '+')
|
||||
mkdir -p "$RUN" "$RUN/$VAR"
|
||||
exec > >(tee -a "$RUN/job-$VAR-r$BLK.log") 2>&1
|
||||
log() { echo "[cmp $VAR $(date -u +%T)] $*"; }
|
||||
note() { echo "[$(date -u +%FT%TZ)] [DEV codex-compare] $*" >>/data/leleka-e2e/decode/notes.md; }
|
||||
|
||||
# ---- guards ---------------------------------------------------------------------------------------------------------------------------------
|
||||
( cd "$CMP" && sha256sum --quiet -c INSTALL.sha256 ) || { echo "installed tools differ from INSTALL.sha256"; exit 3; }
|
||||
python3 -I "$CMP/delta/taskfile.py" check "$TASKS_ROOT" >"$RUN/tasks-check-$VAR-r$BLK.txt" 2>&1 || { echo "task files differ from their manifest"; cat "$RUN/tasks-check-$VAR-r$BLK.txt"; exit 3; }
|
||||
# a task listed in CMP_OPTIONAL that is not ready (not installed, or the Node toolchain not proven in the Codex sandbox) is DROPPED with a loud note instead of refusing the block
|
||||
nestng_ready() { [ -f "$TASKS_ROOT/nestng-crm/task.md" ] && [ -f "$CMP/toolchain/NESTNG_OK" ] && [ -d "$NM/backend/node_modules" ] && [ -d "$NM/frontend/node_modules" ]; }
|
||||
KEEP=""
|
||||
for t in $TASKS; do
|
||||
if [ "$t" = nestng-crm ] && ! nestng_ready; then
|
||||
case " ${CMP_OPTIONAL:-} " in *" $t "*) log "TASK DROPPED: $t is not ready (toolchain/NESTNG_OK missing)"; note "codex-compare block $VAR reps [$REPS]: task $t DROPPED (not ready); queue it again later"; continue;; esac
|
||||
echo "task $t is not ready (toolchain/NESTNG_OK, shared node_modules)"; exit 3
|
||||
fi
|
||||
[ -f "$TASKS_ROOT/$t/task.md" ] || { echo "task $t is not installed in $TASKS_ROOT"; exit 3; }
|
||||
KEEP="$KEEP $t"
|
||||
done
|
||||
TASKS=${KEEP# }
|
||||
[ -f "$TASKS_ROOT/smoke-mini/task.md" ] || { echo "task smoke-mini is not installed"; exit 3; }
|
||||
[ -x "$CODEX" ] || { echo "no codex binary"; exit 3; }
|
||||
[ -n "$NODE_BIN" ] && [ -x "$NODE_BIN/node" ] || { echo "no node toolchain under $CMP/toolchain"; exit 3; }
|
||||
STANDALONE=0; FD=${LELEKA_STRA169_KAR_FD:-}
|
||||
if [ "$ARM" = ours ]; then
|
||||
readlink "/proc/self/fd/$FD" 2>/dev/null | grep -q '^/memfd:' || { echo "ours needs the holder's sealed memfd"; exit 3; }
|
||||
[ -d "$G/MODEL.lock" ] || { echo "MODEL.lock is not held"; exit 3; }
|
||||
else
|
||||
mkdir "$G/MODEL.lock" 2>/dev/null || { echo "MODEL.lock is held (holder still up?)"; exit 3; }; STANDALONE=1
|
||||
fi
|
||||
got=0
|
||||
for _ in $(seq 1 4320); do
|
||||
if mkdir "$LOCK" 2>/dev/null; then echo "codex-compare $VAR $(date -u +%FT%TZ) $RUN" >"$LOCK/owner"; got=1; break; fi
|
||||
sleep 5
|
||||
done
|
||||
[ $got = 1 ] || { echo "GPU lock held by: $(cat $LOCK/owner 2>/dev/null)"; [ $STANDALONE = 1 ] && rmdir "$G/MODEL.lock"; exit 3; }
|
||||
SUP_PID=; MON_PID=
|
||||
stop_stack() {
|
||||
if [ -n "$SUP_PID" ] && kill -0 "$SUP_PID" 2>/dev/null; then kill -TERM "$SUP_PID" 2>/dev/null; for _ in $(seq 1 120); do kill -0 "$SUP_PID" 2>/dev/null || break; sleep 2; done; fi
|
||||
SUP_PID=
|
||||
}
|
||||
cleanup() {
|
||||
stop_stack
|
||||
[ -n "$MON_PID" ] && kill "$MON_PID" 2>/dev/null
|
||||
pkill -KILL -f "$CMP/ours-prefix-${CMP_OURS_TAG:-none}/bin/" 2>/dev/null
|
||||
if [ "$ARM" = vanilla ]; then ( cd "$HOME/work/vanilla-strata/control" && ./bin/strata launch --stop >/dev/null 2>&1 ); fi
|
||||
sleep 3
|
||||
rm -f "$LOCK/owner"; rmdir "$LOCK" 2>/dev/null
|
||||
[ $STANDALONE = 1 ] && rmdir "$G/MODEL.lock" 2>/dev/null
|
||||
note "codex-compare block $VAR reps [$REPS] ended: $RUN"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
note "codex-compare block $VAR started: $RUN tasks=[$TASKS] reps=[$REPS] wall=$WALL cap=$ROUNDS; holds gpu.lock"
|
||||
if [ -n "$(nvidia-smi --query-compute-apps=pid --format=csv,noheader 2>/dev/null)" ]; then echo "something uses the GPU"; exit 3; fi
|
||||
if pgrep -u "$USER" -x 'leleka-inference|strata-next|leleka-daemon' >/dev/null; then echo "a stack process exists"; exit 3; fi
|
||||
for p in 18766 18080 8081 8090; do ss -ltn "sport = :$p" 2>/dev/null | grep -q LISTEN && { echo "port $p in use"; exit 3; }; done
|
||||
export LD_LIBRARY_PATH=$CUBLAS:$HOME/cuda-toolkits/13.2.2/lib64:${LD_LIBRARY_PATH:-}
|
||||
# what the agent's shell sees, identical for both arms: Node on PATH, no analytics, caches in /tmp (the sandbox writes the workspace and /tmp only)
|
||||
export PATH=$NODE_BIN:$PATH NG_CLI_ANALYTICS=false npm_config_cache=/tmp/cmp-npm-cache npm_config_update_notifier=false npm_config_fund=false npm_config_audit=false CI=1
|
||||
{ date -u +%FT%TZ; uname -r; nvidia-smi --query-gpu=name,driver_version,power.limit --format=csv,noheader; free -g | sed -n 2p; uptime; $CODEX --version; node --version; sha256sum "$CODEX"; } | tee "$RUN/$VAR/host-r$BLK.txt"
|
||||
STK=$RUN/$VAR/stack-r$BLK; mkdir -p "$STK"
|
||||
nvidia-smi --query-gpu=timestamp,temperature.gpu,clocks.sm,clocks.mem,power.draw,utilization.gpu --format=csv -l 10 >"$STK/mon.csv" 2>/dev/null & MON_PID=$!
|
||||
|
||||
run_cells() { # $1 upstream url, $2 upstream model, $3 engine log, $4 api key ('' = none)
|
||||
local url=$1 model=$2 elog=$3 key=$4 rep task t1 rc list link
|
||||
for rep in $REPS; do
|
||||
list="smoke-mini $TASKS"
|
||||
[ $((rep % 2)) = 0 ] && list="smoke-mini $(echo $TASKS | tr ' ' '\n' | tac | tr '\n' ' ')" # task order alternates with the repetition
|
||||
for task in $list; do
|
||||
CELL=$RUN/$VAR/$task-r$rep; [ "$task" = smoke-mini ] && CELL=$RUN/$VAR/smoke-mini-r$((100 + rep))
|
||||
[ -f "$CELL/cell.json" ] && { log "cell $CELL already done: skipped"; continue; }
|
||||
link=""; [ "$task" = nestng-crm ] && link="--link-tree backend/node_modules=$NM/backend/node_modules --link-tree frontend/node_modules=$NM/frontend/node_modules"
|
||||
t1=$(date +%s)
|
||||
E2E_API_KEY=${key:-none} CLD_CODEX=$CODEX timeout $((WALL + 900)) python3 -I "$CELLPY" --cell-dir "$CELL" --variant "$VAR" --task "$task" --rep "$([ "$task" = smoke-mini ] && echo $((100 + rep)) || echo $rep)" \
|
||||
--tasks-root "$TASKS_ROOT" --upstream "$url" --upstream-model "$model" --codex-bin "$CODEX" --wall-limit "$WALL" --max-rounds "$ROUNDS" \
|
||||
--engine-log "$elog" --active-dir "$RUN/active-$VAR" --config-extra 'model_auto_compact_token_limit = 100000000' $link >"$CELL.out" 2>&1; rc=$?
|
||||
log "cell $VAR $task r$rep rc=$rc $(( $(date +%s) - t1 )) s: $(tail -1 "$CELL.out" | cut -c1-200)"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$ARM" = ours ]; then
|
||||
# ---- the release package, prepared ONCE into $CMP/ours-* (state, assets, prefix) and reused by every block ---------------------------------------
|
||||
TARBALL=${CMP_TARBALL:-/data/leleka-e2e/release-5090/leleka-0.1.0-17e372944279-5090-linux-x86_64.tar.xz}
|
||||
# CMP_OURS_TAG: package, state and prefix of THIS release only (the original script unpacked the tarball once into a shared ours-pkg and reused it for every later release: the 2026-11-12 stage 7 runs silently ran 17e372944279). Assets are shared (same files).
|
||||
TAGSUF=${CMP_OURS_TAG:?CMP_OURS_TAG (release commit) is required: a shared package directory serves a stale release}
|
||||
P=$CMP/ours-pkg-$TAGSUF; AS=$CMP/ours-assets; ST=$CMP/ours-state-$TAGSUF; PFX=$CMP/ours-prefix-$TAGSUF
|
||||
if [ ! -x "$P/bin/leleka" ]; then mkdir -p "$P" && tar -xJf "$TARBALL" -C "$P" --strip-components=1 || { echo "unpack failed"; exit 5; }; fi
|
||||
BIN=$P/bin
|
||||
# the package of this release must carry the commit of the tag: PROVENANCE.json (git_commit) inside the unpacked tarball; a binary built outside git prints "commit unknown" in
|
||||
python3 -I /data/leleka-e2e/prefill-latency/tools/prov_commit.py "$P/PROVENANCE.json" "$CMP_OURS_TAG" >/dev/null || { echo "package PROVENANCE git_commit does not match CMP_OURS_TAG=$CMP_OURS_TAG"; head -20 "$P/PROVENANCE.json"; exit 5; }
|
||||
log "package provenance: commit $(python3 -I /data/leleka-e2e/prefill-latency/tools/prov_commit.py $P/PROVENANCE.json), tarball sha256 $(sha256sum $TARBALL | cut -c1-16)"
|
||||
( cd "$P" && sha256sum --quiet -c SHA256SUMS && echo "SHA256SUMS ok" ); "$BIN/leleka" version | tee "$STK/version.txt"; sha256sum "$TARBALL" | tee -a "$STK/version.txt"
|
||||
if [ ! -e "$AS/model" ]; then
|
||||
mkdir -p "$AS/data"
|
||||
ln -s "$A/model" "$AS/model"; ln -s "$A/tokenizer-assets" "$AS/tokenizer-assets"; ln -s "$A/qwen-iq3-s-l2-v4.kar" "$AS/qwen-iq3-s-l2-v4.kar"
|
||||
cp "$A/qwen-iq3-s-l2-v4.kar.provenance.json" "$AS/qwen-iq3-s-l2-v4.kar.provenance.json"
|
||||
cp -al "$A/data/iq3_s" "$AS/data/iq3_s"; cp -al "$A/data/mtp-rt" "$AS/data/mtp-rt"
|
||||
fi
|
||||
COMMON="--assets $AS --state-dir $ST --prefix $PFX --bin-src $BIN --cublas-dir $CUBLAS --trust-archive --kar-fd $FD"
|
||||
if [ ! -f "$ST/leleka.json" ]; then timeout 3000 "$BIN/leleka" up --mode none $COMMON >"$STK/up-prepare.txt" 2>&1; log "up --mode none rc=$?"; fi
|
||||
[ -f "$ST/leleka.json" ] || { echo "up did not prepare the state"; tail -20 "$STK/up-prepare.txt"; exit 6; }
|
||||
log "leleka up --foreground (shipped configuration)"
|
||||
t0=$(date +%s)
|
||||
FLAGS=""
|
||||
if [ -n "${CMP_ARM_PROFILE_SET:-}${CMP_ARM_PROFILE_OFF:-}" ]; then
|
||||
# EXPERIMENTAL arm profile = the package profile with engine_env keys set / dropped (the built-in profile overrides the shell env since pkg-s14); proof = the "engine environment" line of up-foreground.txt
|
||||
"$BIN/leleka" profiles show "${CMP_PROFILE_NAME:-rtx5090-32g}" | PROF_OFF="${CMP_ARM_PROFILE_OFF:-}" PROF_SET="${CMP_ARM_PROFILE_SET:-}" python3 -I /data/leleka-e2e/prefill-latency/tools/profile_patch.py "$STK/arm-profile.json" && FLAGS="--profile $STK/arm-profile.json" || { echo "arm profile failed"; exit 6; }
|
||||
log "arm profile: off=[${CMP_ARM_PROFILE_OFF:-}] set=[${CMP_ARM_PROFILE_SET:-}]"
|
||||
fi
|
||||
setsid "$BIN/leleka" up --foreground $COMMON $FLAGS --timeout-s 1800 >"$STK/up-foreground.txt" 2>&1 &
|
||||
SUP_PID=$!
|
||||
ready=0
|
||||
for _ in $(seq 1 700); do
|
||||
if "$PFX/bin/leleka" status --state-dir "$ST" >/dev/null 2>&1; then ready=1; break; fi
|
||||
kill -0 "$SUP_PID" 2>/dev/null || break
|
||||
sleep 3
|
||||
done
|
||||
if [ $ready != 1 ]; then log "NOT READY after $(( $(date +%s) - t0 )) s"; tail -20 "$STK/up-foreground.txt" | cut -c1-240; exit 7; fi
|
||||
log "ready after $(( $(date +%s) - t0 )) s"
|
||||
echo "$(( $(date +%s) - t0 ))" >"$STK/ready_s.txt"
|
||||
"$PFX/bin/leleka" status --state-dir "$ST" >"$STK/status.txt" 2>&1; "$PFX/bin/leleka" status --state-dir "$ST" --json >"$STK/status.json" 2>&1
|
||||
"$PFX/bin/leleka" verify --quick --state-dir "$ST" --assets "$AS" >"$STK/verify-quick.txt" 2>&1
|
||||
KEY=$(cat "$ST/api-key")
|
||||
run_cells http://127.0.0.1:8081 qwen-iq3 "$ST/logs/engine.log" "$KEY"
|
||||
cp "$ST/logs/engine.log" "$STK/engine.log" 2>/dev/null; cp "$ST/logs/requests.log" "$STK/requests.log" 2>/dev/null
|
||||
"$PFX/bin/leleka" verify --quick --state-dir "$ST" --assets "$AS" >"$STK/verify-quick-end.txt" 2>&1
|
||||
stop_stack
|
||||
else
|
||||
# ---- vanilla Strata 0.2.6 (launcher + engine 0.1.50), shipped defaults unless CMP_VANILLA_LOSSY=0; state redirected into the run directory ----------
|
||||
export XDG_CONFIG_HOME=$STK/xdg-config XDG_STATE_HOME=$STK/xdg-state
|
||||
mkdir -p "$XDG_CONFIG_HOME/strata" "$XDG_STATE_HOME"; cp ~/.config/strata/settings.json "$XDG_CONFIG_HOME/strata/"
|
||||
if [ "${CMP_VANILLA_LOSSY:-1}" = 1 ]; then unset STRATA_ROUTE_TAIL_SKIP STRATA_PREFILL_CPU_SHARE; else export STRATA_ROUTE_TAIL_SKIP=0 STRATA_PREFILL_CPU_SHARE=0; fi
|
||||
unset STRATA_DECODE_TIMING STRATA_VERIFY_PROFILE
|
||||
S=$HOME/work/vanilla-strata/control/bin/strata
|
||||
{ sha256sum "$HOME/.local/share/strata/components/engine/0.1.50-linux-x86_64-cuda-cuda13/strata"; cat "$HOME/work/vanilla-strata/control/VERSION" "$HOME/work/vanilla-strata/control/COMMIT" 2>/dev/null; env | grep -E '^STRATA_' | sort; } >"$STK/env.txt"
|
||||
cd "$HOME/work/vanilla-strata/control"
|
||||
t0=$(date +%s)
|
||||
timeout 2400 "$S" launch --model iq3_s --family qwen --model-path "$A/model" --context 256k --kv int8 --vision off --parallel 1 --tune skip --access local --port 8090 --no-api-key --no-tui --yes >"$STK/launch.out" 2>&1
|
||||
log "vanilla launch rc=$? ready after $(( $(date +%s) - t0 )) s"
|
||||
echo "$(( $(date +%s) - t0 ))" >"$STK/ready_s.txt"
|
||||
if curl -fs http://127.0.0.1:8090/v1/models >"$STK/models.json"; then
|
||||
MODEL=$(python3 -c "import json;print(json.load(open('$STK/models.json'))['data'][0]['id'])")
|
||||
EL=$XDG_STATE_HOME/strata/launch/iq3_s-256k.engine.log
|
||||
run_cells http://127.0.0.1:8090 "$MODEL" "$EL" ""
|
||||
cp "$EL" "$STK/engine.log" 2>/dev/null
|
||||
grep -iE "route tail skip|CPU share" "$STK/engine.log" | head -4 >"$STK/lossy-lines.txt"
|
||||
else
|
||||
log "vanilla did not become ready"
|
||||
fi
|
||||
"$S" launch --stop >>"$STK/launch.out" 2>&1
|
||||
sleep 8
|
||||
fi
|
||||
log "done"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# BISECT: the five stage-set keys (LOAN_TIERS, DRAFT_CHECK_MERGE, PREFIX_PARK_FAST, DECODE_GRAPH_REUSE, STREAM_MIN) dropped from the profile. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 1. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-crm-release-02c784249a7e-stage-set-off
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="nestng-crm" CMP_REPS="1" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
export CMP_ARM_PROFILE_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN"
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# BISECT: the five stage-set keys (LOAN_TIERS, DRAFT_CHECK_MERGE, PREFIX_PARK_FAST, DECODE_GRAPH_REUSE, STREAM_MIN) dropped from the profile. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 2. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-crm-release-02c784249a7e-stage-set-off
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="nestng-crm" CMP_REPS="2" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
export CMP_ARM_PROFILE_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN"
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# BISECT: the five stage-set keys (LOAN_TIERS, DRAFT_CHECK_MERGE, PREFIX_PARK_FAST, DECODE_GRAPH_REUSE, STREAM_MIN) dropped from the profile. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 3. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-crm-release-02c784249a7e-stage-set-off
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="nestng-crm" CMP_REPS="3" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
export CMP_ARM_PROFILE_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN"
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# CPU-only: index and side-by-side report of the cells of crm-release-02c784249a7e-stage-set-off (LEL new, VAN/VANL saved)
|
||||
set -u
|
||||
C=/data/leleka-e2e/codex-compare; R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-crm-release-02c784249a7e-stage-set-off
|
||||
python3 -I $C/delta/index.py $R > $R/index.out 2>&1
|
||||
python3 -I $C/tools/cmp_report.py $R > $R/report.out 2>&1
|
||||
tail -40 $R/report.out
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Stage 7, DEFAULT profile. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 1. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-default
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="ttt nestng-crm" CMP_REPS="1" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Stage 7, DEFAULT profile. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 2. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-default
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="ttt nestng-crm" CMP_REPS="2" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Stage 7, DEFAULT profile. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 3. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-default
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="ttt nestng-crm" CMP_REPS="3" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# CPU-only: index and side-by-side report of the cells of ttt-and-crm-release-02c784249a7e-default (LEL new, VAN/VANL saved)
|
||||
set -u
|
||||
C=/data/leleka-e2e/codex-compare; R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-default
|
||||
python3 -I $C/delta/index.py $R > $R/index.out 2>&1
|
||||
python3 -I $C/tools/cmp_report.py $R > $R/report.out 2>&1
|
||||
tail -40 $R/report.out
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# EXPERIMENTAL candidate (quota=no, PCIe share 0.65); not the default. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 1. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-quota-no-pcie065-experimental
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="ttt nestng-crm" CMP_REPS="1" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
export CMP_ARM_PROFILE_SET="LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.65"
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# EXPERIMENTAL candidate (quota=no, PCIe share 0.65); not the default. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 2. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-quota-no-pcie065-experimental
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="ttt nestng-crm" CMP_REPS="2" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
export CMP_ARM_PROFILE_SET="LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.65"
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# EXPERIMENTAL candidate (quota=no, PCIe share 0.65); not the default. Release 02c784249a7e (CMP_OURS_TAG: own package, state and prefix directories; the earlier stage 7 / bisect / candidate runs of 2026-11-12 ran the STALE shared package 17e372944279 and are void), repetition 3. Saved vanilla cells (VAN, VANL) are symlinked and never re-run.
|
||||
unset CMP_ARM CMP_TASKS CMP_OPTIONAL CMP_REPS CMP_VANILLA_LOSSY CMP_WALL CMP_ROUNDS CMP_RUN CMP_TARBALL CMP_ARM_PROFILE_SET CMP_ARM_PROFILE_OFF CMP_OURS_TAG
|
||||
R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-quota-no-pcie065-experimental
|
||||
mkdir -p $R; for v in VAN VANL; do [ -e $R/$v ] || ln -s /data/leleka-e2e/codex-compare/runs/main/$v $R/$v; done
|
||||
export CMP_ARM=ours CMP_TASKS="ttt nestng-crm" CMP_REPS="3" CMP_RUN=$R CMP_OURS_TAG=02c784249a7e CMP_TARBALL=/data/leleka-e2e/prefill-latency/release-s20/leleka-0.1.0-02c784249a7e-linux-x86_64.tar.xz
|
||||
export CMP_ARM_PROFILE_SET="LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.65"
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/cmp_codex_job_profile.sh
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# CPU-only: index and side-by-side report of the cells of ttt-and-crm-release-02c784249a7e-quota-no-pcie065-experimental (LEL new, VAN/VANL saved)
|
||||
set -u
|
||||
C=/data/leleka-e2e/codex-compare; R=/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-02c784249a7e-quota-no-pcie065-experimental
|
||||
python3 -I $C/delta/index.py $R > $R/index.out 2>&1
|
||||
python3 -I $C/tools/cmp_report.py $R > $R/report.out 2>&1
|
||||
tail -40 $R/report.out
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""stdin: leleka profile JSON; env PROF_OFF / PROF_SET (space separated keys / KEY=VALUE); argv[1]: output file."""
|
||||
import json, os, sys
|
||||
p = json.load(sys.stdin)
|
||||
e = p["engine_env"]
|
||||
for k in os.environ.get("PROF_OFF", "").split():
|
||||
e.pop(k, None)
|
||||
for kv in os.environ.get("PROF_SET", "").split():
|
||||
k, v = kv.split("=", 1)
|
||||
e[k] = v
|
||||
json.dump(p, open(sys.argv[1], "w"), indent=1)
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""usage: prov_commit.py PROVENANCE.json [TAG]: prints git_commit; with TAG exits 1 unless it starts with TAG."""
|
||||
import json, sys
|
||||
c = json.load(open(sys.argv[1]))["git_commit"]
|
||||
print(c)
|
||||
sys.exit(0 if len(sys.argv) < 3 or c.startswith(sys.argv[2]) else 1)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# GROUP A/B of the EXPERIMENTAL placement candidate (quota=no + PCIe share 0.65) against the shipped default, on the pinned release 02c784249a7e (PROVENANCE git_commit, tarball sha256 254ea79f...).
|
||||
# Owner 2026-11-12: "measure first" before any decision about the default PCIe share. Engine configured for 262,144 context; the replayed Codex cell is VANL/nestng-crm-r2 (30 requests, same prompts every block).
|
||||
# A = the built-in profile as shipped (per-layer quota yes, PCIe share 0.45) QN = A + EXPERT_PER_LAYER=no + PCIE_FRAC=0.65 (profile keys, no tracing flag)
|
||||
# AT = A/A twin of A (same environment): the noise floor of the pairs A.k vs AT.k (k = 1..3)
|
||||
# Arm guard (pf_ab_job_q.sh): the engine-log meta line must show expert_per_layer / pcie_frac of the arm, else the block is marked INVALID.
|
||||
# Report: ab_report.py RUN_DIR A QN ; ab_report.py RUN_DIR A AT (A/A) ; min free VRAM from mon.csv (memory.free, 1 s samples) per block.
|
||||
unset PF_VARIANTS PF_CELLS PF_OUT PF_MAX PF_CLIENT PF_TEST_BIN PF_TEST_FILTERS PF_RELEASE_TAG PF_STATE PF_PREFIX
|
||||
export PF_PKG=/data/leleka-e2e/codex-compare/ours-pkg-02c784249a7e PF_RELEASE_TAG=02c784249a7e
|
||||
export PF_STATE=/data/leleka-e2e/prefill-latency/state-02c784249a7e PF_PREFIX=/data/leleka-e2e/prefill-latency/prefix-02c784249a7e
|
||||
export PF_VARIANTS="A.1 QN.1 AT.1 QN.2 A.2 AT.2 A.3 QN.3 AT.3 QN.4 A.4 A.5 QN.5" PF_MAX=30
|
||||
export PF_OUT=/data/leleka-e2e/prefill-latency/runs/host-tier-quota-no-pcie065-vs-default-release-group-ab-5-pairs
|
||||
exec bash /data/leleka-e2e/prefill-latency/tools/pf_ab_job_q.sh
|
||||
@@ -0,0 +1,176 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prefill fixed-latency A/B driver (docs/prefill-throughput.md, "Prefill fixed latency per request"): a copy of the speed program's spd_ab_job.sh
|
||||
# (scripts/e2e/codex/speed) that runs against its own package, state and prefix directories, so it never touches the codex-compare release state.
|
||||
# The SAME recorded Codex prompts are replayed through the packaged stack; a variant is named NAME or NAME.BLOCK (A.1 L.1 L.2 A.2 ...), BLOCK only names the output directory.
|
||||
# replay_hash.py (next to this file in the server tools dir) records the sha256 of each request's output.
|
||||
# HOLDER JOB (inherits the sealed KAR memfd). Test tooling, never in serving.
|
||||
# PF_VARIANTS space separated variant names (default "A L")
|
||||
# PF_CELLS recorded cells to replay, in order (default VANL/nestng-crm-r2 of the codex-compare run)
|
||||
# PF_OUT result directory (default $PL/runs/main)
|
||||
# PF_MAX requests per cell (default all)
|
||||
# PF_ROOT the task directory (default /data/leleka-e2e/prefill-latency): pkg/bin (binaries under test), state/, prefix/, tools/
|
||||
# PF_CLIENT the client script in the tools directory (default replay_hash.py; pf_probe.py = the empty-request probe of ledger rows A1-A3)
|
||||
# PF_PKG the package directory (default $PF_ROOT/pkg): bin/ and SHA256SUMS; lets a second build run next to the first
|
||||
# Variants (engine environment of the `leleka up` process):
|
||||
# A shipped (the prompt loan is the full 8192-row loan for every chunk)
|
||||
# L the prompt loan ladder: LELEKA_PREFILL_LOAN_TIERS=1 (a chunk of at most 512 / 2048 rows borrows and refills a smaller loan)
|
||||
# AR as A with LELEKA_TRACE_PREFILL_R=1: one PREFILL-R line (FNV-1a of every bit of the chunk's final residual) per chunk, the identity record
|
||||
# LR as L with LELEKA_TRACE_PREFILL_R=1
|
||||
# P as A with the step profile (LELEKA_SERVE_PROFILE=1: one `DBG profile request` line of host spans per request)
|
||||
# LP as L with the step profile
|
||||
# LT as L with the bring-up trace (LELEKA_BRINGUP_TRACE=1: the driver error behind a failed chunk)
|
||||
# C as A with the draft chain pipeline (LELEKA_DRAFT_CHAIN_PIPELINE=1: the chain steps enqueued back to back, one drain)
|
||||
# DT as A with LELEKA_TRACE_DRAFT=1 (the draft-round identity lines) MC draft check merge (LELEKA_DRAFT_CHECK_MERGE=1) MT = MC + DT MCP = MC + profile
|
||||
# RG decode graph reuse across requests (LELEKA_DECODE_GRAPH_REUSE=1) RGP = RG + profile RGT = RG + draft trace
|
||||
# GT prefill GDN tensor-core scan (LELEKA_PREFILL_GDN_TC=1, EXPERIMENTAL, lossy) GTP = GT + profile GTD = GT + draft trace
|
||||
# PF/PA parking fast / async (+P: with profile) X = chain pipeline + check merge + parking fast (the group of host/draft switches) XT = X + DT
|
||||
# CP as C with the step profile AP as A with the step profile (the pair for the host spans of the draft)
|
||||
set -uo pipefail
|
||||
PL=${PF_ROOT:-/data/leleka-e2e/prefill-latency}
|
||||
CMP=/data/leleka-e2e/codex-compare
|
||||
RUN=${PF_OUT:-$PL/runs/main}
|
||||
VARS=${PF_VARIANTS:-"A L"}
|
||||
MAXR=${PF_MAX:-0}
|
||||
CELLS=${PF_CELLS:-"$CMP/runs/main/VANL/nestng-crm-r2"}
|
||||
LOCK=/data/leleka-e2e/gpu.lock
|
||||
G=$HOME/work/gpu-runs
|
||||
CUBLAS=$HOME/cuda-toolkits/cublas-12.9.1.4/lib
|
||||
FD=${LELEKA_STRA169_KAR_FD:-}
|
||||
mkdir -p "$RUN"
|
||||
exec > >(tee -a "$RUN/job-$(date -u +%H%M%S).log") 2>&1
|
||||
log() { echo "[pf $(date -u +%T)] $*"; }
|
||||
note() { echo "[$(date -u +%FT%TZ)] [DEV prefill-latency] $*" >>/data/leleka-e2e/decode/notes.md; }
|
||||
readlink "/proc/self/fd/$FD" 2>/dev/null | grep -q '^/memfd:' || { echo "needs the holder's sealed memfd"; exit 3; }
|
||||
# Guard: the shipped profiles read only the PLE extents (~15 GiB, memfd_extents ple_only). A holder that sealed the whole archive (every holder window ends with the FULL
|
||||
# single-copy-holder.sh) makes `leleka up` refuse ("a second copy of model bytes") and inflates host memory. Allocated size of the inherited memfd, in GiB:
|
||||
ALLOC_GIB=$(( $(stat -L -c %b "/proc/self/fd/$FD") / 2097152 ))
|
||||
log "inherited memfd: $ALLOC_GIB GiB allocated"
|
||||
if [ "${PF_ALLOW_FULL_MEMFD:-0}" != 1 ] && [ "$ALLOC_GIB" -gt "${PF_MEMFD_MAX_GIB:-20}" ]; then
|
||||
# newest .running: stale ones of killed jobs exist
|
||||
JOBF=$(ls -t "$G"/holder2/jobs/*.running 2>/dev/null | head -1); JOBN=$(basename "${JOBF%.running}")
|
||||
[ -n "$JOBN" ] || { echo "memfd is not sparse and the queue entry of this job is unknown"; exit 3; }
|
||||
log "memfd is not sparse ($ALLOC_GIB GiB > ${PF_MEMFD_MAX_GIB:-20}): restarting the lab holder sparse and queueing $JOBN again"
|
||||
touch "$G/holder2/jobs/STOP"
|
||||
( eval "exec ${FD}>&-"; setsid nohup bash "$PL/tools/pf_sparse_requeue.sh" "$JOBN" > "$PL/window-requeue-$JOBN.launch" 2>&1 < /dev/null & )
|
||||
exit 0
|
||||
fi
|
||||
[ -d "$G/MODEL.lock" ] || { echo "MODEL.lock is not held"; exit 3; }
|
||||
PKG=${PF_PKG:-$PL/pkg}
|
||||
AS=$CMP/ours-assets; ST=${PF_STATE:-$PL/state}; PFX=${PF_PREFIX:-$PL/prefix}; BIN=$PKG/bin
|
||||
# release layout (PF_RELEASE_TAG=<12 hex>): the package is the unpacked release tarball, identity by PROVENANCE git_commit, state and prefix prepared here once
|
||||
if [ -n "${PF_RELEASE_TAG:-}" ]; then
|
||||
python3 -I "$PL/tools/prov_commit.py" "$PKG/PROVENANCE.json" "$PF_RELEASE_TAG" >/dev/null || { echo "package PROVENANCE git_commit does not match $PF_RELEASE_TAG"; exit 5; }
|
||||
(cd "$PKG" && sha256sum -c SHA256SUMS >/dev/null 2>&1) || { echo "the release files do not match $PKG/SHA256SUMS"; exit 5; }
|
||||
log "release package: commit $(python3 -I "$PL/tools/prov_commit.py" "$PKG/PROVENANCE.json" "$PF_RELEASE_TAG"), files verified against SHA256SUMS"
|
||||
if [ ! -f "$ST/leleka.json" ]; then mkdir -p "$ST" "$PFX"; timeout 3000 "$BIN/leleka" up --mode none --assets $AS --state-dir $ST --prefix $PFX --bin-src $BIN --cublas-dir $CUBLAS --trust-archive --kar-fd $FD >"$RUN/up-prepare.txt" 2>&1; log "up --mode none rc=$?"; fi
|
||||
fi
|
||||
[ -x "$BIN/leleka" ] && [ -f "$ST/leleka.json" ] || { echo "the prefill-latency package or state is not prepared"; exit 3; }
|
||||
[ -n "${PF_RELEASE_TAG:-}" ] || (cd "$BIN" && sha256sum -c ../SHA256SUMS >/dev/null 2>&1) || { echo "the package binaries do not match $PKG/SHA256SUMS"; exit 3; }
|
||||
got=0; for _ in $(seq 1 4320); do if mkdir "$LOCK" 2>/dev/null; then echo "prefill-latency $(date -u +%FT%TZ) $RUN" >"$LOCK/owner"; got=1; break; fi; sleep 5; done
|
||||
[ $got = 1 ] || { echo "GPU lock held by: $(cat $LOCK/owner 2>/dev/null)"; exit 3; }
|
||||
SUP_PID=; MON_PID=
|
||||
stop_stack() { if [ -n "$SUP_PID" ] && kill -0 "$SUP_PID" 2>/dev/null; then kill -TERM "$SUP_PID" 2>/dev/null; for _ in $(seq 1 120); do kill -0 "$SUP_PID" 2>/dev/null || break; sleep 2; done; fi; SUP_PID=; }
|
||||
cleanup() { stop_stack; [ -n "$MON_PID" ] && kill "$MON_PID" 2>/dev/null; pkill -KILL -f "$PFX/bin/" 2>/dev/null; sleep 3; rm -f "$LOCK/owner"; rmdir "$LOCK" 2>/dev/null; note "prefill-latency job ended: $RUN"; }
|
||||
trap cleanup EXIT
|
||||
note "prefill-latency job started: variants [$VARS] cells [$CELLS] out $RUN"
|
||||
[ -z "$(nvidia-smi --query-compute-apps=pid --format=csv,noheader 2>/dev/null)" ] || { echo "something uses the GPU"; exit 3; }
|
||||
export LD_LIBRARY_PATH=$CUBLAS:$HOME/cuda-toolkits/13.2.2/lib64:${LD_LIBRARY_PATH:-}
|
||||
COMMON="--assets $AS --state-dir $ST --prefix $PFX --bin-src $BIN --cublas-dir $CUBLAS --trust-archive --kar-fd $FD"
|
||||
for v in $VARS; do
|
||||
D=$RUN/$v; mkdir -p "$D"; vb=${v%%.*}
|
||||
[ -f "$D/replay.jsonl" ] && { log "variant $v already done: skipped"; continue; }
|
||||
unset LELEKA_PREFILL_LOAN_TIERS LELEKA_TRACE_PREFILL_R LELEKA_SERVE_PROFILE STRATA_VERIFY_PROFILE LELEKA_REFILL_DEFER LELEKA_BRINGUP_TRACE LELEKA_DRAFT_CHAIN_PIPELINE LELEKA_PREFIX_PARK_FAST LELEKA_PREFIX_PARK_ASYNC LELEKA_DRAFT_CHECK_MERGE LELEKA_TRACE_DRAFT LELEKA_PREFILL_GDN_TC LELEKA_DECODE_GRAPH_REUSE LELEKA_PREFILL_DIAG_SKIP_EXPERT_DMA LELEKA_PREFILL_ROUTE_TRACE STRATA_PREFILL_STREAM_MIN LELEKA_PREFILL_RING_PREFETCH LELEKA_PREFILL_RING_PREFETCH_WINDOW LELEKA_PREFILL_RING_PREFETCH_DETACH LELEKA_ORIGINAL_SERVE_PCIE_FRAC LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER LELEKA_ORIGINAL_SERVE_PCIE_MODE LELEKA_REFILL_BATCH LELEKA_REFILL_DEFER LELEKA_TRACE_DRIVER_ERRORS
|
||||
PROF_OFF=""; PROF_SET="" # profile engine_env keys to drop / set for this variant (the built-in profile OVERRIDES the shell env of the engine since pkg-s14)
|
||||
case $vb in
|
||||
A) ;; # = the built-in profile as shipped (checks merge, park fast, graph reuse, stream 1536, loan tiers are ON in it)
|
||||
L) export LELEKA_PREFILL_LOAN_TIERS=1;;
|
||||
AR) export LELEKA_TRACE_PREFILL_R=1;;
|
||||
LR) export LELEKA_PREFILL_LOAN_TIERS=1 LELEKA_TRACE_PREFILL_R=1;;
|
||||
P) export LELEKA_SERVE_PROFILE=1;;
|
||||
LP) export LELEKA_PREFILL_LOAN_TIERS=1 LELEKA_SERVE_PROFILE=1;;
|
||||
LT) export LELEKA_PREFILL_LOAN_TIERS=1 LELEKA_BRINGUP_TRACE=1;;
|
||||
C) export LELEKA_DRAFT_CHAIN_PIPELINE=1;;
|
||||
CP) export LELEKA_DRAFT_CHAIN_PIPELINE=1 LELEKA_SERVE_PROFILE=1;;
|
||||
AP) export LELEKA_SERVE_PROFILE=1;;
|
||||
SP1) export STRATA_PREFILL_STREAM_MIN=1024 LELEKA_SERVE_PROFILE=1;; # chunks of 1024+ rows use the expert stream (vanilla default)
|
||||
SP2) export STRATA_PREFILL_STREAM_MIN=256 LELEKA_SERVE_PROFILE=1;;
|
||||
SR) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_TRACE_PREFILL_R=1;;
|
||||
# the stream threshold of the 5090 profiles is part of the base for the prefetch and refill-batch arms
|
||||
FR) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_TRACE_PREFILL_R=1;;
|
||||
FP) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_SERVE_PROFILE=1;;
|
||||
PE) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_PREFILL_RING_PREFETCH=1 LELEKA_TRACE_PREFILL_R=1 LELEKA_TRACE_DRIVER_ERRORS=1;;
|
||||
PED) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_PREFILL_RING_PREFETCH=1 LELEKA_PREFILL_RING_PREFETCH_DETACH=1 LELEKA_TRACE_PREFILL_R=1 LELEKA_TRACE_DRIVER_ERRORS=1;;
|
||||
PEDP) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_PREFILL_RING_PREFETCH=1 LELEKA_PREFILL_RING_PREFETCH_DETACH=1 LELEKA_SERVE_PROFILE=1;;
|
||||
PEP) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_PREFILL_RING_PREFETCH=1 LELEKA_SERVE_PROFILE=1;;
|
||||
PET) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_PREFILL_RING_PREFETCH=1 LELEKA_TRACE_DRIVER_ERRORS=1 LELEKA_SERVE_PROFILE=1;;
|
||||
RB) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_REFILL_BATCH=1 LELEKA_TRACE_PREFILL_R=1;;
|
||||
RBP) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_REFILL_BATCH=1 LELEKA_SERVE_PROFILE=1;;
|
||||
SRP) export STRATA_PREFILL_STREAM_MIN=1536 LELEKA_SERVE_PROFILE=1;;
|
||||
APR) export LELEKA_SERVE_PROFILE=1 LELEKA_PREFILL_ROUTE_TRACE=1;;
|
||||
RG) export LELEKA_DECODE_GRAPH_REUSE=1;;
|
||||
RGP) export LELEKA_DECODE_GRAPH_REUSE=1 LELEKA_SERVE_PROFILE=1;;
|
||||
RGT) export LELEKA_DECODE_GRAPH_REUSE=1 LELEKA_TRACE_DRAFT=1;;
|
||||
GT) export LELEKA_PREFILL_GDN_TC=1;;
|
||||
GTP) export LELEKA_PREFILL_GDN_TC=1 LELEKA_SERVE_PROFILE=1;;
|
||||
GTD) export LELEKA_PREFILL_GDN_TC=1 LELEKA_TRACE_DRAFT=1;;
|
||||
DT) export LELEKA_TRACE_DRAFT=1;;
|
||||
MC) export LELEKA_DRAFT_CHECK_MERGE=1;;
|
||||
MT) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_TRACE_DRAFT=1;;
|
||||
MCP) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_SERVE_PROFILE=1;;
|
||||
X) export LELEKA_DRAFT_CHAIN_PIPELINE=1 LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1;;
|
||||
XT) export LELEKA_DRAFT_CHAIN_PIPELINE=1 LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_TRACE_DRAFT=1;;
|
||||
Y) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_DECODE_GRAPH_REUSE=1;;
|
||||
# the complete prefill/host set of the 5090 profiles: check merge + park fast + graph reuse + expert stream from 1536 rows
|
||||
Z) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_DECODE_GRAPH_REUSE=1 STRATA_PREFILL_STREAM_MIN=1536;;
|
||||
# V5/V7 probes (profiled, placement-class: CPU and GPU round an expert differently): PCIe share and PCIe mode
|
||||
# tier layout: vanilla fills the profile in global rank order, the 5090 profiles give every layer the same quota (254 slots); placement-class
|
||||
# candidate of the 2026-11-12 group A/B: per-layer quota off (global rank fill) + PCIe share 0.65, profile keys (no tracing flag: throughput arm); AT = the A/A twin of A (same environment)
|
||||
QN) PROF_SET="LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.65";;
|
||||
AT) ;;
|
||||
GLP) PROF_SET="LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no"; export LELEKA_SERVE_PROFILE=1;;
|
||||
# the stage-start state: the profile without the prefill/host set of this stage (loan tiers, check merge, park fast, graph reuse, stream 1536)
|
||||
A0) PROF_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN";;
|
||||
A0P) PROF_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN"; export LELEKA_SERVE_PROFILE=1;;
|
||||
Q55) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.55 LELEKA_SERVE_PROFILE=1;;
|
||||
Q65) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.65 LELEKA_SERVE_PROFILE=1;;
|
||||
Q75) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.75 LELEKA_SERVE_PROFILE=1;;
|
||||
Q35) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.35 LELEKA_SERVE_PROFILE=1;;
|
||||
QK) export LELEKA_ORIGINAL_SERVE_PCIE_MODE=kernel LELEKA_SERVE_PROFILE=1;;
|
||||
YP) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_DECODE_GRAPH_REUSE=1 STRATA_PREFILL_STREAM_MIN=1536 LELEKA_SERVE_PROFILE=1;;
|
||||
YRP) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_DECODE_GRAPH_REUSE=1 LELEKA_REFILL_DEFER=1 STRATA_PREFILL_STREAM_MIN=1536 LELEKA_SERVE_PROFILE=1;;
|
||||
DSP) export LELEKA_PREFILL_DIAG_SKIP_EXPERT_DMA=40000 LELEKA_SERVE_PROFILE=1;; # diagnostic, WRONG outputs: how much of moe.ring is bytes
|
||||
PF) export LELEKA_PREFIX_PARK_FAST=1;;
|
||||
PA) export LELEKA_PREFIX_PARK_FAST=1 LELEKA_PREFIX_PARK_ASYNC=1;;
|
||||
PFP) export LELEKA_PREFIX_PARK_FAST=1 LELEKA_SERVE_PROFILE=1;;
|
||||
PAP) export LELEKA_PREFIX_PARK_FAST=1 LELEKA_PREFIX_PARK_ASYNC=1 LELEKA_SERVE_PROFILE=1;;
|
||||
*) echo "unknown variant $v"; continue;;
|
||||
esac
|
||||
export LELEKA_SPEC_STATS=1
|
||||
PROFARG=""
|
||||
if [ -n "$PROF_OFF$PROF_SET" ]; then
|
||||
"$BIN/leleka" profiles show rtx5090-32g | PROF_OFF="$PROF_OFF" PROF_SET="$PROF_SET" python3 -I -c 'import json,os,sys; p=json.load(sys.stdin); e=p["engine_env"]; [e.pop(k,None) for k in os.environ["PROF_OFF"].split()]; [e.__setitem__(*kv.split("=",1)) for kv in os.environ["PROF_SET"].split()]; json.dump(p,open(sys.argv[1],"w"),indent=1)' "$D/profile.json" && PROFARG="--profile $D/profile.json"
|
||||
log "variant $v: profile override off=[$PROF_OFF] set=[$PROF_SET]"
|
||||
fi
|
||||
: >"$ST/logs/engine.log" 2>/dev/null
|
||||
nvidia-smi --query-gpu=timestamp,temperature.gpu,clocks.sm,clocks.mem,power.draw,utilization.gpu,memory.used,memory.free --format=csv -lms 1000 >"$D/mon.csv" 2>/dev/null & MON_PID=$!
|
||||
log "variant $v: leleka up --foreground"
|
||||
t0=$(date +%s)
|
||||
setsid "$BIN/leleka" up --foreground $COMMON $PROFARG --timeout-s 1800 >"$D/up-foreground.txt" 2>&1 &
|
||||
SUP_PID=$!
|
||||
ready=0
|
||||
for _ in $(seq 1 700); do "$PFX/bin/leleka" status --state-dir "$ST" >/dev/null 2>&1 && { ready=1; break; }; kill -0 "$SUP_PID" 2>/dev/null || break; sleep 3; done
|
||||
[ $ready = 1 ] || { log "variant $v NOT READY"; tail -20 "$D/up-foreground.txt" | cut -c1-240; stop_stack; kill "$MON_PID" 2>/dev/null; continue; }
|
||||
log "ready after $(( $(date +%s) - t0 )) s"
|
||||
"$PFX/bin/leleka" status --state-dir "$ST" --json >"$D/status.json" 2>&1
|
||||
args=(); for c in $CELLS; do args+=(--cell "$c"); done
|
||||
python3 -I "$PL/tools/${PF_CLIENT:-replay_hash.py}" "${args[@]}" --url http://127.0.0.1:8081 --model qwen-iq3 --key-file "$ST/api-key" --out "$D/replay.jsonl" --max-requests "$MAXR" >"$D/replay.out" 2>&1
|
||||
log "replay rc=$? $(wc -l <"$D/replay.jsonl") requests"
|
||||
cp "$ST/logs/engine.log" "$D/engine.log" 2>/dev/null; cp "$ST/logs/requests.log" "$D/requests.log" 2>/dev/null
|
||||
# arm guard (placement arms): the meta line of the engine log must show the share and the layout this arm asked for; a mismatch marks the block INVALID
|
||||
META=$(grep -a "leleka-serve meta" "$D/engine.log" | tail -1 | grep -o "expert_per_layer=[0-9]* expert_profile=[0-9]* pcie_frac=[0-9.]*")
|
||||
case $vb in QN) WANT="expert_per_layer=0 expert_profile=1 pcie_frac=0.65";; A|AT) WANT="expert_per_layer=1 expert_profile=1 pcie_frac=0.45";; *) WANT="";; esac
|
||||
echo "$META" >"$D/arm-meta.txt"; if [ -n "$WANT" ] && [ "$META" != "$WANT" ]; then log "variant $v INVALID (arm guard): engine got [$META], arm wants [$WANT]"; touch "$D/INVALID"; else log "variant $v arm guard ok: $META"; fi
|
||||
stop_stack; kill "$MON_PID" 2>/dev/null; MON_PID=
|
||||
sleep 5
|
||||
done
|
||||
log "done"
|
||||
@@ -73,8 +73,9 @@ for v in $VARS; do
|
||||
D=$RUN/$v; mkdir -p "$D"; vb=${v%%.*}
|
||||
[ -f "$D/replay.jsonl" ] && { log "variant $v already done: skipped"; continue; }
|
||||
unset LELEKA_PREFILL_LOAN_TIERS LELEKA_TRACE_PREFILL_R LELEKA_SERVE_PROFILE STRATA_VERIFY_PROFILE LELEKA_REFILL_DEFER LELEKA_BRINGUP_TRACE LELEKA_DRAFT_CHAIN_PIPELINE LELEKA_PREFIX_PARK_FAST LELEKA_PREFIX_PARK_ASYNC LELEKA_DRAFT_CHECK_MERGE LELEKA_TRACE_DRAFT LELEKA_PREFILL_GDN_TC LELEKA_DECODE_GRAPH_REUSE LELEKA_PREFILL_DIAG_SKIP_EXPERT_DMA LELEKA_PREFILL_ROUTE_TRACE STRATA_PREFILL_STREAM_MIN LELEKA_PREFILL_RING_PREFETCH LELEKA_PREFILL_RING_PREFETCH_WINDOW LELEKA_PREFILL_RING_PREFETCH_DETACH LELEKA_ORIGINAL_SERVE_PCIE_FRAC LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER LELEKA_ORIGINAL_SERVE_PCIE_MODE LELEKA_REFILL_BATCH LELEKA_REFILL_DEFER LELEKA_TRACE_DRIVER_ERRORS
|
||||
PROF_OFF=""; PROF_SET="" # profile engine_env keys to drop / set for this variant (the built-in profile OVERRIDES the shell env of the engine since pkg-s14)
|
||||
case $vb in
|
||||
A) ;;
|
||||
A) ;; # = the built-in profile as shipped (checks merge, park fast, graph reuse, stream 1536, loan tiers are ON in it)
|
||||
L) export LELEKA_PREFILL_LOAN_TIERS=1;;
|
||||
AR) export LELEKA_TRACE_PREFILL_R=1;;
|
||||
LR) export LELEKA_PREFILL_LOAN_TIERS=1 LELEKA_TRACE_PREFILL_R=1;;
|
||||
@@ -116,8 +117,13 @@ for v in $VARS; do
|
||||
Z) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_DECODE_GRAPH_REUSE=1 STRATA_PREFILL_STREAM_MIN=1536;;
|
||||
# V5/V7 probes (profiled, placement-class: CPU and GPU round an expert differently): PCIe share and PCIe mode
|
||||
# tier layout: vanilla fills the profile in global rank order, the 5090 profiles give every layer the same quota (254 slots); placement-class
|
||||
GLP) export LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no LELEKA_SERVE_PROFILE=1;;
|
||||
GLP) PROF_SET="LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no"; export LELEKA_SERVE_PROFILE=1;;
|
||||
# the stage-start state: the profile without the prefill/host set of this stage (loan tiers, check merge, park fast, graph reuse, stream 1536)
|
||||
A0) PROF_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN";;
|
||||
A0P) PROF_OFF="LELEKA_PREFILL_LOAN_TIERS LELEKA_DRAFT_CHECK_MERGE LELEKA_PREFIX_PARK_FAST LELEKA_DECODE_GRAPH_REUSE STRATA_PREFILL_STREAM_MIN"; export LELEKA_SERVE_PROFILE=1;;
|
||||
Q55) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.55 LELEKA_SERVE_PROFILE=1;;
|
||||
Q65) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.65 LELEKA_SERVE_PROFILE=1;;
|
||||
Q75) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.75 LELEKA_SERVE_PROFILE=1;;
|
||||
Q35) export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.35 LELEKA_SERVE_PROFILE=1;;
|
||||
QK) export LELEKA_ORIGINAL_SERVE_PCIE_MODE=kernel LELEKA_SERVE_PROFILE=1;;
|
||||
YP) export LELEKA_DRAFT_CHECK_MERGE=1 LELEKA_PREFIX_PARK_FAST=1 LELEKA_DECODE_GRAPH_REUSE=1 STRATA_PREFILL_STREAM_MIN=1536 LELEKA_SERVE_PROFILE=1;;
|
||||
@@ -130,11 +136,16 @@ for v in $VARS; do
|
||||
*) echo "unknown variant $v"; continue;;
|
||||
esac
|
||||
export LELEKA_SPEC_STATS=1
|
||||
PROFARG=""
|
||||
if [ -n "$PROF_OFF$PROF_SET" ]; then
|
||||
"$BIN/leleka" profiles show rtx5090-32g | PROF_OFF="$PROF_OFF" PROF_SET="$PROF_SET" python3 -I -c 'import json,os,sys; p=json.load(sys.stdin); e=p["engine_env"]; [e.pop(k,None) for k in os.environ["PROF_OFF"].split()]; [e.__setitem__(*kv.split("=",1)) for kv in os.environ["PROF_SET"].split()]; json.dump(p,open(sys.argv[1],"w"),indent=1)' "$D/profile.json" && PROFARG="--profile $D/profile.json"
|
||||
log "variant $v: profile override off=[$PROF_OFF] set=[$PROF_SET]"
|
||||
fi
|
||||
: >"$ST/logs/engine.log" 2>/dev/null
|
||||
nvidia-smi --query-gpu=timestamp,temperature.gpu,clocks.sm,clocks.mem,power.draw,utilization.gpu --format=csv -l 10 >"$D/mon.csv" 2>/dev/null & MON_PID=$!
|
||||
log "variant $v: leleka up --foreground"
|
||||
t0=$(date +%s)
|
||||
setsid "$BIN/leleka" up --foreground $COMMON --timeout-s 1800 >"$D/up-foreground.txt" 2>&1 &
|
||||
setsid "$BIN/leleka" up --foreground $COMMON $PROFARG --timeout-s 1800 >"$D/up-foreground.txt" 2>&1 &
|
||||
SUP_PID=$!
|
||||
ready=0
|
||||
for _ in $(seq 1 700); do "$PFX/bin/leleka" status --state-dir "$ST" >/dev/null 2>&1 && { ready=1; break; }; kill -0 "$SUP_PID" 2>/dev/null || break; sleep 3; done
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "rtx5090-32g-quota-no-pcie065-experimental",
|
||||
"description": "EXPERIMENTAL, NOT A DEFAULT (ledger H4/V5/V7, owner word needed). rtx5090-32g with the global rank fill of the expert tier (EXPERT_PER_LAYER=no, vanilla layout) and PCIe share 0.65. Placement-class: p99/flip rate inside the Original envelope, max d_top1 outside (0.65), 256k VRAM floor of the candidate not yet measured. Use only as `leleka up --profile FILE`. Base description: RTX 5090 class server (sm_120, 32 GB VRAM, >= 100 GiB RAM). Single copy of every model byte in host RAM: the 50 GB routed-expert bank is the one page-locked RAM copy (from GGUF shard 0), and of the 55 GB level-2 KAR archive only the 16.0 GB the serve path reads (the PLE rows, 2 extents) is copied once into a sealed sparse memfd (memfd_extents ple_only: holes elsewhere, verified against the pinned digest of the extents), read O_DIRECT so no page-cache copy remains. Reference-equivalent agent configuration (docs/e2e-run.md 7d; GPU budget 32,819,404,800 B (31,299 MiB) since the dense-slab commits, was 30 GiB: the slab saves physical bytes the Context never counted, so the budget must rise by about that much for the slot gain to appear, docs/experiments/vram-footprint-5090.md; expert tier auto-sized per layer from data/expert-profile.bin, adaptive speculative window with spec-min-p 0, MTP draft vocabulary, prefix cache 6144 MiB (explicit cap: what `auto` resolves to on this host, 5.7-6.1 GiB; unlike `auto` it cannot grow when RAM is freed) with request-end checkpoints (reply), chain kernels): no speed claim is made in this text (the paired 245k series against vanilla Strata is docs/experiments/baseline-pair-5090.md). Prompt chunk and prefix-cache grid 8192 (paired 256k session on the 5090: TTFT sum 131 s at 2048 against 55-60 s at 8192, docs/upstream-port-plan.md). Prompt-routing seed OFF (engine_env LELEKA_ORIGINAL_SERVE_SEED=off, placement class, owner to confirm; docs/experiments/decode-tail-5090.md: +27 % decode at 45k-247k prompts). MTP draft attention = upstream pre75 chunk + merge v2 (engine_env LELEKA_SM120_ATTN_DAILY_MTP=1, bitwise identical on the replay gate, draft round 0.29 ms and whole round 0.37 ms shorter at 245k, docs/experiments/draft-round-5090.md). Main attention and gate/up SwiGLU sm_120 kernels on (engine_env LELEKA_SM120_ATTN_DAILY=1, LELEKA_SM120_GU_SWIGLU=1: bitwise identical on the teacher-forced gate, decode +1.85 % paired, docs/experiments/codex-compare-speed-gap.md). GDN gates and gate projection on two side streams of the verify graph (engine_env LELEKA_SM120_SIDE_MIXER=1: identical top-16 logprob rows and draft trace on the teacher-forced gate, decode +1.39 % paired, CI +0.46..+2.32 %, docs/experiments/step-ledger.md V3a). QSA indexer/query chains (LELEKA_SM120_SIDE_QSA=1, mixer phase of a QSA layer -14.8 us) and the shared expert (LELEKA_SM120_SIDE_SHARED=1, doorbell to first expert 27.6 -> 10.9 us) on side streams too: identical rows and draft trace, section deltas in step-ledger.md V3b/V4a. Not a formally quality-gated profile.",
|
||||
"select": {
|
||||
"sm_min": 120,
|
||||
"sm_max": 130,
|
||||
"vram_mib_min": 30000,
|
||||
"vram_mib_max": 1000000
|
||||
},
|
||||
"gpu_budget_bytes": 32819404800,
|
||||
"spec_min_p": 0.0,
|
||||
"expert_profile": "data/expert-profile.bin",
|
||||
"context_tokens": 262144,
|
||||
"prefill_capacity": 8192,
|
||||
"kar_source": "memfd",
|
||||
"memfd_extents": "ple_only",
|
||||
"expert_source": "resident",
|
||||
"min_driver_major": 595,
|
||||
"min_vram_total_mib": 30000,
|
||||
"min_ram_total_bytes": 107374182400,
|
||||
"min_ram_available_bytes": 113000000000,
|
||||
"engine_env": {
|
||||
"LELEKA_PREFILL_LOAN_TIERS": "1",
|
||||
"LELEKA_DRAFT_CHECK_MERGE": "1",
|
||||
"LELEKA_PREFIX_PARK_FAST": "1",
|
||||
"LELEKA_DECODE_GRAPH_REUSE": "1",
|
||||
"STRATA_PREFILL_STREAM_MIN": "1536",
|
||||
"LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER": "no",
|
||||
"LELEKA_CHAIN": "all",
|
||||
"LELEKA_ORIGINAL_SERVE_SEED": "off",
|
||||
"LELEKA_SM120_ATTN_DAILY_MTP": "1",
|
||||
"LELEKA_SM120_ATTN_DAILY": "1",
|
||||
"LELEKA_SM120_GU_SWIGLU": "1",
|
||||
"LELEKA_SM120_SIDE_MIXER": "1",
|
||||
"LELEKA_SM120_SIDE_QSA": "1",
|
||||
"LELEKA_SM120_SIDE_SHARED": "1",
|
||||
"LELEKA_SM120_FUSED_QSA_PRELUDE": "1",
|
||||
"LELEKA_DRAFT_FUSED_COMMIT": "1",
|
||||
"LELEKA_SM120_COMBINE_VEC4": "1",
|
||||
"LELEKA_SM120_DOWN_SUB16": "1",
|
||||
"LELEKA_SM120_HITS_IN_COMBINE": "1",
|
||||
"LELEKA_ORIGINAL_SERVE_PCIE_FRAC": "0.65"
|
||||
},
|
||||
"memory": {
|
||||
"prefix_cache_mib": "6144",
|
||||
"prefix_cache_tail": "reply",
|
||||
"prefix_cache_block": 8192,
|
||||
"soft_floor_mib": 4096,
|
||||
"hard_floor_mib": 2048,
|
||||
"reserve_mib": 2048,
|
||||
"lock": "try",
|
||||
"heal": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user