mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #546] [CLOSED] prefill: the fused layout's smaller MoE buffers only when every layer takes the fused path (STRATA_PF_FUSED=1 on IQ2_XS wrote past them) #2685
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#2685
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/546
Author: @sergqwer
Created: 10/2/2026
Status: ❌ Closed
Base:
main← Head:pr/fused-layout-mixed📝 Commits (1)
3af0f04prefill: the fused layout's smaller MoE buffers only when every layer takes the fused path📊 Changes
1 file changed (+18 additions, -1 deletions)
View changed files
📝
src/prefill/prefill.cpp(+18 -1)📄 Description
Under
STRATA_PF_FUSED=1, the shipped IQ2_XS pack gives a wrong answer after a long prompt. The prompt path writes past its MoE buffers.Cause (
src/prefill/prefill.cpp):fused_layout()switches a streamed chunk (T >=stream_all_min()) to the fused path's smaller MoE buffers when any layer can run the fused kernels. That is thefused_ring()test.moe_bufs(..., fused=true), GU / H / Xq / Hq then hold MMQ rows for onlystream_all_min() - 1tokens.fused_l/fused_nat). A layer the native kernels do not cover runs MMQ or the FP16 path over the chunk's T x K rows, and runs on into the next buffers.Fix: the smaller layout only when every layer takes the fused path: each layer is in the MMQ plan and, for a native pack,
fused::native_supported().STRATA_PF_FUSED=1nothing changes at all.Measured on an RTX 5090: IQ2_XS (ISTA), 262K,
--expert-cache 14900, first-token logits. The reference is the same engine without the flag (MMQ):STRATA_PF_FUSED=1STRATA_PF_FUSED=1The remaining KL is the fused kernels' own rounding against MMQ, which the release notes put at MMQ's level. #519 runs
STRATA_PF_FUSED=1on an IQ3_XXS pack in production: if that pack mixes formats by layer, its long prompts were affected too.🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.