mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4928] [Engine] long --lookup-max-t windows over a layer split (opt-in, single conversation) #5253
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#5253
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/4928
Author: @lyesrock
Created: 11/1/2026
Status: 🔄 Open
Base:
main← Head:f-qwen-lookup📝 Commits (3)
d344d13[Engine] allow long --lookup-max-t windows over a layer split (opt-in, single conversation)2106226[Engine] STRATA_SPLIT_LONG_LOOKUP=1 also sizes the split hand-off for 16 rows and lets the draft policy keep the 9..16 lookup sizes; without the knob the split stays byte-identical to upstream91479d5[Engine] STRATA_SPLIT_LONG_LOOKUP=1 also lets the staged verifier run the two-token-group layout past 8 rows (guard at verify.cpp:3257); off side byte-identical📊 Changes
2 files changed (+20 additions, -6 deletions)
View changed files
📝
src/core/verify.cpp(+4 -2)📝
src/program/generate.cpp(+16 -4)📄 Description
The problem
On a two-GPU layer split,
--lookup-max-tlong prompt-lookup windows never run: three places clamp asplit to
kVerifyNarrowTrows - the argument clamp at serve start, the draft policy's size mask in therequest loop, and a verifier guard ("windows past 8 tokens need one stage"). On 2x Tesla P40 (IQ3_S,
ctx 262144) that caps recopies at ~7 accepted tokens a window (20K-token code recopy: 60.3 tok/s),
while the same feature on one card - and on this box's older engine with its
STRATA_LOOKUP=1- ran~14 tokens a window at 67-75 tok/s.
The approach
One opt-in knob,
STRATA_SPLIT_LONG_LOOKUP=1(single conversation:--batch <= 1, no--pipeline-windows). Off, every path stays byte-identical to upstream. Four places, one per clamp:o.specmay stay pastkVerifyNarrowTwhen the knob is on;kVerifyLongTrows (andset_handoff_rowsfollows);src/core/verify.cpp:3257yields: the two-token-group layout a long windowruns as needs nothing else across stages - the hand-off is read and published whole-window.
Validation (2x Tesla P40, sm_61, CUDA 12.9, engine built from this branch)
Passed: start logs
window sizes 1,2,3,4,5,8,12,16and "long lookup windows ON over the layer split";code recopy 1,744 tokens: 70.7-73.0 tok/s at 14.4-15.0 accepted a window vs 7.0 (102-105 windows
instead of ~195); 157,395-token recopy: 64.1 vs 61.1 (+5 %) at 14.4 vs 6.75; agent session decode
+6.5 %; the standard suite (chat/4K/16K) within run-to-run noise; greedy verbatim copies byte-identical
(6,014 chars in/out, every round); knob off reproduces the upstream numbers.
Live traffic since (same box, this build in serve, 100 real requests after start): 971 suffix-draft
windows at 10.5 offered tokens a window, 96 % accepted - past the upstream cap of 8 in everyday
use, not only in probes; copy-heavy requests decoded 60-72 tok/s against 40-45 for non-repeating
content, with the policy correctly keeping short windows there. One operational note: a request right
after a start reads short while the draft policy learns the long sizes; judge steady state.
Not run: correctness suites (speed only), HIP/SYCL/Metal builds,
--batchor--pipeline-windowspaths (the gate refuses them). A first probe right after a start reads short while the policy learns -
judge the steady state. On one RTX 5090 the same feature (upstream, no this branch) is worth +19 % on
recopies: the win scales with how cheap a 16-row pass is on the card.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.