mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #846] [CLOSED] Keep MTP drafting in concurrent batch slots #2867
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#2867
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/846
Author: @rkcth
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:codex/batch-mtp-pr📝 Commits (1)
f6d673bKeep MTP drafting in concurrent batch slots📊 Changes
7 files changed (+357 additions, -103 deletions)
View changed files
📝
docs/BATCHING.md(+15 -6)📝
include/strata/core/mtp.hpp(+6 -2)📝
include/strata/core/verify.hpp(+10 -5)📝
serve/server.py(+2 -2)📝
src/core/mtp.cpp(+44 -15)📝
src/core/verify.cpp(+136 -50)📝
src/program/generate.cpp(+144 -23)📄 Description
Problem
Batch slots currently verify one token per request, even when solo decoding uses MTP drafts. On a single GPU this can give up much of the solo decode speed as soon as a second request arrives.
Change
With
MULTI_CONCURRENCY=TRUE, each active batch slot drafts one token and verifies the current token plus that proposal in a shared window. Each slot keeps private draft KV/state while borrowing the immutable MTP weights and head. The verifier commits only the accepted prefix for each slot; more slots rotate through its eight-row windows. The existing batch path remains the default.The diff also bounds captured batch-graph layouts, documents the opt-in setting and hardware limits, and removes evaluation-only probes and diagnostics. The comments focus on shared ownership, accepted-prefix state, and slot rotation.
Validation
python -m unittest serve.test_parallelpassed (11 tests).Limits / review focus
Grouped MTP is currently single-GPU only and verifies one proposal per slot. It has not been tested on 16 GB cards or NVIDIA. Per-slot draft state and buffers reduce VRAM available to the expert cache; a smaller card may see less benefit or fail to fit the requested slot count. A longer mixed-workload soak and cross-hardware checks are still needed before enabling this by default.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.