mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1904] [CLOSED] adaptive tier: --adapt-async 1 in the arena mode (one GPU, copy-in only), x1.07-1.11 cold decode on an RTX 3090 + Ryzen 5 5600X #3751
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#3751
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/1904
Author: @RubenTorney
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:pr/async-adapt-arena📝 Commits (1)
57e7d53serve: --adapt-async 1 in the arena mode (one GPU, copy-in only, opt-in)📊 Changes
11 files changed (+723 additions, -23 deletions)
View changed files
➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/README.md(+54 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/bitexact.jsonl(+4 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/bitexact_fixed_cache.jsonl(+4 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/cold.jsonl(+72 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/cold_earlier.jsonl(+96 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/context.jsonl(+24 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-async/strata_ab2.py(+326 -0)📝
docs/DETAILS.md(+8 -0)📝
include/strata/core/expert_source.hpp(+3 -0)📝
src/core/expert_source.cpp(+7 -0)📝
src/program/generate.cpp(+125 -23)📄 Description
Title
Issue: #1903
Summary
In the arena mode the blocking adaptive tier creates and joins a thread every verify window and the next window waits for its
copies: ~3.2 of 25.9 ms per window on this machine (the interval #1863 found outside the timing breakdown). This lets
--adapt-async 1run in the arena too. The arena holds every expert in RAM, so a round is a copy-in only: no copy back, no RAMmove, no exchange buffers. Opt-in; without
--adapt-async 1(and in the resident RAM mode, and on several GPUs) nothing changes.Cold A/B against the v0.1.42 tag (12 distinct prompts x 2 rounds, fresh server per arm and round, paired): x1.07, faster on
12 of 12 prompts (97.2 → 107.7 tok/s; x1.11 in an earlier run the same day, when the learned profile was younger and the tier
swapped more). One cold window: 25.9 → 21.6 ms, adapt wait 0.41 ms, join 0.
What changed
src/program/generate.cpp--adapt-asyncgates accept the arena (srcp == &arena_src) on one GPU; a layer split stays on the blocking tier.exchange = false, the source blob isArenaExpertSource::blob_at(),the RAM-move steps are skipped. The evicted slot is marked non-resident and
res_uploadruns before the round's copies areposted; an expert becomes resident only once its copy's event has completed.
STRATA_ADAPT_ASYNC_WAIT=1(default in the arena): the tick after a round waits for that round, so the window in which anexpert turns GPU-resident does not depend on timing.
STRATA_ADAPT_PICK_INLINE=1(default in the arena): the pick runs onthe host thread, one round per window.
STRATA_ADAPT_ASYNC_BATCH=Ncaps the copies posted per tick (default 0 = all;16 measured 16 % slower here). Arena rounds are as large as the blocking tier's (
--adapt-swaps, not capped at 96).kvg_ensure's quiesce lambdas),kv_quiesceand theVRAMcommand now land the round in flight(
adapt_quiesce) — they only calledapply_pending(true), so a swap still copying could write a slot just lent to the K/V.This also applies to the resident mode's asynchronous tier. A failed round still drains its copies before slots move.
STRATA_DECODE_TIMING=1: the serial--serveline addsadapt wait X join Y, Z swaps/window(part of #1863).--adapt-asynchelp text.src/core/expert_source.cpp,include/strata/core/expert_source.hpp:ArenaExpertSource::blob_at(),blob()without theread counter (it runs on the job thread).
docs/DETAILS.md: the arena paragraph next to--adapt-async 1.bench/results/2026-10-11-community-rtx3090-5600x-arena-async/: method, numbers, raw data (sha256 of every answer), harness.How the default path was checked
STRATA_IQ_MT_MIN=1 --pcie-frac 0 --adapt-every 0), greedy, 6 prompts, two fresh v0.1.42 engines and one of this branch:on the 5 prompts that v0.1.42 reproduces between two of its own fresh engines, v0.1.42 and this branch without
--adapt-asyncgive the same answers byte for byte (sha256), with--expert-cache autoand with a fixed size. The 6thprompt differs between two runs of v0.1.42 itself in that mode on this machine.
host code in
generate.cpp/expert_source.cpp, no backend-specific path.Extra Notes
computes a swapped-in expert on the GPU). On this machine greedy answers already differ between two fresh engines of the
unpatched build (the CPU/GPU split of the misses depends on timing).
little left to swap: level with v0.1.42 at 56K and 117K tokens (95.3 / 97.3 and 97.0 / 96.1 tok/s).
to 65,536 cells during the conversation, no
ERR.🤖 Generated with Claude Code
https://claude.ai/code/session_015oFHMEgBzk7kQSqUVWoc67
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
STRATA_MTP_Q8_SM60=1, opt-in) #4766--pipeline-windows 3, opt-in): a host-side scheduler, a slot pool, per-stage undo, an 11-output draft chain #4771STRATA_SPLIT_COMMIT_ASYNC=1, opt-in) #4791STRATA_SELECT_LONG=1, opt-in, GP100 builds) #4793STRATA_PREFILL_PIPE_FLOOR, the smallest pipelined prompt chunk (default 512, as before) #4794