arm: adaptive-KV-streaming correctness/perf on the 2x-RTX RPC-split topology (design phase) - #117
Open
hydra-z[bot] wants to merge 4 commits into
Open
hydra-z[bot] wants to merge 4 commits into
hydra-z[bot] wants to merge 4 commits into
Conversation
… divergence + KV-stream assert crash); rig restored
…k/s comparison (baseline 24.26 vs stream 17.25), q8_0 verdict: no
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design-only arm spec (no rig actions, no merge to main): evaluate the
adaptive KV streaming technique
(RaymondHuang210129/llama.cpp-adaptive-kv-streaming,
branch
feature/adaptive-kv-stream, discussed at ggml-org#28216)on our production topology — 2× RTX same-host RPC split
(5060 Ti 16 GB main + 3060 12 GB rpc peer,
-ts 27,38),parallel: 2,Qwen3.8-27B hybrid (GDN + attention), baseline
d50efc6f0.This is the successor candidate to the context-shift lever
(
--context-shiftis a config-no-op forqwen35— IMROPE/n_pos_per_embd=4hard gate — and force-enabling it is lossy/discard-based with a real
GDN-rollback risk; see the context-shift arm doc). Streaming is exact and
lossless, attention-only, and their tested shape is literally our model
family on the same VRAM class — but upstream tested single GPU, single
process, single slot.
Topology-portability finding (the crux — do not assume)
layer split, FLASH_ATTN_EXT for RPC0-owned KV layers runs inside the
ggml-rpc-serverprocess on the 3060, which today has no path to receive--kv-stream-stage-mib. The streaming branch touches zero RPCtransport code (
ggml-rpc.cpp/transport*: 0-line diffs; an unrelatedggml-rpc.hversion bump rides along). so per-process enablement(env-keyed CUDA-backend activation vs a small rpc-server argv extension)
is an explicit Gate R deliverable of the execution phase, not an
assumption. The spec defines a restricted mode (main-device-only
streaming + peer fully resident) as the fallback evaluation shape.
-sm rowis unsupportable on CUDA (PR105.0 rig-validation) —so composition must be evaluated on the production layer split, and
PR105.0 also proved the in-process single-machine topology is a false
refuge (14× UM-split collapse / −16% best-case vs RPC). RPC split is the
only valid production shape for this arm.
is pinned as Gate G (code-read proof + our post-fix: include recurrent/hybrid models in checkpoint-creation gate (hydra_vortex #316) #5/fork: revert hybrid-model checkpoint-creation gate (hydra_vortex #346, warmup hang on qwen35moe) #9 checkpoint
semantics vs their
7dc5fcd5cache-restore support) — verified, notassumed.
V q5_1is not theirtested
q4_0; the header exposes a DIRECT vs F16 attention-modecapability probe, which the arm runs before any probe traffic.
consistent with the session's llama-kt development ggml-org/llama.cpp#469/The
quantize.pyscript is not needed anymore. Just fetch the latest code and do this as a quantization step: ggml-org/llama.cpp#641/[Work Group] Add RLHF like ColosallChat on bigger dataset to achieve ChatGPT quality ggml-org/llama.cpp#743-Add "-e"/"--eval-threads" to distinguish thread counts for single-token eval and prompt eval ggml-org/llama.cpp#744 bug-class precedent.Merge / integration risk (plainly stated, not a clean rebase)
Sep 4 + PR feat(server): --parallel-ctx-threshold admission gate + UM prefetch net (hydra#747 baseline) #110.
fattn.cuwas churned in between by upstream(
sparse-fa for DSV4/GLM, CUDA + ggml: add sparse-fa for DSV4/GLM ggml-org/llama.cpp#27970, 2026-09-02) — and it's their most-editedfile (+2274-line diff). Cherry-pick will NOT merge cleanly: expect a
manual transplant of streaming hooks onto post-CUDA + ggml: add sparse-fa for DSV4/GLM ggml-org/llama.cpp#27970 fattn (days, not
hours; highest-risk step).
iqp.cpp,RPC RCE patch RPC GRAPH_COMPUTE Arbitrary RCE patch ggml-org/llama.cpp#20908,
transport-apple.*, ...) that WOULD collide withour
GGML_RPC=ONrpc-server build → wholesale merge prohibited by design;the port commits cherry-pick the KV-stream subset only.
PR103 second (trivial — 11-line env gate in
ggml_cuda_try_gdn_cache_fusion),PR104 third (moderate — +560 lines in
ggml-cuda.cure-enteringggml_cuda_compute_forward/graph-capture region +common.cuhggml_tensor_extra_gpufields; regions are mostly disjoint from thestreaming hunks, semantic risk is the graph-capture machinery both touch).
Reversing order maximizes churn in the most delicate file region.
What the doc contains (per existing arm conventions)
Background/premise, confirmed facts table, feature port plan (S0/S1/S2),
merge-risk table incl. our own
fork/pr103-gdn-fusion-implandfork/pr104-mixed-quant-arm+ baseline UM-prefetch commit, hypotheses(H1 portability/H2 concurrency/H3 rpc-plumbing/H4 kv-type), rig + launch
spec (747.4 pin +
--kv-stream-stage-mib, cells with per-VRAM/pinned-RSSbudget logging), Gates B/T/R/G, test cells A–F (parity at 65536 total ctx;
prod-shape 262144; capability cell 524288; 2-concurrency depth via the
PR105.0 2×10 multiturn harness; conditional interplay cells), pass/fail
bars (greedy byte-identical parity, both-marker recall ≥5/5 as the
no-discard proof, 0 shift/eviction events, VRAM+host budget ceilings,
throughput floor vs the UM-thrash collapse signature), correctness gates,
and sequencing for the runner.
Reviews sought BEFORE anyone runs this on the rig
restricted cell (main-device-only streaming) is worth early execution if
full composition plumbing stalls.
No rig actions, no build, no test harness executed in this PR. Per arm
convention: no merge without a rig execute pass + explicit user
confirmation.