Skip to content

Add RTX Spark inference and speculative verification for Inkling - #105

Merged
Ooooze merged 8 commits into
engine-developmentfrom
codex/inkling-rtx-spark
Nov 30, 2026
Merged

Ooooze merged 8 commits into
engine-developmentfrom
codex/inkling-rtx-spark

Conversation

@Ooooze

@Ooooze Ooooze commented Nov 27, 2026 •

Copy link
Copy Markdown

Changes

  • Add Windows ARM64 RTX Spark execution paths for Inkling, including NVFP4 expert routing during speculative verification, CUDA graph handling, and expert-weight staging under a memory budget.
  • Extend Inkling target and draft conversion, intermediate state capture, and DSpark and DFlash2 verification.
  • Include the Spark benchmark driver and recorded results for NVFP4 and IQ2_M configurations. The recorded results describe the configurations under which they were collected.

Validation

The staged diff passed the whitespace check. All three changed Python files parsed successfully, and all six included JSON files decoded successfully. The full test suite was not run.

Inkling DFlash2 defaults and Metal results

Spark and Linux Ada select four proposals with ordinary rejection sampling for the qualified single-slot DFlash2 profile. The earlier Spark A/B measured 55.07 to 58.40 decode updates/s (+6.03%) relative to the seven-proposal PR configuration. RTX 4070 Laptop measured 13.00 to 15.54 (+19.56%) using CPU experts. On that 8 GiB RTX, upstream target-only generation with CPU experts reached 19.34.

On Apple M4 Max (48 GB), the Metal path computes the full eight-position DFlash2 block and verifies four proposals. The initial opt-in implementation was measured against the original PR with the same AD-Q4_K target, BF16 draft, probabilistic sampling, 4K slot, 192-token limit and two seeds per prompt. The four paired runs all improved. Lunch went from 44.00 to 50.09 decode updates/s (+13.84%) and Sky from 51.01 to 59.34 (+16.31%). Pooled throughput was 47.58 to 54.66 (+14.88%). All four optimized requests returned visible answers. Different sampled outputs can have different lengths.

Metal now selects this profile automatically from the target and draft GGUFs. An eligible unmanaged Inkling + DFlash2 pair uses one slot when parallelism is automatic, a full eight-position draft block and four probabilistic proposals. Explicit multi-slot configurations, other widths and greedy draft sampling retain their requested behavior. Set LLAMA_EXPERIMENTAL_METAL_DFLASH2_NATIVE_BLOCK=0 for the previous defaults.

A second M4 Max A/B compared automatic selection against the previous manual fast profile on Lunch and Sky. Pooled decode throughput was 54.94 vs 54.41 tokens/s. All four response digests, finish reasons, proposal counts, acceptance counts and generated lengths matched. Focused checks also covered minimal startup, width 2 with greedy sampling, two slots, opt-out and DSpark. The full suite was not run.

Setup, example commands and platform results · Measurements, source revisions, model hashes and per-seed results

@github-actions github-actions Bot added documentation Improvements or additions to documentation server ggml model CUDA conversion labels Nov 27, 2026
@Ooooze
Ooooze merged commit cf192cb into engine-development Nov 30, 2026
3 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion CUDA documentation Improvements or additions to documentation ggml model server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant