mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1179] [CLOSED] batch: with --batch-groups, a group's lowest free slot first (+14-22% at 2-3 clients) #3291
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#3291
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/1179
Author: @blange48
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:slots-metrics-0401📝 Commits (1)
5c60815serve: with --batch-groups, a group's lowest free slot first (STRATA_SLOT_LOW_FIRST, on by default)📊 Changes
2 files changed (+35 additions, -1 deletions)
View changed files
📝
serve/server.py(+8 -1)➕
serve/test_slot_alloc.py(+27 -0)📄 Description
With
--batch-groups: a group's lowest free slot firstMost of this PR is now in 0.1.40.2: the windows up to the last active slot (via #1249) and
/metricsin the Prometheus text format with the monitoring kit (#793). Thanks! What remains is one slot-choice rule, rebased onmain(e8ca9af) as a single commit.The case
A pipelined group's window runs every slot up to its last active one. 0.1.40.2 picks the group with the fewest busy slots, then, inside it, the free slot with no held prefix and the least recent use. A pipelined slot is never kept as a conversation cache, so held prefixes don't separate them, and in an empty group the least-recently-used one can be slot 1. Every window of every stage then carries a pad row for slot 0, which is the leading-hole case @rhgo1749 found on #793.
The change (
serve/server.py, 6 lines + a test)Within the chosen group, the lowest free slot comes first (
b % group_sizein the sort key, after the fewest-busy-group term, so 0.1.40.2's spreading over groups is unchanged).STRATA_SLOT_LOW_FIRST=0restores 0.1.40.2's choice exactly. Without--batch-groups, nothing changes.serve/test_slot_alloc.pychecks that an empty group's first request takes its slot 0 when the LRU order points at slot 1, and fails withSTRATA_SLOT_LOW_FIRST=0.Measured
4× RTX 5080 16 GB (PCIe Gen3), IQ3_S, 262K, int8 KV,
--layer-split 12,24,36 --trim-stage-weights --batch 8 --batch-groups 4, MTP spec 4, through the HTTP server, T=0.7, 300 tokens, 3 requests per client. Same image (0.1.40.2 + this), two passes each, total tok/s:STRATA_SLOT_LOW_FIRST=0(0.1.40.2's rule)So +14 to +22% at 2-3 clients and +10% at 4. At 8 every slot is busy and the rule has nothing to choose. Batch vs solo stays identical (
batch_test, 8/8 and 3/3). It's in our production since today.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.