mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#4329
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/2911
Author: @ischencheng
Created: 10/17/2026
Status: 🔄 Open
Base:
main← Head:fix/prefill-chunk-cap📝 Commits (1)
7281c11prefill: a fixed --prefill above 65280 tokens is capped, 65536 stopped the engine at the first longer prompt (#2743)📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
src/program/generate.cpp(+9 -0)📄 Description
Problem and result
With a fixed
--prefill 65536, the first prompt longer than 65536 tokens stops the engine withiq_embed_rows: invalid argument(#2743). The token embedding launches one grid row per token of the chunk, and a grid's y is at most 65535. It still happens on 0.2.1.3.With this change a named chunk above 65280 (the largest multiple of 256 under the limit) is read as 65280, with one line at start. The same prompt is then read instead of ending the engine.
--prefill auto(at most 32768) and every named chunk up to 65280 are unchanged.Related discussion
#2743. This is #2911 after the 0.2.0-beta reset. The commit still applies to
mainwithout a rebase.Approach
One cap where
--prefillis parsed (src/program/generate.cpp, +9 lines).Reading the code I found two launches with one grid row per token:
iq_embed_rowsandgdn_l2_kernelingdn_conv. Tiling just those two also worked on IQ2_XS. But other packs and the layer split reach more per-token launches that I cannot test, so one cap covers them all. 65280 and 65536 read at the same speed.SYCL has its own
generate.cppand is not changed.Validation
Passed:
cbfd5b92(0.2.1.3, engine 0.1.46.2), Linux, one L40S 46 GB (sm_89), driver 610.57.04, IQ2_XS native pack,--max-context 131072 --kv int8. Each start: a short chat, then the same 70,433-token word list with two codes (one in each 65280-token chunk), then the short chat again.--prefilliq_embed_rows: invalid argument, HTTP 503BLUE-4417, RED-9052BLUE-4417, RED-9052BLUE-4417, RED-9052With this PR at 65536 the engine lends the same 21242 slots as main at 65280, and the short replies, the long reply and the drafts accepted (8 of 15) are the same. Speeds are single runs.
src/program/generate.cppofcbfd5b92compiles for gfx1201 (ROCm 7.0 image, CPU-only container), on main and with this PR, 131 warnings each.Failed: none observed.
Not run: Windows; the reporter's NVFP4 pack; a HIP card; a layer split; the Metal build (it compiles the same
generate.cpp; I did not set up metal-cpp); SYCL (its own copy, not changed); Qwen3.6 (strata-q36, a separate program).Limits
A prompt chunk is now at most 65280 tokens. The per-token grid launches themselves are left as they are.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.