mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2896] [CLOSED] STRATA_SLOT_COPY_DIRECT: the slot drafters K/V device to device too (--batch-mtp) #4322
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#4322
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/2896
Author: @andyhrc
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:pr/batch-mtp-copy-direct📝 Commits (1)
29f3d3abatch: STRATA_SLOT_COPY_DIRECT also copies the slot drafters' K/V device to device (--batch-mtp)📊 Changes
2 files changed (+13 additions, -7 deletions)
View changed files
📝
docs/BATCHING.md(+1 -1)📝
src/program/generate.cpp(+12 -6)📄 Description
With
STRATA_SLOT_COPY_DIRECT=1(dd544364) an admission and a slot's resume copy the running state and the QSA K/V device to device. With--batch-mtpthe slot drafters' K/V still went through a host image (conversation_kv_save+conversation_kv_restore) incopy_to_slotandcopy_from_slot. This makes that copy go throughconversation_kv_copytoo when the switch is on;conversation_kv_copyalready restores the draft ring's residency (kv_mode == 2) the way a restore does. Without the switch nothing changes.This is the one part of #2728 that upstream's
STRATA_SLOT_COPY_DIRECTdoes not have; it replaces that PR, which I am closing.Measured
2x RTX A4000 (layer split on GPUs 1 and 2), Qwen3.8-Flash-Next IQ3_S,
--batch 4 --batch-mtp,STRATA_BATCH_MTP_SERIAL=1,STRATA_SLOT_COPY_DIRECT=1. The same requests (a conversation of 8.7K, 36K and 112K tokens, three turns each, while another client decodes), upstream/main477ac13cagainst this branch:slot N takes)The slots' MTP acceptance is the same over the same answers (66.2-71.4 % before, 61.5-67.9 % after; the drafts depend on the copied K/V, so a wrong copy would show here first). The rest of the admission (about 60 ms) is the turn checkpoint's host copy, which
STRATA_SLOT_CKPT_MOVE=1/STRATA_CKPT_POOL=1address.For context, on this box
--batch-mtpwith one serial group stays behind the pipelined groups without slot drafts at every concurrency (2 GPUs, 1/2/4/6 clients: 43.0/52.3/54.6/53.3 against 46.4/60.1/75.8/73.0 tok/s; 3 GPUs: 62.1/83.4/89.9/88.6 against 62.7/94.8/136.4/170.9), so the change matters where--batch-mtpis the batch path (one GPU, no layer split) or chosen anyway.Tests
Built natively (CUDA 86); the 2-GPU server runs above.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.