Repository navigation
Conversation
This was referenced Nov 23, 2026
cobra91
force-pushed
the
perf/inkling2-iq2-moe
branch
from
November 23, 2026 23:28
6e86a11 to
81caabf
Compare
Contributor
Author
|
For anyone wanting to test the full Inkling 2 dual-GPU stack together ( |
cobra91
force-pushed
the
perf/inkling2-iq2-moe
branch
from
November 26, 2026 14:00
81caabf to
c234774
Compare
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.
Problem and result
When running Inkling 2 MoE models with low-bit quantizations (such as Unsloth UD quants:
IQ2_XXS,IQ2_XS,IQ2_S,IQ3_S, and mixedNVFP4down-projections likeInkling-2-Mini-UD-IQ3_XXS.gguf), Strata's CUDA engine fell back to treating them as unsupported raw GGUF formats or inflated CPU repackings. Specifically:ink_gguf_has_gpu_kerneldid not recognizeIQ2_XXS(type 16),IQ2_XS(type 17),IQ3_S(type 21),IQ2_S(type 22), orNVFP4(type 40) in MoE expert weights.ink_gguf_row_byteslacked exact row byte strides for these formats, causing VRAM residency calculations to overestimate expert memory footprint (estimating ~4.5 MB per expert instead of the true ~2.8 MB).hyb=1). Host-PCIe transfers during expert gathering degraded decode speed and caused a 48.16s startup repack delay.This PR adds native CUDA decoding for
IQ2_XXS,IQ2_XS,IQ2_S,IQ3_S, andNVFP4MoE expert weights inengine/src/inkling2/cuda/ink_moe_cuda.cuhusing precomputed constant grid/LUT tables inengine/src/inkling2/cuda/ink_iq_tables.cuh.With native GPU kernels and exact footprint calculation,
Inkling-2-Mini-UD-IQ3_XXS.ggufachieves 100% VRAM residence (hyb=0, 0 host experts) on 16 GB cards, yielding:Q4_K_XL).Related discussion
perf/inkling2-zero-p2p-sm75), PR [Engine] inkling2: zero-copy mapped staging and CUDA graph capture for asymmetric dual-GPU (cuda-ep2) #6815 (perf/inkling2-cuda-graph-ep2), and PR [Engine] inkling2: compact Q8 dense trunk representation (-2.2 GB VRAM, +43% decode) #6823 (perf/inkling2-compact-trunk).Approach
engine/src/inkling2/cuda/ink_iq_tables.cuh):kInkIq2XxsGrid[256]: 2 KB constant lookup table for 8-element codebook vectors.kInkIq2XsGrid[512]: 4 KB constant lookup table for 8-element codebook vectors.kInkIq2SGrid[1024]: 8 KB constant lookup table for 8-element codebook vectors.kInkIq3SGrid[512]: 2 KB constant grid for 8-element codebook vectors.kInkE2m1Lut[16]: 16-entry LUT for NVFP4 dequantization.kInkUe4m3Lut[256]: Branchless scale factor lookup table for NVFP4 block scales.engine/src/inkling2/cuda/ink_moe_cuda.cuh):IQ2_XXS), 17 (IQ2_XS), 21 (IQ3_S), 22 (IQ2_S), and 40 (NVFP4) inink_gguf_has_gpu_kernel.ink_gguf_row_bytes:(K / 256) * 66u(K / 256) * 74u(K / 256) * 110u(K / 256) * 82u(K / 64) * 36uink_gguf_row_dot_multiusing DP4A / half2 accumulation.Validation
Empirical hardware benchmarks conducted on physical GPUs:
1. Single GPU (RTX 5080 16 GB) -
Inkling-2-Mini-UD-IQ3_XXS.ggufhyb=1)hyb=0) (100% resident)2. Dual GPU (RTX 5080 + RTX 4060 Ti) -
Inkling-2-Mini-UD-IQ3_XXS.ggufhyb=0)3. Dual GPU (RTX 5080 + RTX 4060 Ti) -
Inkling-2-Mini-UD-Q4_K_XL.ggufhyb=0)Limits
ink_moe_cuda.cuh.Test Checklist
hyb=0, 3072/3072 experts on RTX 5080).1536 + 1536,hyb=0).