mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1700] [CLOSED] generate, mtp: near the context's end the spec window and its drafts stay inside it #3618
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#3618
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/1700
Author: @midagedev
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:spec-window-context-end📝 Commits (1)
93346bbgenerate, mtp: near the context's end the spec window and its drafts stay inside it📊 Changes
2 files changed (+10 additions, -3 deletions)
View changed files
📝
src/core/mtp.cpp(+3 -1)📝
src/program/generate.cpp(+7 -2)📄 Description
Summary
strata generate --spec Sfails near the end of the context. The admission checksprompt + max_new <= max_context, but the loop still opens a full window there. So a request that fits ends with "ran out of context" (rc 2) and prints nothing. Near the end,MtpDrafter::draftcan also draft into cellmax_cells, past the page table.What changed
src/program/generate.cpp: a window takes only the rows that fit,min(spec, max_context - p). The lookup chain stays inside them.src/core/mtp.cpp: a draft round caps its steps atmax_cells - (p + a). Serve calls the same drafter, so it gets the cap too. The cap binds only at the end of the context.Extra Notes
fb58e0dbagainst this branch:--max-context 4096 --max-new 2 --spec 4: before, rc 2 and no output. After, rc 0 and 2 tokens.--max-new 12 --spec 5 --suffix-draft 0 --mtp, with a probe print: before, a round drafts into cell 4096 (max_cells4096), then rc 2. After, its last cell is 4095, and the run ends with rc 0 and 12 tokens.--max-new 64 --spec 4 --mtp, CPU share off: the same 64 tokens from both builds, twice each.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.