mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2774] [CLOSED] Short prompt chunks: router push + decode grouped kernel for resident experts #4258
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#4258
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/2774
Author: @apatassini
Created: 10/16/2026
Status: ❌ Closed
Base:
main← Head:short-prompt-reads📝 Commits (1)
25b1894Short prompt chunks: router push and the decode grouped kernel for resident experts (opt-in push)📊 Changes
1 file changed (+107 additions, -2 deletions)
View changed files
📝
src/prefill/prefill.cpp(+107 -2)📄 Description
Agent workloads read many short prompt chunks (tool results, file excerpts): in a 5-hour coding-agent session on an RTX 5070 Ti
(Qwen3.8-Flash-Next GSQ-RCO Q2_0, 256K) 74% of the reads were under 1,000 tokens and took 57% of the read time, at 200-750 tok/s.
With
STRATA_PREFILL_TIMING=1, a 170-token chunk spends ~40% in what the timer calls "dequant": on a canonical (non-native)pack, below
stream_all_minMMQ converts every expert blob into GGUF blocks with onegather_strata_q2launch per expert(~14,000 launches for 170 tokens); the copies from RAM are only ~3%.
The branch adds, for chunks below
stream_all_minonly:STRATA_PF_ROUTE_PRIOR=lambda— the decode push (route_prior_top10) also in the prefill router (opt-in, changes outputslike
STRATA_ROUTE_PRIOR);STRATA_PF_DIRETTO_MAXrows (default 8) leave MMQ's list — their rows form a block after thelocal ones, as the CPU share does — and run on
moe_grouped_s2(ornative_expert_groupedfor native packs) straight from thecompressed blob, in calls of up to 1,024 rows with a small own scratch (9 MiB).
STRATA_PF_DIRETTO=0turns it off.Measured (28K cached context, appended chunk, RTX 5070 Ti): 177 tokens 473 → ~315 ms, ~500 668 → ~470 ms, ~900 826 → ~677 ms;
Two pitfalls found on the way:
moe_grouped_s2handles at mostGMAX = 8rows per group and silently drops the rest; MMQ closesits last group at
rows_local(bounds_host[n]), sorows_localmust exclude the new block.The read push is opt-in; so far only sanity-checked on outputs, no separate quality run yet (the decode push
STRATA_ROUTE_PRIOR=1.0was quality-checked on two real tasks, 3+3 runs, no measurable loss).Full notes and measurements: https://github.com/apatassini/Strata/blob/qwen38-16gb/QWEN38.md
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.