Skip to content

Inkling 2: upstream support (DSpark, chunked mask, indexed bias) and RDNA3 optimizations - #132

Merged
rafasmour merged 28 commits into
masterfrom
inkling/upstream-opt
Nov 22, 2026
Merged

rafasmour merged 28 commits into
masterfrom
inkling/upstream-opt

Conversation

@rafasmour

Copy link
Copy Markdown
Owner

Inkling 2 upstream support and RDNA3 optimizations.

Upstream:

Fork changes:

  • CUDA/HIP indexed bias in the vec and tile FA kernels; Inkling 2 uses it instead of the dense per-head mask (falls back to the chunked mask where the backend cannot)
  • fused kernels for the Inkling 2 l2 clip, tanh gate and add + scale chains, with test-backend-ops cases (L2_CLIP, TANH_GATE, ADD_SCALE)
  • inkling2 graph: depth-mix blocks stacked once, conv window transposed once, gate ordered for fusion, one zero sinks tensor

Measured on RX 7900 XT, Inkling-2-Mini UD-Q3_K_XL (llama-bench, fa on, f16 KV), before -> after:

  • tg128: 31.0 -> 37.9 t/s; pp512 @ 32k: 321 -> 668 t/s; depth 131k now runs (was OOM)
  • max context at ub 512: q8_0 262k, q4_0 393k (before: 131k did not load)
  • DSpark (Unsloth drafter converted with build-bins/tools/bench/inkling-dspark-convert.py), n-max 3: 45.9 t/s
  • KL divergence vs the previous build 0.0022, same as that build against itself at another ubatch (0.0023)
  • test-backend-ops ROCm0 vs CPU: FLASH_ATTN_EXT, L2_CLIP, TANH_GATE, ADD_SCALE and 12 related groups pass
  • e4b and qwen3.6-35b-a3b: perplexity bit-identical, speed unchanged

Assisted-by: Claude Opus 5.5

pwilkin and others added 28 commits November 21, 2026 16:28
* server: support /models/sse on single-model mode

* nits

* nits
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
…ml-org#32807)

* llama : copy all experts of a host weight shared by several nodes

The scheduler copies a host weight to the device once per graph, so a
partial expert copy made for the first MUL_MAT_ID is stale for the
others (e.g. the shared layers of inkling2_loop with --n-cpu-moe).

Assisted-by: Claude Opus 5.5

* llama : copy all experts of a host weight shared by several nodes

Assisted-by: Codex
Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5

# Conflicts:
#	common/speculative.cpp
Assisted-by: Claude Opus 5.5
…se it for Inkling 2

Assisted-by: Claude Opus 5.5
…once, order the gate for fusion

Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
@rafasmour
rafasmour merged commit 28f0f94 into master Nov 22, 2026
33 of 69 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants