Repository navigation
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) - #546
Closed
sergqwer wants to merge 1 commit into
Conversation
… takes the fused path fused_layout() switched a streamed chunk to the fused path's smaller MoE buffers whenever any layer could run the fused kernels (fused_ring()), but the path is chosen per layer. Under STRATA_PF_FUSED=1 a native pack that mixes formats runs the layers the native kernels do not cover through MMQ or the FP16 path, which write the chunk's T x K rows into GU / H / Xq sized for stream_all_min() - 1 tokens and run on into the next buffers. The shipped IQ2_XS pack is such a pack: its three IQ1_M layers take the FP16 path. The layout is now used only when every layer takes the fused path; a mixed pack keeps MMQ-sized buffers, and its fused layers still run fused in them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
Contributor
Author
|
0.1.38's 220e0e8 fixes this in Measured on v0.1.38 (RTX 5090, the IQ2_XS pack with three IQ1_M layers, fixed
0.1.38's 0.0036 is the same as this branch gave. I'm closing this as superseded. |
slovx2
added a commit
to slovx2/Strata
that referenced
this pull request
Oct 3, 2026
Port the functional synchronization fix from upstream Niko1221#463, residency uploads from Niko1221#550, and the all-layer fused layout guard from Niko1221#546. Keep the existing engine and defaults otherwise. Co-authored-by: multica-agent <github@multica.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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