Repository navigation
Conversation
|
For anyone wanting to test the full Inkling 2 dual-GPU stack together ( |
|
FYI, in case it saves you a rebase: v0.2.21 includes ec46ef3 ("capability checks are per device, so a mixed-architecture split runs each card's own kernels (#6808 #6796)"). It does the same thing with a On v0.2.21 without this PR, my sm_120 + sm_86 layer split (RTX 5060 Ti + RTX 3060, SQ-15, |
|
Closing as superseded by commit Saw that this landed in v0.2.21 via commit Because it went in as an independent commit, this PR still shows as open, and once again the v0.2.21 release notes omitted any community acknowledgments or attribution. As detailed in #6811, having to reverse-engineer maintainer commits after each release to determine what was cherry-picked without credit or left unmerged makes ongoing upstream contributions unsustainable. We are closing our open superseded PRs here and consolidating all our active engine development, asymmetric multi-GPU optimizations, and low-bit MoE kernels on PolyStrata (https://github.com/simplexai-labs/PolyStrata). |
f253103 to
c234774
Compare
Problem and result
Found the hard way: while testing #6811 with real long prompts,
UD-Q4_K_XLon two different cards answered wrong and logged no error.Before. On two different cards,
sm120::available(),ink_has_int8_tc()andink_has_wmma_f16()answer once for the whole process, on the first card that asks: stage 0 of a layer split, or the primary in EP. The other card is then sent kernels that are empty stubs on its architecture, for every batch withM >= 24. WithUD-Q4_K_XLits NVFP4 experts add nothing to a prompt read, and no error is raised. Decode (M < 24) takes other kernels, so short chats look right.After. Each check answers per device. Same revision without and with this change, Inkling-2-Mini UD-Q4_K_XL, RTX 5080 (sm_120) + RTX 4060 Ti (sm_89):
main--layer-split ep2)mainWrong answers before the change read like "The user has pasted a long string of seemingly random words" or "I only see a fragment": the model does not get the end of its own prompt.
Related discussion
#6808. How this PR came about:
UD-Q4_K_XLon two cards went wrong in the expert-parallel mode, the one [Engine] inkling2: zero-P2P tail-skip for asymmetric dual-GPU and sm_75 TC fallback #6811 takes by default on Windows: 5 of 17 prompts wrong, and the model describing its own prompt as "a fragment" or "random words". Nothing in the log.sm120::available()keeping one answer for the whole process, and measured a fix for that one check on my pair (5/8 -> 8/8 on the short questions).So thank you @markie1006 for the diagnosis and for the scope. This PR only turns it into code for the three checks; the measurements below are from my pair.
The last comment on #6808 (06:47 UTC) hands the PR to @Norhiro. This branch was built and measured before I read that. @Norhiro, if yours is on the way, say so and I close this one in favour of it.
Approach
One helper,
ink_device_capability(probe)inink_cuda.cuh: the answer is kept per current device behind a mutex, the shapedevice_ok()already uses inengine/src/kernels/cuda/nvfp4_decode_sm120.cu. The three checks keep their conditions and lose their ownstatic.M >= 24(expert dispatch) andM > 16(router), so decode does not go through the helper.ink_fp16tc_min_m()from [Engine] strata-inkling on sm_86 (RTX 3090): setup expert split costs 2.6x, DSpark net loss, and exact PRMT FP4/FP8 decode + FP16-TC threshold fix #6716 is not onmain.Validation
Revision: this commit on
main6a6db7f. Windows 10.0.26300, driver 621.24, CUDA 13.4, MSVC, Release,-DCMAKE_CUDA_ARCHITECTURES=89;120. RTX 5080 16 GB (sm_120, GPU 0) + RTX 4060 Ti 16 GB (sm_89, GPU 1), no P2P. Models: UnslothInkling-2-Mini-UD-Q4_K_XL.gguf(experts NVFP4 on layers 0-19, Q8_0 on 20-23) andInkling-2-Mini-UD-IQ3_XXS.gguf(the engine keeps none of its experts in the SF4 format). Engine in--serve, requests to/v1/chat/completions, temperature 0,max_tokens2500.Passed:
cmake --build build --target strata-inklingon this revision: exit 0.mainprefill=996.9 ppts (4.11s) | decode=42.9 tps, this PRprefill=772.6 ppts (5.30s) | decode=42.7 tpsmainprefill=1378.7 ppts (2.97s) | decode=51.8 tps, this PRprefill=993.2 ppts (4.12s) | decode=52.0 tpsFailed:
main(layer-split run) and with IQ3_XXS in EP; with this PR on one card it was answered right. Not caused by this change and not addressed (Limits).Not run:
engine/src/inkling2/cuda/.ink_has_int8_tc()is true andink_has_wmma_f16()is false on both cards, so onlysm120::available()changes behaviour here. The other two checks get the same cache but were not exercised with unlike answers (sm_86 + sm_60, [Engine] strata-inkling 0.1.66: mixed-architecture multi-GPU (sm_86 primary + sm_60 secondary) corrupts logits (KLD 2.25-5.24) in both cuda-ep2 and cuda-ls #6796).--draft dspark: no drafter file on this machine.Limits
The two checks
8 short questions with one right answer each, sent in this order: echo the third of three lines; first word of the third of four lines; last item of a four-item list; a number written at the very end of the message; third of five names; next letter after A, B, C, D; a word given in a French sentence; second word of a title. A question counts as right when the expected string is in the answer.
17 prompts: "Ignore the list above. Question: what is 17 + 25? Answer with the number only." behind a list of 0 to 512 plain words taken from a fixed list of 32 (17 sizes, 37 to 1220 tokens). A prompt counts as right when the answer contains 42.