mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1249] [CLOSED] Pipelined batch: two requests run at half speed (pad rows in group windows, unbalanced slot choice) #3334
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#3334
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/1249
Author: @crazyaimachine
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:pipeline-groups📝 Commits (2)
1f26446Pipelined batch: a group window holds only the slots up to its last active onedee3586serve: spread requests over the pipeline groups when no held prefix is worth keeping📊 Changes
2 files changed (+18 additions, -5 deletions)
View changed files
📝
serve/server.py(+12 -2)📝
src/program/generate.cpp(+6 -3)📄 Description
Two small fixes for
--batch N --batch-groups Gon a layer split. Two concurrent requests ran at about half the speed of the 4-request case per request, sometimes worse.1. A group window holds only the slots up to its last active one (
generate.cpp)Every pipelined group window ran all
GSslots of its group. An idle slot ran a pad row through every layer of every stage. The server spreads requests over the groups first (slot_order). So with--batch 4 --batch-groups 2and two requests, every window was half pad rows. NowPGroup::Sis the group's last active slot + 1, and the window, its picks andbatch_launch()cover only those slots.This fix was in the #559 series (ca74f92 there, "pipelined group windows only up to the last active slot"). It did not come along into 0.1.39, where the non-pipelined path got the same idea.
2.
pick_slot()spreads requests over the groups (serve/server.py)When no slot held the prompt's start,
pick_slot()took the least recently used free slot. Once every slot held an old conversation, two new requests could land in one group while the other group's stage sat idle. Now the rule is:Measured
Setup:
--batch 4 --batch-groups 2 --trim-stage-weights, layer split 22, images on.Without
--batch-groups(one group), 0.1.40.1 gave 50 / 68 / 94 on the same machine.Not solved
Even with both fixes, a round of two requests now and then still runs at ~19 tok/s each, with the requests in slots 0 and 2 (different groups). In six back-to-back rounds the worst was 52 tok/s total, but it does happen. I have not found the cause yet. If you have an idea where to look (doorbells? the stage hand-off?), I am happy to test.
The two commits are on 0.1.40.1 and apply to current
main. Written by my agent, measured on my machine.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.