mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1283] [CLOSED] prefill: bytes_needed sizes the MoE buffers for the layout init picks (with or without an expert source) #3357
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#3357
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/1283
Author: @sergqwer
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:pr/prefill-bytes-needed📝 Commits (1)
e7635b6prefill: bytes_needed sizes the MoE buffers for the layout init picks (with or without an expert source)📊 Changes
3 files changed (+27 additions, -21 deletions)
View changed files
📝
include/strata/prefill/prefill.hpp(+9 -5)📝
src/prefill/prefill.cpp(+11 -9)📝
src/program/generate.cpp(+7 -7)📄 Description
Replaces #1042, which GitHub closed when
main's history was rewritten. The closing note says this was not a rejection. It is the same commit, cherry-picked onto the newmain(v0.1.40.1).Prefill::bytes_needed()sizes the region the prompt path borrows from the expert cache. It must count exactly whatcarve()allocates. 0.1.39 took the first part of #547 with #583 (thexn/grscount). This is what is left.The MoE layout.
bytes_neededsizes the MoE scratch withfused_layout(T, true)for every caller.carvetakes the fused layout only wheninitgets anExpertSource(fused_layout(T, m.src != nullptr)). So a prompt path without one is lent the fused layout's smaller MoE buffers, and its unfused buffers do not fit in them.The change.
bytes_needed_impltakes asrcflag. So dobytes_needed,bytes_needed_no_ringand 0.1.40'sbytes_needed_owned(#796), all defaulting totrue. Every caller ingenerate.cpppassessrcp != nullptr, the same source it handsinit. That includesSTRATA_OWNED_PRICE=exact's sizing.Identity. With an
ExpertSource(every normal run) nothing changes. The logits and the 32 greedy tokens after a 32K prompt equal v0.1.40 on IQ2_XS: identical bytes, same expert cache. The engine's sources here are the same bytes as on that branch, because 0.1.40.1 changed only the server and setup.🤖 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.