mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1704] [CLOSED] perf: experimental active-layer expert cache for fresh prefill #3620
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#3620
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/1704
Author: @CC-David-CC
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:perf/prefill-active-layer-cache📝 Commits (6)
76ce987prefill: add opt-in bounded active-layer expert cacheec8eecdtest: validate layer cache on P4, RX 5500 XT and RTX 3070eb393baMerge current main while preserving experimental validation paths035ea72docs: answer requested 20K P4 exactness and speed check7c55456docs: correct rounded P4 time-reduction percentagef2fedfdMerge Strata v0.1.43 into perf/prefill-active-layer-cache📊 Changes
23 files changed (+47646 additions, -12 deletions)
View changed files
➕
docs/PREFILL_LAYER_CACHE_EXPERIMENTAL.md(+86 -0)➕
docs/measurements/p4-layer-cache/README.md(+115 -0)➕
docs/measurements/p4-layer-cache/cross-gpu/README.md(+116 -0)➕
docs/measurements/p4-layer-cache/cross-gpu/a5500.json(+919 -0)➕
docs/measurements/p4-layer-cache/cross-gpu/g3070.json(+1424 -0)➕
docs/measurements/p4-layer-cache/cross-gpu/r730.json(+870 -0)➕
docs/measurements/p4-layer-cache/cross-gpu/summary.json(+311 -0)➕
docs/measurements/p4-layer-cache/cross-gpu/sycl-build.json(+25 -0)➕
docs/measurements/p4-layer-cache/current-main-20k/README.md(+66 -0)➕
docs/measurements/p4-layer-cache/current-main-20k/candidate-off-vs-on.json(+21284 -0)➕
docs/measurements/p4-layer-cache/current-main-20k/main-vs-enabled.json(+21260 -0)➕
docs/measurements/p4-layer-cache/current-main-20k/provenance.json(+7 -0)➕
docs/measurements/p4-layer-cache/initial.json(+226 -0)➕
docs/measurements/p4-layer-cache/off-config.json(+78 -0)➕
docs/measurements/p4-layer-cache/off.log(+50 -0)➕
docs/measurements/p4-layer-cache/on-config.json(+78 -0)➕
docs/measurements/p4-layer-cache/on.log(+69 -0)➕
docs/measurements/p4-layer-cache/steady-state.json(+191 -0)➕
docs/measurements/p4-layer-cache/summary.json(+156 -0)📝
include/strata/prefill/prefill.hpp(+9 -0)...and 3 more files
📄 Description
Adds an opt-in active-layer expert cache for fresh, single-GPU native-MMQ text prefill. It walks a bounded window layer by layer, using temporary expert VRAM and pinned residual buffers while preserving chronological attention/recurrent state. Enable
STRATA_PREFILL_LAYER_CACHE=1; the ordinary path remains the default. Unsupported formats/device layouts and failed initial allocations decline the experiment. Cancellation after processing starts fails the request and drains rather than restarting from partially advanced state.Refreshed onto current main (
61b3fb5d), preserving the active-layer guard and current CPU-share RAM fallback. This update answers the requested 20K P4 follow-up.Fresh single-P4 / ISTA IQ3_XXS / INT8 KV / MTP-width-2 comparison, three 20K repeats per arm:
All twelve measured requests returned identical full 64-token streams, with zero reused prompt tokens. Candidate-off matches main. Both arms used auto-RAM staging, automatic chunk sizing and CPU prefill sharing disabled; this is not a comparison against setup defaults with sharing enabled. STOP during a 20K prompt cancelled and a following request completed on the same engine.
The 2048-token target resolved to two 1280-token chunks. The first enabled request logged 480.6 MiB temporary expert capacity and 100.0 MiB pinned residual rows, plus expert staging buffers. These are allocation sizes, not sampled peaks. One synthetic workload, fixed off-then-on ordering, warm filesystem caches and three observations per arm do not establish a general speedup. Historical cross-GPU slowdowns remain documented; this stays experimental.
CUDA sm61, HIP gfx1012 and standalone SYCL builds passed; fresh HIP/SYCL 20K inference was not tested. Usage and limits. Fresh results, exact source/binary identities, full IDs, timings and reproduction.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.