Skip to content

Inkling-2-Mini Vulkan Build (v0.2 — Fused Vulkan Shaders: 432.7 t/s pp512, 47.1 t/s tg128)

Latest

Choose a tag to compare

@Trecto34 Trecto34 released this 20 Nov 22:54

What's new in v0.2-vulkan (commit e734ca0)

Five custom fused Vulkan shaders + graph optimizations for Thinking Machines Lab's Inkling-2-Mini (inkling2), verified 12/12 passing in test-backend-ops (Vulkan0 vs CPU) and bit-for-bit identical greedy output:

  1. situ.comp (GGML_GLU_OP_SITU) — replaces the 11-op LLM_FFN_SITU chain with 1 dispatch reading non-contiguous gate_up views directly (48/48 hits).
  2. inkling_clip.comp (INKLING_CLIP) — fuses the 8-op L2-norm clip chain on Q/K/R into 1 workgroup reduction (144/144 hits).
  3. inkling_loop_gate.comp (INKLING_LOOP_GATE) — fuses the 6-op loop controller gate (1 - tanh(f))*cur + tanh(g)*msg (96/96 hits).
  4. inkling_mix_weighted.comp (INKLING_MIX_WEIGHTED) — coalesced weighted sum directly from untransposed states + scores, eliminating CONT(TRANSPOSE) and 2.5–6.7 GFLOPS k=2..5 MUL_MAT_VEC during prefill (108/108 hits, ~160 ms → 9.5 ms).
  5. inkling_rel_bias.comp (INKLING_REL_BIAS) — fused table[rel_pos] - sinks gather directly into FlashAttention layout, eliminating SUB + 2× CONT(PERMUTE) + GET_ROWS over ~3.6 GB during prefill (48/48 hits, ~150 ms → 11.8 ms).
  6. Graph caching: caches blocks_normed, chunks looped-core bank queries to n ≤ 8 (MUL_MAT_VEC fast path), and skips redundant decode REPEAT/CONT.

Also includes all v0.1-vulkan fixes (Unsloth ffn_gate_up_exps.scale loading + zero CPU graph splits).

Benchmarks — AMD BC-250 (RADV GFX1013, 40 CUs, Inkling-2-Mini-UD-IQ3_XXS.gguf, -ngl 99 -fa 1)

Build pp512 (t/s) tg128 (t/s)
Unpatched PR #32695 (+ .scale fix) 259.13 23.55
v0.1-vulkan (d4163d3) 317.83 38.67
v0.2-vulkan (e734ca0) 432.68 (+67.0%) 47.14 (+100.2% / 2.0×)

Build / Runtime Info

  • Target: Linux x86_64, -DGGML_VULKAN=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
  • Included binaries: llama-server, llama-cli, llama-bench
  • Runtime libs: built on Arch/CachyOS (glibc 2.44, libvulkan.so.1, libgomp.so.1, libssl/libcrypto).