feat(PR-A3c): batched multi-tenant parallel decode bench (per-session binding, recall-preserving S5) — awaiting GPU run - #127
Merged
Conversation
… binding, recall-preserving S5) Each batch row = a session with its own KV-cache row (per-session binding); one batched forward advances all N in parallel — the capability v0.3's single-tenant serialized served path lacks. Compares batched AR vs batched restored-S5 at N=1..16: aggregate decode tok/s, parallel scaling vs N=1, per-session recall (bottom line). Recall-sacrificing pure sink+window is intentionally out of scope. Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
…ulti-tenant restore) Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
…ear-linear scaling at N=8, per-session recall 1.0 (H200 batched S5) Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
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.
What
PR-A3c direction realized: per-session binding + true parallel multi-tenant decode, recall-preserving (S5 only — recall is the bottom line, non-recall configs out of scope). On a single accelerator, "parallel" = a batched forward where each batch row is a session with its own KV-cache row.
scripts/research/k3_cuda_multitenant_parallel_bench.pyruns batched AR vs batched restored-S5 at N=1..8 on the same prompts.Result (H200 NVL, gemma-4-26B-A4B 4-bit, NIAH ctx≈1238) ✅ RAN
Changes
scripts/research/k3_cuda_multitenant_parallel_bench.py(new bench)inference_engine/v04/restored_attention.py— allow batch-1 RoPEcos/sinto broadcast over B>1 (the one batch-1 fix needed; 32 existing RoPE tests still pass)docs/adr/0014-…md§3.5 + Appendix A;results/research/k3_cuda_multitenant_parallel_gpu.jsonScope / follow-ups
SessionStore→ per-session adapter + batched scheduler) is the remaining productization step. Batched fused spec-decode (DFlash is batch-1 today) is a separate follow-up.Testing
pytest tests/inference_engine/v04/test_restored_attention.py(32 passed — RoPE broadcast fix safe)