Skip to content

Add opt-in accepted-token adaptive cache barriers - #1779

Closed
CC-David-CC wants to merge 6 commits into
Niko1221:mainfrom
CC-David-CC:feat/accepted-token-cache-barriers
Closed

CC-David-CC wants to merge 6 commits into
Niko1221:mainfrom
CC-David-CC:feat/accepted-token-cache-barriers

Conversation

@CC-David-CC

@CC-David-CC CC-David-CC commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Holds expert placement fixed within each accepted-token block, counts accepted routing only, and drains/verifies commits before blocking swaps at the boundary. Rejected draft and speculative rows do not count. Pipelining continues inside each block; the default path stays off.

Refreshed onto current main 61b3fb5d. A positive STRATA_ADAPT_BARRIER_TOKENS now resolves blocking adaptation before three-stage pipeline admission. Previously current main disabled the pipeline before the later async override.

Fresh three-P4 / ISTA IQ3_XXS / int8-KV validation: four 30-request matrices pass exact output/finish and accepted-routing/residency-hash comparisons, using intervals 64/17 and swap limits 80/160, with and without the CPU dispatch fix. Serial, pipeline, forced rollback, no-guess and serial-repeat arms follow the same ordered request history. Twelve current-main-versus-feature-off comparisons pass too. CUDA/HIP/SYCL builds pass; HIP/SYCL model execution is not claimed.

Exact comparisons explicitly set STRATA_IQ_MT_MIN=1 and STRATA_ROUTE_TAIL_SKIP=0. Ordinary rank-7 routing can change target contributions with draft-window composition; two same-binary negative-control matrices remain published. Adaptive repeats are compared at matching request histories using #1813's explicit mode; original static audits remain visible. The barrier does not change ordinary tail-skip defaults.

Requires serve mode, a layer split, no PCIe miss sharing and positive adaptive settings. Barrier value unset/0 keeps the existing path. The interval replaces the window-based cadence and forces blocking adaptation even if async was requested. Unsupported remote/helper modes are refused. No fresh universal speedup or arbitrary numerical/quality guarantee is claimed.

Fresh full outputs, manifests, profile, hashes, coverage, build evidence and limits.

Cass67 and others added 6 commits October 9, 2026 21:32
…er scratch race

--pipeline-windows 2 now runs on any layer split with two or more stages. Every
stage but the last is a front stage: the guessed window follows the verified
one through them one card behind (an odd verifier and an odd hand-off on every
boundary, a pair of GDN snapshots on every front stage, commits and the undo
per stage), and only the last stage waits for the verdict. The pipelined prompt
read (--pipeline-windows 1) and --adapt-async stay two-stage.

HIP: the draft layer's per-row gr_read used the last stage's session scratch
(ss.block.gr), which that stage's verifier also uses in lm_head_mix. A chain
launched at a verdict and the next window's last stage can run on the card at
once after a guess that held, and the window's head then read a clobbered mix.
The draft layer now carves its own GrWorkspace.

Measured on 4x RX 7900 XT (Flash-Next GSQ-RCO IQ3_S, split 12,24,36, every
expert in VRAM, greedy, reasoning off): decode 59.4 -> 67.6 tok/s at 4K and
51.8 -> 65.6 at 32K. Greedy text identical to the serial loop on four prompts
with STRATA_IQ_MT_MIN=1 --pcie-frac 0 --adapt-every 0, also with every guess
forced wrong. Debug knob STRATA_PIPELINE_SPEC_DEPTH. Two-stage path not re-run
on two cards.
@CC-David-CC CC-David-CC changed the title feat: accepted-token adaptive cache barriers; 3x P4 23.69 -> 28.30 tok/s Add opt-in accepted-token adaptive cache barriers Oct 11, 2026
@Niko1221

Copy link
Copy Markdown
Owner

Thanks. There is no speed claim and it is a large change; not taking it for the speed release.

@CC-David-CC

Copy link
Copy Markdown
Contributor Author

want me to close pr ?

@Niko1221

Copy link
Copy Markdown
Owner

Thanks for the pull request.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to review properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Rebase on main if it no longer applies, and re-run your checks on 0.2.0-beta.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the pull request template: the problem and result, and the validation (what you ran, on which revision, what you saw).
  4. Comment /reopen. A check runs and either reopens the pull request or lists what is still missing.

The rules are in CONTRIBUTING.md.

@Niko1221 Niko1221 closed this Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants