deploy: RTX 5090 profile sets LELEKA_ORIGINAL_SERVE_SEED=off (placement class, owner confirmation required)

Seed OFF is a profile setting only: the engine default (seed on) and the laptop profile are unchanged. Placement-class change, NOT bit-identical; it does not fit the strict Original
envelope (p99 <= 0.22, max <= 0.43) and neither does the control; it meets the relative criterion on 1,717 teacher-forced rows (p99 0.2500 vs control 0.2278, max 0.7567 vs 0.6751,
flips 2.10 % vs 2.59 %; limits 1.5x control and 2.8 %). Gain: 108.1 -> 137.2 tok/s decode over turns 1-4 of the frozen 245k session (3 runs per arm). Revert: remove the key or set
LELEKA_ORIGINAL_SERVE_SEED=on in the operator environment. Test: only_the_server_profile_turns_the_prompt_routing_seed_off; leleka-deploy tests 125 passed in WSL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-10-29 10:09:44 +01:00
co-authored by Claude Sonnet 5.5
parent 47d2d38976
commit fcb4f02ba9
4 changed files with 47 additions and 2 deletions
+9
View File
@@ -448,6 +448,15 @@ mod tests {
assert_eq!(Profile::builtins().len(), 2);
}
#[test]
fn only_the_server_profile_turns_the_prompt_routing_seed_off() {
// placement-class setting (docs/experiments/decode-tail-5090.md): off for the 5090 profile, the engine default and the laptop profile are unchanged
let server = Profile::builtin("rtx5090-32g").unwrap();
assert_eq!(server.engine_env.get("LELEKA_ORIGINAL_SERVE_SEED").map(String::as_str), Some("off"));
let laptop = Profile::builtin("rtx3080-16g").unwrap();
assert!(!laptop.engine_env.contains_key("LELEKA_ORIGINAL_SERVE_SEED"));
}
#[test]
fn auto_selection_picks_the_server_and_the_laptop_profile() {
let server = resolve(None, Some(&gpu("NVIDIA GeForce RTX 5090", 120, 32607))).unwrap();
@@ -1,6 +1,6 @@
{
"name": "rtx5090-32g",
"description": "RTX 5090 class server (sm_120, 32 GB VRAM, >= 100 GiB RAM). The 55 GB level-2 KAR archive is copied once into a sealed memfd and the 50 GB routed-expert bank is a page-locked RAM copy (the bring-up smoke form). Reference-equivalent agent configuration (docs/e2e-run.md 7d: 30 GiB GPU budget, expert tier auto-sized per layer from data/expert-profile.bin, adaptive speculative window with spec-min-p 0, MTP draft vocabulary, prefix cache auto with request-end checkpoints (reply), chain kernels): weighted decode 129-130 tok/s in the reference-equivalent real Codex sessions on the 5090, +5 % from the adaptive window in the CRM replay. 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). Not a formally quality-gated profile.",
"description": "RTX 5090 class server (sm_120, 32 GB VRAM, >= 100 GiB RAM). The 55 GB level-2 KAR archive is copied once into a sealed memfd and the 50 GB routed-expert bank is a page-locked RAM copy (the bring-up smoke form). Reference-equivalent agent configuration (docs/e2e-run.md 7d: 30 GiB GPU budget, expert tier auto-sized per layer from data/expert-profile.bin, adaptive speculative window with spec-min-p 0, MTP draft vocabulary, prefix cache auto with request-end checkpoints (reply), chain kernels): weighted decode 129-130 tok/s in the reference-equivalent real Codex sessions on the 5090, +5 % from the adaptive window in the CRM replay. 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). Not a formally quality-gated profile.",
"select": {"sm_min": 120, "sm_max": 130, "vram_mib_min": 30000, "vram_mib_max": 1000000},
"gpu_budget_bytes": 32212254720,
"spec_min_p": 0.0,
@@ -13,6 +13,6 @@
"min_vram_total_mib": 30000,
"min_ram_total_bytes": 107374182400,
"min_ram_available_bytes": 113000000000,
"engine_env": {"LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER": "yes", "LELEKA_CHAIN": "all"},
"engine_env": {"LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER": "yes", "LELEKA_CHAIN": "all", "LELEKA_ORIGINAL_SERVE_SEED": "off"},
"memory": {"prefix_cache_mib": "auto", "prefix_cache_tail": "reply", "prefix_cache_block": 8192, "soft_floor_mib": 4096, "hard_floor_mib": 2048, "reserve_mib": 2048, "lock": "try", "heal": true}
}
+18
View File
@@ -79,3 +79,21 @@ with the seed off `apply_pending` and `begin_adaptation` fall to about 0.1 ms ea
- No quality gate for the seed change yet; single-turn greedy identity of the engine commits not yet run (section 5).
- Vanilla was run with its shipped route tail skip (lossy); the skip-off pair `v-nsk` was dropped for GPU time.
- Per-commit engine A/B has no result yet; the micro numbers (e.g. `choose_swaps` 580 -> 480 us on the laptop) are not 5090 evidence.
### Seed OFF in the RTX 5090 profile (placement class, owner confirmation required before merge)
`deploy/rust-runtime/profiles/rtx5090-32g.json` sets `engine_env.LELEKA_ORIGINAL_SERVE_SEED=off`. The engine default (seed on) and the laptop profile (`rtx3080-16g`) are unchanged; nothing else in the profile moves.
This is a **placement-class change and NOT bit-identical**: the seed moves experts between the GPU and the CPU, which round differently, so no logprob row is identical and greedy ids can differ.
It is not a lossless optimisation and it does not fit the strict Original envelope (d_top1 p99 <= 0.22, max <= 0.43, measured on ~100-token prompts): neither seed OFF against ON nor the control below does.
The justification is the relative criterion, teacher-forced replay of night5-long-256k (240 forced tokens per request, static tier, upstream profile, one process per setting, 2026-10-29):
| comparison | common rows | d_top1 p99 | d_top1 max | argmax flips |
| --- | ---: | ---: | ---: | ---: |
| control: placeholder-profile placement against upstream placement, both seed off (a larger placement change: VRAM share 48 % against 90 %) | 1,660 | 0.2278 | 0.6751 | 43 (2.59 %) |
| seed on against seed off (upstream profile) | 1,717 | 0.2500 | 0.7567 | 36 (2.10 %) |
Criterion: p99 and max <= 1.5x the control (0.342 / 1.013), flips <= 2.8 %, >= 1,000 rows on both: met. Same-configuration repeats are exact (A/A: 353/353 and 345/345 rows identical in the earlier 48-token runs), so the differences are the placement.
No perplexity or task-completion evaluation was run. The gain is decode speed at 45k-247k prompts: 108.1 -> 137.2 tok/s over turns 1-4 of the 5-turn 245k session (3 runs per arm, `docs/experiments/decode-tail-5090.md`).
To revert: remove `"LELEKA_ORIGINAL_SERVE_SEED": "off"` from `engine_env` of the profile, or set `LELEKA_ORIGINAL_SERVE_SEED=on` in the operator's engine environment (the operator's environment wins over the profile, `Config::engine_environment`).
The owner must confirm this default before the branch is merged.
+18
View File
@@ -424,3 +424,21 @@ most of the prefill (the seed then sees only the new rows).
hurt: with the seed (default) the VRAM share of routed entries was 80-85 %, windows 0-20 of every request served about 230-250 CPU and 230-255 PCIe experts, 17.5-20 ms per round, 107-110 tok/s; with `LELEKA_ORIGINAL_SERVE_SEED=off`
93-96 %, 23-79 CPU experts in windows 0-20, 13.4-15.4 ms per round, 132-149 tok/s (turn 5 of both arms stalled on the PLE reads, a host-memory artifact, and is not counted). The seed keeps `keep=0`, so at 45k+ rows it replaces the profile's good set by the prompt's top experts (9-10 % of the decode routing, as measured at 16k above).
`LELEKA_ORIGINAL_SERVE_SEED_MAX_ROWS` (EXPERIMENTAL, default 0 = no cap, so the seed stays on for every prompt as before) skips the seed for a prefill that routed more rows than that; `LELEKA_ORIGINAL_SERVE_SEED=off` is the other way to remove it. Both are placement-class changes: GPU and CPU round differently, so greedy ids are not invariant to them (see Quality above), and neither is a default until a quality gate has passed.
### Seed OFF in the RTX 5090 profile (placement class, owner confirmation required before merge)
`deploy/rust-runtime/profiles/rtx5090-32g.json` sets `engine_env.LELEKA_ORIGINAL_SERVE_SEED=off`. The engine default (seed on) and the laptop profile (`rtx3080-16g`) are unchanged; nothing else in the profile moves.
This is a **placement-class change and NOT bit-identical**: the seed moves experts between the GPU and the CPU, which round differently, so no logprob row is identical and greedy ids can differ.
It is not a lossless optimisation and it does not fit the strict Original envelope (d_top1 p99 <= 0.22, max <= 0.43, measured on ~100-token prompts): neither seed OFF against ON nor the control below does.
The justification is the relative criterion, teacher-forced replay of night5-long-256k (240 forced tokens per request, static tier, upstream profile, one process per setting, 2026-10-29):
| comparison | common rows | d_top1 p99 | d_top1 max | argmax flips |
| --- | ---: | ---: | ---: | ---: |
| control: placeholder-profile placement against upstream placement, both seed off (a larger placement change: VRAM share 48 % against 90 %) | 1,660 | 0.2278 | 0.6751 | 43 (2.59 %) |
| seed on against seed off (upstream profile) | 1,717 | 0.2500 | 0.7567 | 36 (2.10 %) |
Criterion: p99 and max <= 1.5x the control (0.342 / 1.013), flips <= 2.8 %, >= 1,000 rows on both: met. Same-configuration repeats are exact (A/A: 353/353 and 345/345 rows identical in the earlier 48-token runs), so the differences are the placement.
No perplexity or task-completion evaluation was run. The gain is decode speed at 45k-247k prompts: 108.1 -> 137.2 tok/s over turns 1-4 of the 5-turn 245k session (3 runs per arm, `docs/experiments/decode-tail-5090.md`).
To revert: remove `"LELEKA_ORIGINAL_SERVE_SEED": "off"` from `engine_env` of the profile, or set `LELEKA_ORIGINAL_SERVE_SEED=on` in the operator's engine environment (the operator's environment wins over the profile, `Config::engine_environment`).
The owner must confirm this default before the branch is merged.