mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #859] [CLOSED] Layer split: pipelined verify windows for one conversation (--pipeline-windows, opt-in) #2878
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#2878
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/859
Author: @Hardin22
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:pr/pipeline-windows📝 Commits (2)
2afec96MTP drafter: a teacher-forced chain as one asynchronous launch811795cLayer split: pipelined verify windows (--pipeline-windows, opt-in)📊 Changes
10 files changed (+1601 additions, -33 deletions)
View changed files
📝
docs/MULTI_GPU.md(+39 -0)📝
include/strata/core/expert_source.hpp(+3 -0)📝
include/strata/core/mtp.hpp(+44 -2)📝
include/strata/core/progress.hpp(+2 -0)📝
include/strata/core/verify.hpp(+52 -0)📝
include/strata/kernels/verify_kernels.hpp(+3 -0)📝
src/core/mtp.cpp(+158 -4)📝
src/core/verify.cpp(+307 -10)📝
src/kernels/cuda/verify_kernels.cu(+11 -0)📝
src/program/generate.cpp(+982 -17)📄 Description
Refs #642. These are the pipelined windows from the fork, ported onto main and opt-in (
--pipeline-windows 2; the default 0 changes nothing).With a layer split, one conversation's decode is serial: stage 0 runs its layers and hands off, then waits while the last card runs its layers, the head and the draft. The batch pipeline from #559 overlaps different conversations, so a single conversation gets nothing from it.
--pipeline-windows 2starts window K+1 on stage 0 while stage 1 still verifies window K.STRATA_PIPELINE_THETA).Two commits:
MtpDrafter: a teacher-forced chain as one asynchronous launch. Nothing calls it on its own, and
draft()is unchanged for the serial loop.The pipelined loop: a non-blocking form of the Verifier's
run()/commit()on thebatch_launch/batch_pollpattern, two verifiers per stage, the adaptive tier fenced against the windows in flight, and the VRAM for the second verifier and the snapshots. It turns itself off, with one log line, for anything it does not handle:--batch;--peer-device;--remote-expert-opt;Requests with
penalty_last_nor coupled draft sampling decode serially.Measured
Swift 1.5 IQ3_XXS at 160K (q4_0 KV, stock draft layer). RTX 4060 Ti (layers 0-19) + RTX 5080 (20-47), i9-14900KF, 32 GB of RAM, with the resident RAM mode on the split from #848. Greedy, 500 tokens, two interleaved serial/pipelined pairs of three rounds each, decode tok/s:
--pipeline-windows 2It pays when the windows are GPU-bound. On the same PC without #848 (experts read through the OS file cache,
--mmap-experts), the file reads dominate and it was not measurably faster.Correctness
STRATA_IQ_MT_MIN=1 --pcie-frac 0 --adapt-every 0, the greedy text is identical bit for bit to the serial loop's, as long as both have the same expert caches: 4/4 prompts, 500 tokens. The serial run was given the pipeline's reserve through--vram-reserve-mib.STRATA_PIPELINE_THETA=2(no speculative window at all);STRATA_PIPELINE_FORCE_MISS=1(every speculative window wrong and rolled back), with and withoutSTRATA_PIPELINE_DOOM_SKIP=0;STRATA_PIPELINE_PRESTAGE=0;STRATA_PIPELINE_SNAP_OVERLAP=0.STRATA_PIPELINE_FORCE_MISS=2.Not tested
#if !defined(STRATA_USE_HIP), and the new forcing kernel is plain code.service()only raises the stage flag.Happy to split it differently or change the defaults if you prefer.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
portlocal it reads (#2872) #4311