Skip to content

[Engine] inkling2: enable multi-GPU DSpark drafting via ds_tap handoff relay - #315

Open
cobra91 wants to merge 1 commit into
simplexai-labs:mainfrom
cobra91:feat/ik2-multigpu-split
Open

cobra91 wants to merge 1 commit into
simplexai-labs:mainfrom
cobra91:feat/ik2-multigpu-split

Conversation

@cobra91

@cobra91 cobra91 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem and result

Inkling 2 Mini drafting with --draft-model (DSpark) previously failed when running across multiple GPUs with --layer-split (refusing with "Inkling 2's --draft-model runs on one card (no --layer-split)" or miscalculating loop core bounds on Unsloth GGUFs with "a card of a split starts inside the loop"). Additionally, draft_model was cleared on non-last cards, preventing Card 0 from capturing intermediate layer features, and block_guess_ was disabled on split engines.

This PR enables DSpark drafting on multi-GPU layer splits via ds_tap handoff relay, achieving up to +66% decode speedup (199.23 tok/s on window 4) and +57.1% prompt prefill speedup on an asymmetric dual-GPU rig (RTX 5080 + RTX 4060 Ti).


Approach

  • engine/src/poly/engine.cpp: Updated Engine::open() to match name == "inkling" (alongside "inkling2_loop") and inspect both loop.start/loop.core_start and loop.count/num_loops so --layer-split auto does not bisect the recurrent loop core. Kept draft_model intact for Card 0 on Inkling and kept block_guess_ active on multi-card engines for models with own_blocks().
  • engine/src/poly/inkling2.hpp & inkling2.cpp: Added 3 rows to carry_rows() (kBlocks + 2 + (ds_file_ ? 3 : 0)) and relayed intermediate feature taps ds_tap_[0..2] across cards via carried().
  • VRAM optimization: Uploaded tok_norm_ and called ds_load() only on the card hosting the drafter, saving ~370 MB VRAM on Card 0.

Validation & Gains

Testbed: Windows 11, MSVC 19.44, CUDA 13.4 (sm_89;120), RTX 5080 16 GB + RTX 4060 Ti 16 GB (--layer-split 18)
Command: build\strata-poly.exe --model models\Inkling-2-Mini-UD-IQ3_XXS.gguf --draft-model models\dspark-Inkling-2-Mini-Q8_0.gguf --window <W> --layer-split 18 --tokens 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 --max-new 128

Configuration Prefill (PP) Decode (TG) Drafts Accepted Output Parity Gain vs No Draft
Dual-GPU without DSpark (--layer-split 18) 53.1 tok/s 121.05 tok/s — Reference —
Dual-GPU + DSpark (--window 2) 83.4 tok/s (+57.1%) 147.04 tok/s 61/63 (96.8%) 100% bit-exact +21.5%
Dual-GPU + DSpark (--window 4) 83.4 tok/s (+57.1%) 199.23 tok/s — 100% bit-exact +64.6%

Checks

  • Build: ninja -C build strata-poly poly_inkling2_test (revision 28688bc) — clean build, 0 errors.
  • Unit test suite: build\poly_inkling2_test.exe on RTX 5080 (sm_120) — 431 checks, 0 failed.
  • Not run: ROCm / HIP multi-GPU execution (hardware not present in local test environment).

Limits

  • The drafter currently executes on the last card of the split, which receives the relayed feature taps alongside the residual streams.

…off relay

# Conflicts:
#	engine/src/poly/inkling2.cpp
#	engine/src/poly/inkling2.hpp
@cobra91
cobra91 force-pushed the feat/ik2-multigpu-split branch from 28688bc to adeb22c Compare November 26, 2026 08:16
@cobra91

cobra91 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased cleanly onto v0.2.20-poly.5 (d62dfacbe, keeping upstream's 4-tap kDsTaps carry_rows() / carried()).

Updated Benchmarks on v0.2.20-poly.5

  • Rig: Windows 11, RTX 5080 16 GB + RTX 4060 Ti 16 GB (PCIe Gen4 x2), CUDA 13.4 (sm_89;120)
  • Model: Inkling-2-Mini-UD-Q4_K_XL.gguf + dspark-Inkling-2-Mini-Q8_0.gguf, --layer-split 18 --kv fp8 --max-context 32768, 302-token prompt, 256 generated tokens:
Configuration Prefill Decode Drafts Accepted Gain
v0.2.20-poly.5 (--no-draft baseline) 359.8 tok/s 95.97 tok/s — —
v0.2.20-poly.5 + this PR (--draft-model) 495.4 tok/s 167.30 tok/s 198 / 258 (76.7%) +74.3% (1.74x)

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.

1 participant