e2e: reference-equivalent Codex rerun jobs (943c/945c) and replay arms job 948

This commit is contained in:
Pavlo Ratushnyi
2026-10-23 19:30:23 +02:00
parent 706020f44b
commit 0e9eab62f7
3 changed files with 71 additions and 0 deletions
@@ -0,0 +1,21 @@
set -uo pipefail
# claude/e2e (rerun with the reference-equivalent config, auto expert cache + spec-min-p 0.5): the real Codex CLI (0.163.0) writes a Three.js tic-tac-toe game (rerun after the 32768 output cap) against the production stack
# (leleka-inference Original serve, default conversation cache, behind strata-next). Profiling on, engine log kept.
export E2E_BIN=$HOME/work/leleka-e2e/bin-sm120
export E2E_OUT=$HOME/work/leleka-e2e/runs/943c-codex-ttt
export CODEX_TIMEOUT_S=5400
export LELEKA_BRINGUP_TRACE=1 # PREFILL-PROFILE / round lines in the engine log
# reference-equivalent engine configuration (the vanilla Strata Codex runs): automatic per-layer expert cache with the 98x/990 profile,
# --spec-min-p 0.5 (MTP depth 4 is the Original's default), INT8 K+V 32768 resident cells (default), adaptive tier, seed default; the gpu budget
# the way the 98x/99x auto-cache jobs did (30 GiB), so the auto-sized cache has the free VRAM the Original had
export LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=auto E2E_GPU_BUDGET=32212254720
export E2E_ENGINE_ARGS="--spec-min-p 0.5"
export E2E_SAMPLE_S=10
export LELEKA_CAPTURE_DIR=$HOME/work/codex-e2e/capture/943c-codex-ttt # PRIVATE: prompt + generated token ids of every request, for offline replay (never in Git) # RSS / VRAM / MemAvailable every 10 s
export E2E_STATUS_FILE=$HOME/work/codex-e2e/STATUS.txt
export E2E_RUN_CMD="bash $HOME/work/leleka-e2e/scripts/e2e/codex/run-codex.sh ttt"
rm -rf $E2E_OUT $LELEKA_CAPTURE_DIR
date -u +%FT%TZ; sha256sum $E2E_BIN/* $HOME/work/codex-e2e/bin/codex $HOME/work/codex-e2e/vendor/three.module.min.js
bash $HOME/work/leleka-e2e/scripts/e2e/run-e2e.sh
echo "run-e2e rc=$?"
date -u +%FT%TZ
@@ -0,0 +1,21 @@
set -uo pipefail
# claude/e2e (rerun with the reference-equivalent config, auto expert cache + spec-min-p 0.5): the real Codex CLI (0.163.0) builds a CRM (Python stdlib + SQLite) with the PREFIX CACHE on (--prefix-cache-mib auto,
# replaces the conversation cache). Long-horizon session; profiling on, engine log kept.
export E2E_BIN=$HOME/work/leleka-e2e/bin-sm120
export E2E_OUT=$HOME/work/leleka-e2e/runs/945c-codex-crm
export CODEX_TIMEOUT_S=10200
export LELEKA_BRINGUP_TRACE=1 LELEKA_PREFIX_TRACE=1
# reference-equivalent engine configuration (the vanilla Strata Codex runs): automatic per-layer expert cache with the 98x/990 profile,
# --spec-min-p 0.5 (MTP depth 4 is the Original's default), INT8 K+V 32768 resident cells (default), adaptive tier, seed default; the gpu budget
# the way the 98x/99x auto-cache jobs did (30 GiB), so the auto-sized cache has the free VRAM the Original had
export LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=auto E2E_GPU_BUDGET=32212254720
export E2E_ENGINE_ARGS="--prefix-cache-mib auto --spec-min-p 0.5"
export E2E_SAMPLE_S=10
export LELEKA_CAPTURE_DIR=$HOME/work/codex-e2e/capture/945c-codex-crm # PRIVATE: prompt + generated token ids of every request, for offline replay (never in Git)
export E2E_STATUS_FILE=$HOME/work/codex-e2e/STATUS.txt
export E2E_RUN_CMD="bash $HOME/work/leleka-e2e/scripts/e2e/codex/run-codex.sh crm"
rm -rf $E2E_OUT $LELEKA_CAPTURE_DIR
date -u +%FT%TZ; sha256sum $E2E_BIN/* $HOME/work/codex-e2e/bin/codex
bash $HOME/work/leleka-e2e/scripts/e2e/run-e2e.sh
echo "run-e2e rc=$?"
date -u +%FT%TZ
@@ -0,0 +1,29 @@
set -uo pipefail
# claude/e2e: replay of the first 30 requests (context 9k -> ~45k) of the real tic-tac-toe Codex session (capture 943b, conversation cache), four configurations
# on the head build: expert tier 2048 slots vs auto-sized (per layer, profile of the 98x jobs), spec_min_p 0 (shipped default) vs 0.5 (the reference runs).
# Each arm is one process (model load ~7 min). Prints REPLAY SUMMARY weighted_decode_tok_s, tokens per round (rounds, tokens) and tier shares.
A=$HOME/leleka-gates/assets; G=$HOME/work/gpu-runs
export LD_LIBRARY_PATH=$HOME/cuda-toolkits/cublas-12.9.1.4/lib:$HOME/cuda-toolkits/13.2.2/lib64:${LD_LIBRARY_PATH:-}
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
export LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=yes LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.55
export LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE=$G/baseline/profile.bin LELEKA_GRAPH_EXEC_REUSE=off LELEKA_SERVE_PROFILE=1
export LELEKA_ORIGINAL_SERVE_REPLAY=yes LELEKA_ORIGINAL_SERVE_BUDGET_GIB=30
export LELEKA_REPLAY_DIR=$HOME/work/codex-e2e/capture/943b-codex-ttt LELEKA_REPLAY_COUNT=30
BIN=$HOME/work/leleka-e2e/bin-sm120/leleka-runtime-tests-73e77f8
OUT=$HOME/work/leleka-e2e/runs/948-replay-arms; mkdir -p $OUT
date -u +%FT%TZ; sha256sum $BIN
arm() { # name slots min_p
echo "=== arm $1: slots=$2 spec_min_p=$3"; date -u +%FT%TZ
LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=$2 LELEKA_REPLAY_SPEC_MIN_P=$3 $BIN --ignored --test-threads=1 --nocapture original_serve_replay_smoke > $OUT/$1.log 2>&1
grep -E '^REPLAY (SUMMARY|config)|test result|panicked' $OUT/$1.log | cut -c1-400
awk '/^REPLAY #[0-9]+ file/{for(i=1;i<=NF;i++){split($i,k,"="); if(k[1]=="produced")p+=k[2]; if(k[1]=="rounds")r+=k[2]}} END{if(r>0) printf "tokens_per_round=%.2f (%d tokens / %d rounds)\n", p/r, p, r}' $OUT/$1.log
grep -E 'entries vram' $OUT/$1.log | tail -1 | cut -c1-300
}
arm A-2048-p0 2048 0
arm D-2048-p05 2048 0.5
arm B-auto-p0 auto 0
arm C-auto-p05 auto 0.5
date -u +%FT%TZ