scripts: baseline-pair ours45 arm (product PCIe share 0.45), SUBST_V1, bin-cpuservice in the manifest
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
63fb009f42
commit
fa186ecd83
@@ -76,7 +76,7 @@ def parse_run(d):
|
||||
out_tok = [t.get("output_tokens") or 300 for t in turns]
|
||||
# rounds per turn
|
||||
rounds, ms_round, tok_round = [], [], []
|
||||
if r["arm"] == "ours":
|
||||
if r["arm"].startswith("ours"):
|
||||
for ln in open(os.path.join(d, "inference.log"), errors="replace"):
|
||||
mm = re.search(r"leleka-serve request outcome=completed produced=(\d+) rounds=(\d+)", ln)
|
||||
if mm:
|
||||
@@ -233,8 +233,8 @@ for r in runs:
|
||||
fmt(r["memavail_gib"]), fmt(r["buddy9_gib"]), fmt(r["gpu_sm_mhz"], 0), fmt(r["gpu_temp"], 0), fmt(r["gpu_power"], 0), r.get("d_thp_fault_fallback", "-"), r.get("d_compact_stall", "-"),
|
||||
fmt(r["pcie_gbs"])))
|
||||
|
||||
arms = ["ours", "v1", "v2"]
|
||||
by = {a: [r for r in runs if r["arm"] == a] for a in arms}
|
||||
arms = [a for a in ["ours", "ours45", "v1", "v2"] if any(r["arm"] == a for r in runs)]
|
||||
by = {a: [r for r in runs if r["arm"] == a] for a in ["ours", "ours45", "v1", "v2"]}
|
||||
print("\n== arm summary (n runs; all-turn mean tok/s: mean, sd, min, max; per-turn means; tokens/round; ms/round) ==")
|
||||
for a in arms:
|
||||
rs = by[a]
|
||||
@@ -258,7 +258,7 @@ def block_pairs(a, b):
|
||||
return out
|
||||
|
||||
print("\n== block-paired deltas (a - b inside the same block; % = a / b - 1 on the all-turn mean) ==")
|
||||
for a, b in (("ours", "v1"), ("ours", "v2"), ("v1", "v2")):
|
||||
for a, b in (("ours", "v1"), ("ours", "v2"), ("v1", "v2"), ("ours45", "v1"), ("ours45", "v2"), ("ours", "ours45")):
|
||||
ps = block_pairs(a, b)
|
||||
if not ps:
|
||||
continue
|
||||
@@ -303,7 +303,7 @@ VARS = [("uptime_h", "uptime at start (h)"), ("t0", "wall time of the run"), ("p
|
||||
("busy_mhz", "busy-core MHz (decode windows)"), ("busy_mhz_all", "busy-core MHz (whole run)"), ("memavail_gib", "MemAvailable"), ("buddy9_gib", "free GiB in order>=9 blocks"),
|
||||
("pre_buddy9_gib", "free GiB order>=9 before the run"), ("pre_memavail_gib", "MemAvailable before the run"), ("gpu_sm_mhz", "GPU SM MHz"), ("gpu_temp", "GPU temp"), ("pcie_gbs", "PCIe probe GB/s (vanilla)"), ("pcie_frac_final", "vanilla final pcie_frac"), ("cpu_us_per_expert", "vanilla CPU pool us/expert"), ("hit_pct", "vanilla decode VRAM hit %"), ("pcie_read_pct", "vanilla PCIe-read %"),
|
||||
("d_thp_fault_fallback", "thp_fault_fallback delta"), ("d_compact_stall", "compact_stall delta"), ("other_cpu_max_ticks", "foreign (non-arm) process CPU ticks, max per sample interval")]
|
||||
for a, rs in (("ours", by["ours"]), ("v1", by["v1"]), ("v2", by["v2"]), ("vanilla (v1+v2)", by["v1"] + by["v2"])):
|
||||
for a, rs in (("ours", by["ours"]), ("ours45", by["ours45"]), ("v1", by["v1"]), ("v2", by["v2"]), ("vanilla (v1+v2)", by["v1"] + by["v2"])):
|
||||
print("%s (n=%d)" % (a, len(rs)))
|
||||
for k, label in VARS:
|
||||
pts = [(r[k], r["mean"], st.mean(r["ms_round"])) for r in rs if r.get(k) is not None and r["ms_round"]]
|
||||
|
||||
@@ -16,11 +16,12 @@ ENG=$(ls -d /home/para/.local/share/strata/components/engine/*/strata | head -1)
|
||||
{
|
||||
sha256sum "$BP"/tools/* \
|
||||
"$D/bin-footprint3b/leleka-inference" "$D/bin-footprint3b/leleka-daemon" "$D/bin-footprint3b/leleka-cli" "$D/bin-footprint3b/strata-next" \
|
||||
"$D/bin-cpuservice/leleka-inference" "$D/bin-cpuservice/leleka-daemon" "$D/bin-cpuservice/leleka-cli" "$D/bin-cpuservice/strata-next" \
|
||||
"$D/tools/long-session.py" "$D/scripts/e2e/run-e2e.sh" "$D/scripts/e2e/sample_env.sh" \
|
||||
/data/leleka-e2e/decode/assets/expert-profile-upstream.bin /data/leleka-e2e/decode/corpus/MANIFEST.txt \
|
||||
"$HOME/work/vanilla-strata/control/bin/strata" "$ENG" "$HOME/.config/strata/settings.json"
|
||||
} >"$BP/MANIFEST.sha256.new"
|
||||
mv "$BP/MANIFEST.sha256.new" "$BP/MANIFEST.sha256"
|
||||
cat "$D/bin-footprint3b/COMMIT.txt" >"$BP/PROVENANCE.txt"
|
||||
cat "$D/bin-footprint3b/COMMIT.txt" "$D/bin-cpuservice/COMMIT.txt" >"$BP/PROVENANCE.txt"
|
||||
{ echo "vanilla engine component: $ENG"; echo "vanilla launcher: $HOME/work/vanilla-strata/control/bin/strata (Strata 0.2.6 per docs/upstream.md)"; date -u +%FT%TZ; } >>"$BP/PROVENANCE.txt"
|
||||
echo "installed; $(wc -l <"$BP/MANIFEST.sha256") inputs in $BP/MANIFEST.sha256"
|
||||
|
||||
@@ -65,8 +65,8 @@ stop_sampler() {
|
||||
python3 -I "$BP/tools/baseline-sampler.py" "$1/post.jsonl" --once
|
||||
}
|
||||
|
||||
ours() { # $1 tag, $2 run dir
|
||||
local tag=$1 R=$2
|
||||
ours() { # $1 tag, $2 run dir, $3 arm (ours | ours45)
|
||||
local tag=$1 R=$2 oarm=${3:-ours}
|
||||
( export E2E_BIN=$D/$BINDIR E2E_OUT=$R
|
||||
export LELEKA_BRINGUP_TRACE=1 LELEKA_PREFIX_TRACE=1
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=auto E2E_GPU_BUDGET=${GPU_BUDGET:-32819404800}
|
||||
@@ -75,7 +75,11 @@ ours() { # $1 tag, $2 run dir
|
||||
export LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE=$UP
|
||||
unset LELEKA_FOOTPRINT_LEGACY LELEKA_ORIGINAL_SERVE_SEED_MAX_ROWS LELEKA_SM120_ATTN_DAILY LELEKA_SM120_GU_SWIGLU LELEKA_SM120_SIDE_MIXER LELEKA_SM120_PERF LELEKA_SERVE_DRAFT_AFTER_COMMIT LELEKA_PROMPT_EMBED_ALIAS LELEKA_VRAM_LEDGER LELEKA_DENSE_SLAB LELEKA_ORIGINAL_SERVE_DECODE_RESERVE_MIB LELEKA_ROUTE_TAIL_SKIP
|
||||
export LELEKA_ORIGINAL_SERVE_SEED=off
|
||||
{ echo "arm=ours tag=$tag"; date -u +%FT%TZ; free -g | sed -n 2p; uptime; sha256sum "$UP" "$E2E_BIN"/leleka-inference "$E2E_BIN"/leleka-daemon "$E2E_BIN"/leleka-cli "$E2E_BIN"/strata-next
|
||||
unset LELEKA_ORIGINAL_SERVE_PCIE_FRAC
|
||||
# ours45 = the product default PCIe share 0.45; ours = whatever run-e2e.sh exports (its own default 0.55, the value every earlier harness A/B used)
|
||||
if [ "$oarm" = ours45 ]; then export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.45; fi
|
||||
echo "pcie_frac_requested=${LELEKA_ORIGINAL_SERVE_PCIE_FRAC:-0.55 (run-e2e.sh default)}" >"$R/pcie-frac.txt"
|
||||
{ echo "arm=$oarm tag=$tag"; date -u +%FT%TZ; free -g | sed -n 2p; uptime; 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; } >"$R/env-arm.txt"
|
||||
export E2E_RUN_CMD="bash $BP/tools/ts-wrap.sh $R/client.ts.log python3 -I $D/tools/long-session.py --src $CORPUS $SESSION_ARGS"
|
||||
@@ -124,7 +128,7 @@ if os.path.exists(f):
|
||||
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 arm == "ours":
|
||||
if arm.startswith("ours"):
|
||||
wins, last = [], []
|
||||
for ln in open(os.path.join(d, "inference.log"), errors="replace"):
|
||||
if ln.startswith("DBG window "):
|
||||
@@ -159,7 +163,7 @@ LIST=""
|
||||
if [ -n "${SEQ:-}" ]; then
|
||||
i=0; for arm in $SEQ; do LIST="$LIST $((BLOCK_BASE + i / ${SEQ_GROUP:-3} + 1)):$((i % ${SEQ_GROUP:-3} + 1)):$arm"; i=$((i + 1)); done
|
||||
else
|
||||
for b in $BLOCKS; do pos=0; for arm in $(perm "$b"); do pos=$((pos + 1)); LIST="$LIST $((BLOCK_BASE + b)):$pos:$arm"; done; done
|
||||
for b in $BLOCKS; do pos=0; for arm in $(perm "$b" | sed "s/v1/${SUBST_V1:-v1}/"); do pos=$((pos + 1)); LIST="$LIST $((BLOCK_BASE + b)):$pos:$arm"; done; done
|
||||
fi
|
||||
for ent in $LIST; do
|
||||
bn=${ent%%:*}; rest=${ent#*:}; pos=${rest%%:*}; arm=${rest#*:}
|
||||
@@ -181,7 +185,7 @@ for ent in $LIST; do
|
||||
settle "$R"
|
||||
start_sampler "$R"
|
||||
case $arm in
|
||||
ours) ours "$tag" "$R" ;;
|
||||
ours|ours45) ours "$tag" "$R" "$arm" ;;
|
||||
v1|v2) vanilla "$tag" "$R" "$arm" ;;
|
||||
esac
|
||||
stop_sampler "$R"
|
||||
|
||||
Reference in New Issue
Block a user