mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2476] [CLOSED] [Engine] skip file lookahead when serial decode stays resident #4062
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#4062
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/2476
Author: @KeyanHu-git
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:fix/1922-resident-lookahead📝 Commits (3)
1477f70serve: skip file lookahead when experts stay residentba49149serve: decide resident lookahead after startup plans are finalad947fbmerge current main for resident decode prefetch validation📊 Changes
5 files changed (+132 additions, -0 deletions)
View changed files
📝
CMakeLists.txt(+3 -0)➕
include/strata/core/resident_decode_prefetch.hpp(+31 -0)📝
src/program/generate.cpp(+15 -0)📝
sycl/src/program/generate.cpp(+14 -0)➕
tests/core/resident_decode_prefetch_test.cpp(+69 -0)📄 Description
Outcome
Closing this candidate after testing it against 0.2.2 (
011c9e60, engine 0.1.47). The redundant prediction work still exists, and the coverage check engages correctly on a fully resident workload. The current measurements do not establish a repeatable throughput gain, and the default-auto comparison has an unexplained output divergence. #1922 remains open.Problem and approach
RouterLookahead starts before the resident RAM complement is built. Once every expert is in GPU or RAM, prefetch already skips resident data, but decode still submits router predictions and computes their dot products and rankings.
This candidate checks the final GPU map and RAM membership immediately before READY. It disconnects prediction for fully covered serial serving. Partial coverage, batching, elastic KV, independent prediction consumers, and explicit lookahead settings retain prediction. Adaptive exchanges and returned serial prompt loans preserve the coverage required by the decision.
CUDA/HIP and SYCL use the same predicate. Related issue: #1922.
Current-version validation
Candidate
ad947fbdagainst011c9e60, Ryzen 5 7600X, RX 7900 XTX 24 GiB, Windows, approximately 32 GiB RAM; Coder IQ1_M through the supported GGUF in-place expert source. Both arms used 128K context, int8 KV, MTP, temperature 0, and seed 1922. Each process ran a 64-token warmup followed by 256-token English and code requests. Timing and lookahead statistics were disabled.Passed
Throughput evidence
With the installed default
--expert-cache auto, both versions allocated 6,885 GPU slots and about 12.92 GiB of resident RAM:English output tokens and execution counters matched. The second row was a repeatability check, not another randomized sample. Original-to-original throughput varied by 10.53%, exceeding the first pair's apparent gain. Whole-request CPU time was lower in both candidate runs, but these samples do not establish an end-to-end throughput improvement.
Unresolved output comparison
The code request first diverged at output token 246. Each version reproduced its own sequence on a fresh process. Original MTP acceptance was 155/239; candidate acceptance was 158/231. The planned four-pair benchmark stopped at that first mismatch, so code timings are not treated as equal-work speed comparisons. No answer-quality score was measured.
An explicit lookahead-on control with the candidate binary allocated a different number of auto cache slots and was excluded. A subsequent three-arm control fixed the CLI cache budget to 5,445: original, candidate with prediction disabled, and the same candidate with prediction retained. All three allocated 7,094 slots and produced identical tokens and execution counters for all three requests. That control completed in 203 seconds; it does not explain the 6,885-slot auto result or qualify as a randomized speed comparison.
The specific cause of the auto-path divergence remains unresolved. This candidate therefore has neither a completed output-equivalence check for that configuration nor a demonstrated stable throughput gain. The branch and experiment records are retained for a future evaluation on a current-version CPU-constrained workload.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.