mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3265] [Benchmark] Experts in VRAM ahead of time: oracle run 3.0x prose, 4.1x code decode, same output #4535
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4535
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3265
Author: @toel1234
Created: 10/19/2026
Status: 🔄 Open
Base:
main← Head:benchmark/expert-lookahead-ceiling📝 Commits (1)
dd28812[Benchmark] Experts in VRAM ahead of time: oracle run 3.0x prose, 4.1x code decode, same output📊 Changes
62 files changed (+1993 additions, -0 deletions)
View changed files
➕
docs/EXPERT_LOOKAHEAD.md(+172 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/breakdown/plainstats.stderr(+41 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/breakdown/plainstats.stdout(+21 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/p1024.ids(+1 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill16.1.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill16.1.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill16.6.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill16.6.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill32.2.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill32.2.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill32.5.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill32.5.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill4.0.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill4.0.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill4.8.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill4.8.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill64.3.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill64.3.stdout(+14 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill64.4.stderr(+36 -0)➕
docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/check-cost/prefill64.4.stdout(+14 -0)...and 42 more files
📄 Description
Problem and result
On this machine most of a decoded token's time is the CPU computing experts that are not in VRAM: 46.9 of 60.0 ms per token, with 69.7% VRAM cache hits (Swift 1.5 IQ2_XS, RTX 5070). This PR measures how much faster decode gets when the right experts are already in VRAM, as a ceiling for a possible lookahead expert prefetcher. Nothing in Strata changes.
Oracle run: the VRAM cache pre-filled with exactly the experts the continuation routes to, adaptive tier off.
Also recorded: a perfect lookahead prefetcher would copy 39–84 experts per token at 16–64 tokens ahead (2–4 ms at the measured 28.4 GB/s host→device), distinct experts per window up to 64 tokens, and the prompt-path cost of 4- to 64-token chunks as an estimate of larger verify windows.
Related discussion
Follows from the NCM study, #3247 (NCM predicts a rough picture of a block of future text; the experts a block uses are that kind of picture). No NCM model is used here. Benchmark report only; no feature or default change proposed in this PR.
Approach
docs/EXPERT_LOOKAHEAD.md: plain summary first, then settings, the five measurements, what it does and does not show, how to repeat.docs/benchmarks/expert-lookahead-2026-10-19-rtx5070/: every run's stdout/stderr, results JSON, the two routing traces and prompt/reference IDs used (inputs, 0.8 MB total), PCIe benchmark output, profile and engine SHA-256. Local paths rewritten.tools/expert_lookahead_bench.py:unions,simulateandoracle-profilerun without a GPU on the committed traces;oracle-runsandprefill-sweepdrive the engine.Validation
Passed:
e88ee39d; saved run config with context 4096, KV residency 0,--mmap-experts, greedy reference mode (--spec 2 --spec-corrupt 1, no MTP).git diff --exit-code main -- src include serve strata_cli strata_control apps requirements.txtreturns 0.Failed:
none observed. A first cold T=8 chunk run (263.1 ms vs 221.8 ms) is kept separately and left out of the table.
Not run:
Limits
Two prompts, one machine, diagnostic settings, short runs. This is a ceiling for a perfect predictor, not a speed-up of Strata. A real predictor's misses cost roughly 17 ms per token per 10% of routed experts missed (estimate from these runs).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.