Repository navigation
Conversation
|
Thanks for the pull request. To keep the tracker readable, every item needs an area prefix in the title and the parts of the pull request template filled in. This one is missing:
Edit the pull request (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment Details: CONTRIBUTING.md |
|
Thanks, this follows the format now. |
|
I tried the core-on-GPU-0 placement in the standalone ik2 engine (merbanan's 435cec2 plus my fixes and the attention changes from #6506) on 2x Tesla T10 (sm_75), Inkling-2-Mini UD-Q4_K_XL, On this box it's slower:
ik2's EP hand-overs are cheap enough that keeping both GPUs computing experts every visit wins. That's true even without P2P, because ik2 hands over through mapped host memory (zero-copy), not a host bounce. So the gain you measured probably depends on how expensive the engine's hand-over is. P2P on an AMD desktop board: it was the IOMMUThe T10 pair sits on two CPU root ports of a Ryzen 7 5700G (x8/x8, The prompt's attention split tooSince my last comment I also split the prompt's full-layer attention over both GPUs. GPU 1 now keeps a copy of every full-layer K/V row (4.1 GiB) and takes a chunk's old keys All of this is against ik2, not |
|
@EliahHofmann Thank you for this exceptionally detailed and rigorous benchmark breakdown! Your findings explain the architectural behavior with total clarity and touch upon the core challenge of multi-GPU inference across diverse consumer and workstation hardware. 1. Symmetric vs Asymmetric Dual-GPU DynamicsYour benchmark highlights the fundamental difference between symmetric and asymmetric hardware topologies:
2. The
|
|
2x RTX 3060 12 GB, sm_86, Linux, Build — Model Measured — serve path, synthetic but varied token ids (not real text),
For reference, on the same cards and the same model llama.cpp (Unsloth b12588 fork, So: this build is 1.5x faster than llama.cpp up to ~8K, and 2.5x to 13x slower from 16K up — the crossover is where Two things that may be worth a look:
Limits of this report — synthetic prompt ids rather than real text, one run per point, |
|
Thanks for testing Here are the answers to your two questions from
If you get a chance to test |
|
Tested Same build (
Against the same build without the reserve, from my earlier post: 25.9 -> 35.9 at 16K, and 9.4 -> 30.0 at 32K. That is 3.2x at 32K, and it now sits at or above llama.cpp on these cards (29.8 tok/s flat, prefill 246-253). Your diagnosis of Two observations:
I am running one more cell now: Limits unchanged: synthetic ids rather than real text, one run per cell, no drafter, no quality or recall checks. |
|
Follow-up: 131,072 with
The sequence in the log: So on 24 GB total the reserve buys a clean, fast window up to 32K (30 tok/s) and then the same Practical reading for a 12 GB pair: this configuration is a 32K engine. Up to there it is at or above llama.cpp (30.0 vs 29.8 tok/s, 310 vs 250 prefill); past ~82K it cannot run at all, and between the two the behaviour is untested — I have not measured 48K or 64K. If it is useful I can find the actual boundary with two more runs (49,152 and 65,536), or run your |
|
Two runs, same build and GGUF,
The second run grows the elastic KV in VRAM the whole way ( k8v4 is what makes this possible. With fp8 at 131,072 the run died at 82,432 tokens ( Resulting depth curve on this box, all with
Against llama.cpp (Unsloth b12588 fork, Limits: synthetic varied ids, one run per cell, no drafter, no quality or recall checks, |
|
Great results — seeing On the remaining gap vs
Your two suggestions are spot-on:
Re: the 147–182 s load time with host experts — yes, that comes from the host-tier expert repack/placement path when |
|
Tested the IQ4_XS hypothesis: it does not explain the host tier, but it is 13 % faster anyway. Same build,
Both keep the full 114,688-token KV in VRAM with no spill. The 1.9 GB does not account for the 384 host experts. IQ4_XS lands on 383 host, within one expert of Q4_K_XL. The control case is the same file at 0 reserve: So the split is clean at 0 reserve, and it is the 4 GiB reservation itself that pushes ~380 experts out, at either size — the reserve costs roughly the same number of experts regardless of the model file, which suggests the placement is clamping to a per-card budget rather than merely fitting what is left. Worth a look in What the smaller file does buy is ~13 % on both prefill and decode (288 vs 258, 26.4 vs 23.2) — consistent with less memory traffic per token from smaller expert matrices, not with a change in placement. Current standing on this box, all fully resident KV: 46 tok/s at 4K, 44 at 8K, 36 at 16-22K, 30 at 32K, 26.4 at 112K, against llama.cpp (Unsloth b12588 fork, Load time on IQ4_XS with the host tier was 234 s in this run versus 76 s for Q4_K_XL — the repack path is variable enough that I would not read anything into that difference from one run each. |
|
Both suggestions are now implemented in commit
Verification note: we verified the build, the |
|
Just saw your That
With commit |
|
Verified Startup now:
Two regressions against the manual
At 32K the same thing happens one step earlier (26,112 VRAM + 6,656 host = 32,768) and completes, but the partially-hosted cache costs 30.0 -> 21.5 tok/s. So a ~2 GiB auto reserve buys a perfect expert split and a slow-or-failing cache; the 4 GiB manual reserve bought a slightly worse expert split and a resident cache. Neither is right, and the second is much faster.
Suggested shape: derive the KV requirement from Happy to re-test any build you push — this box is idle and the three cells take ~25 minutes. What I have not tested: |
|
Addendum — the same commit with the manual reserve, for the comparison:
So on this commit the manual reserve still completes the 112K cell at 25.7 tok/s — 0.7 tok/s below Net on 2x12 GB: placement fixed, cache reserve not. Auto gives a perfect 3,072-in-VRAM split and then starves the elastic KV growth; manual 4096 keeps the cache resident at the price of ~500 host experts. A budget that takes the |
|
You nailed the exact reason both 32K and 112K hit the wall — thank you for running those three cells!
Both are now fixed in commit
Tested locally at 32K prompt ( |
|
The growth log no longer stops at the spill point — it walks That is the exact cell that died at 66,048 last time, so the For reference on the same box (IQ4_XS, 112K):
So this is now the best configuration on 12 GB cards and the one that needs no tuning flag — the auto reserve plus the placement fix together beat every manual reserve we measured, with 3,072 of 3,072 experts in VRAM. Nothing else regressed: 8K was 44.9 on Untested by me: |
|
Thank you for verifying As promised, both KV fixes ( For anyone testing the full Inkling 2 dual-GPU series together ( |
|
Data point for the asymmetric case, and the first one here with real hardware P2P: the same idea (all of the looped core L6..17 on the fast card) also works as a plain layer split, with the existing Setup. RTX 5060 Ti 16 GB (sm_120, PCIe 3.0 x8) + RTX 3060 12 GB (sm_86, PCIe 3.0 x16), i7-7800X (X299, the two cards on different CPU root ports), 93 GB RAM, Linux, driver 615.71.09. P2P comes from a patched open kernel module (aikitoria's Note on the numbering: the engine log calls the 5060 Ti Decode is 7 prompts of 128-400 tokens. Reads are time to first token. Q is 12 short factual questions.
For comparison, the 5060 Ti alone with every expert in VRAM gave 65.0-65.2 tok/s and 0.44 / 2.93 / 23.9 s earlier today. What I see:
Not run: this PR's EP2 tail-skip itself (I used v0.2.20 EP2 with |
|
Thank you @Norhiro for these detailed empirical benchmarks on an asymmetric rig (RTX 5060 Ti sm_120 + RTX 3060 sm_86). Your setup mirrors the exact hardware scenario that motivated this PR: our development rig is also an asymmetric Blackwell + Ada pair (RTX 5080 16 GB sm_120 + RTX 4060 Ti 16 GB sm_89). Here is why your test case is especially relevant to
|
|
Thanks @cobra91, and good to know your rig is the same kind of asymmetric pair. I can't run the tail-skip test for now, sorry. After my last comment I moved the RTX 3060 to another machine, so this box has only the 5060 Ti. There is no 5060 Ti + 3060 pair to test on at the moment. If I put the two cards together again, I'll run A small correction for the record: #6982 is your PR, not mine. I only built it into my v0.2.20 engine for those runs. With it, the mixed sm_120 + sm_86 split gave 12/12. On the loop-aware layer split: I agree it should only change the default when the cards differ, since the balanced split wins on equal cards (the T10 table). I'm happy to test a patch for it once the pair is back. |
|
Thanks @Norhiro for the clarification regarding #6982, and completely understood regarding your test rig hardware availability! To provide clarity for everyone following this thread and testing dual-GPU setups on the latest v0.2.21 release: 1. Status of the Capability Check (#6982 / #6808) in v0.2.21The reason mixed-architecture splits (such as RTX 5060 Ti sm_120 + RTX 3060 sm_86) now pass 12/12 in official builds is that Niko integrated the per-device capability caching directly into v0.2.21 via commit 2. Status of this PR (#6811) in v0.2.21This PR (#6811) remains completely unmerged and separate. In v0.2.21:
3. Maintainer Workflow & Community Contributions NoticeAuditing the 292 commits of the v0.2.21 cycle reveals a consistent pattern regarding community contributions:
This workflow imposes an unsustainable burden on external contributors: after dedicating dozens of hours to diagnosing bugs, developing clean fixes, and validating benchmarks on physical hardware, contributors must spend additional hours reverse-engineering hundreds of maintainer commits just to determine what was cherry-picked, adapted, or left unaddressed. 4. Transition to PolyStrataGiven the overhead of tracking uncredited cherry-picks and unmerged PRs, we are stepping back from submitting further engine PRs or dual-GPU fixes to
Moving forward, our active development on asymmetric multi-GPU topologies (zero-P2P tail-skip, multi-GPU CUDA graph capture in EP2, DSpark multi-GPU drafting, and sm_75 Tensor Core support) is consolidating on PolyStrata (https://github.com/simplexai-labs/PolyStrata), where contributor PRs, code reviews, and proper attribution are handled transparently. Anyone interested in running optimized asymmetric dual-GPU setups or testing the tail-skip path is welcome to follow and test our work there. Thanks again to @EliahHofmann and @Norhiro for the thorough empirical benchmarks and constructive technical discussions in this thread! |
Re-test on merged
|
| build | flag | prefill tok/s | decode tok/s | placement line |
|---|---|---|---|---|
6e86a1197 (branch, Nov 23) |
none | 358 | 40.56 | 1,525 + 1,547 experts, 0 host, KV in VRAM |
main 0.1.69 |
none | 290.8 | 10.34 | global KV = 0 VRAM + 32768 mapped host tokens, 451 host experts, 0.80 GiB free VRAM after load |
main 0.1.69 |
--vram-reserve-mib 4096 |
216.3 | 21.83 | fewer host experts, KV resident |
main 0.1.69, Q4_K_XL |
none | 263.1 | 10.1 | 1,341 + 1,024 GPU / 707 host |
So on this pair the merged code loads, finds 0.80 GiB free, and moves the whole global KV to mapped host — which is the configuration we measured at ~4 tok/s during the reserve investigation. The --bench path and the --serve line protocol agree (10.2 vs 10.3), so it is not a harness artefact, and it reproduces on a second quant.
The question I cannot answer from here: did the ctx-aware reserve survive the refactor into ink_runner_ws_reserve_bytes(max_slots, has_dspark)? On c6c4e5876 / 6e86a1197 the reserve was computed from --max-context at load time; on 0.1.69 the same flag produces a reserve that is 0.26 GiB short of holding 32K of k8v4 KV beside the experts. It is also possible that --bench, which grows its own context, is meant to be sized differently from --serve — if so, say so and I will re-run with whatever flag is canonical.
I am not claiming the regression extends beyond this pair of 12 GB cards; 0 host experts at 32K was the whole point of the earlier cells, and that is what changed.
|
Thanks for the detailed re-test To make testing easier in a single build, we put together a combined branch git clone https://github.com/cobra91/PolyStrata -b test/dual-gpu-bundleIt lets you benchmark both # Symmetric layer split + DSpark (#315)
./strata-poly --model Inkling-2-Mini-UD-IQ4_XS.gguf --layer-split auto --kv fp8 --max-context 32768 --tokens <ids> --max-new 64
# Asymmetric / expert-spill GPU-to-GPU doorbell + CUDA graphs (#356 + #357)
./strata-poly --model Inkling-2-Mini-UD-IQ4_XS.gguf --expert-gpu 1 --kv fp8 --max-context 32768 --tokens <ids> --max-new 64Feel free to share any |
59db8f2 to
d7ee50f
Compare

Problem and result
On consumer dual-GPU setups without hardware peer-to-peer / NVLink (e.g. Windows WDDM or PCIe root complexes), Inkling 2 Mini in
cuda-ep2mode incurred 48 cross-GPU host bounce roundtrips per token, degrading decode performance to 48.4 tok/s and triggering auto-downgrade to Layer-Split (cuda-ls, 45.0 tok/s). Additionally, Turing GPUs (sm_75, such as RTX 2080 / T4) had an empty(void)c;fallback inmma_m16n8k16_f16, generating blank/corrupted output.With this PR:
layer_has_peerto evaluate tofalseduring core visits. 75% of layer executions run locally on GPU 0 with zero cross-PCIe synchronization stalls.cuda-ls) / 48.4 tok/s (cuda-ep2) to 61.8 - 62.8 tok/s (+30% to +37%), and prefill increases from 70.1 ppts to 107.4 ppts (+53%).sm_75decomposesm16n8k16into dualmma.sync.aligned.m16n8k8operations, restoring functional Tensor Core acceleration.Related discussion
Replaces and streamlines the core CUDA improvements from closed PR #6506 into a minimal 28-line surgical patch on current
main.Approach
engine/src/inkling2/cuda/ink_runner.cuh:layer_has_peer = falsewhen all experts for that layer reside on the active GPU, skippingpeer_accumhost roundtrips.want_peer, allocates core looped layers (6..17) to GPU 0 and outer prelude/coda layers (0..5, 18..23) to GPU 1.hyb_post_res).engine/src/inkling2/cuda/ink_cuda.cuh:mma.sync.aligned.m16n8k8.row.col.f16.f16.f16.f16instructions for__CUDA_ARCH__ == 750.cuda-ep2multi-GPU mode andsm_75compilation targets. Single GPU execution outsidesm_75is bit-identical and unaffected.Validation
Passed:
cmake --build build-v0220 --config Release --target strata-inkling).sm_120) + GeForce RTX 4060 Ti 16 GB (Adasm_89), non-P2P PCIe, Windows 11.strata-inkling.exe --bench --native Inkling-2-Mini-UD-Q4_K_XL.gguf --draft off --gpus 2 --prompt-len 64 --gen 128v0.2.20(cuda-ls): 70.1 ppts, 45.0 tok/s.v0.2.20(cuda-ep2forced): 70.1 ppts, 48.4 tok/s.cuda-ep2): 107.4 ppts (+53%), 61.8 - 62.8 tok/s (+37%). VRAM: 1,536 experts GPU0, 1,536 experts GPU1, 0 host spill, 4,665 MB free headroom on GPU 0.Failed:
Not run:
sm_75) hardware (verified compilation underarch=compute_75,code=sm_75via NVCC; physical run requires Turing GPU).ink_runner.cuhandink_cuda.cuhonly).Limits