Skip to content
AIBRAINWORX / OpenSourceCoder.comLOCAL-FIRST. BUILT IN THE OPEN.
Linux & Systems / Inference & Quantization / Developer & Agent Tools / Linux

Ollama v0.40.18 Ships Inkling-Specific Metal Kernels for Decode, Prefill, and Draft Rounds

Ollama v0.40.18 introduces specialized, hardware-gated Metal kernels for Inkling2 inference, combining fused operations, NVFP4 and MXFP8 expert gathers, in-place window caching, and exact-output quantized drafting with stock-graph fallbacks.

Listen to this articleGoogle Voice
0:00
Official company logo or product image for ollama-v0-40-18-inkling2-metal-kernels-decode-prefill-draft
Official image or organization logo from github.com; identification only, no endorsement.
Event / context: 2026-11-23. Source check: October 28, 2026.

Core Release Scope and Metal Gating

Ollama has published release v0.40.18 on GitHub, introducing targeted Metal execution optimizations under pull request #19843 for Inkling2 inference workloads. Tagged on November 24, 2026 at 01:35 UTC (November 23 in Pacific Time) by maintainer dhiltgen from verified commit 924cc28, the update focuses exclusively on accelerating decode, prefill, and draft rounds on Metal-backed Apple hardware without altering final model outputs.

Rather than rewriting Ollama's general-purpose compute pipeline across every supported model family, v0.40.18 introduces Inkling-only Metal kernels tailored to that architecture's specific mathematical primitives and memory access patterns. Every new kernel ships with a stock-graph fallback and is gated by both GPU generation and size class. When a host system or workload dimension falls outside the supported dispatch conditions, execution reverts to the standard compute graph rather than risking numerical drift or unsupported hardware paths.

Custom Kernels, Quantized Gathers, and Draft Architecture

The engineering core of v0.40.18 centers on operator fusion and low-precision arithmetic across distinct stages of the forward pass. According to the release notes, the update adds dedicated Metal implementations for short BF16 products alongside fused loop controllers and residual mixing. Combining loop control and residual additions into unified kernel dispatches reduces intermediate memory traffic and kernel launch overhead during autoregressive token generation.

For expert-routed and feed-forward layers, Ollama introduces deduplicated NVFP4 and MXFP8 expert gathers paired with fused SwiGLU activations. Deduplicating expert gathers avoids redundant memory loads when routing paths touch overlapping expert weights in 4-bit floating-point (NVFP4) or microscaling 8-bit floating-point (MXFP8) formats, while fusing SwiGLU keeps gated activations local to fast GPU execution units. The release also incorporates fused short convolutions and relative-position split attention kernels, covering both convolutional sequence mixing and attention calculation within the same Inkling-specific Metal dispatch layer.

To accelerate speculative token generation, v0.40.18 adds an 8-bit draft mechanism paired with a 4-bit vocabulary head. The release notes state explicitly that these quantized draft components serve as proposal-only mechanisms, ensuring that verified outputs remain exact relative to the target model.

Caching, Prefill, and Exact-Output Verification

Beyond matrix multiplication and activation fusion, the update targets two persistent bottlenecks in local inference: initial prompt processing and sliding-window state management. First, v0.40.18 introduces faster global prefill kernels for Inkling to speed up batch ingestion before the first generated token is emitted. Second, it implements an ordered window cache that appends in place, avoiding repeated buffer reallocations or out-of-order copies as context advances across decode and draft rounds.

Decoupling draft proposal throughput from final output fidelity is especially relevant for developers who want quantized speedups without accepting accuracy regressions. By constraining the 8-bit draft and 4-bit vocabulary head strictly to candidate proposals while preserving exact target outputs, Ollama aligns the optimization with lossless speculative decoding rather than lossy post-training compression.

Developer and Local Inference Workflow Impact

For engineers running local inference pipelines on Metal-capable machines, hardware-gated kernels paired with automatic fallbacks keep adoption friction low. Developers upgrading to Ollama v0.40.18 do not need to maintain custom graph overrides for Inkling workloads, as kernel selection resolves dynamically against GPU generation and size class. Teams operating local coding assistants, interactive agent loops, or multi-turn evaluation harnesses stand to gain the most in latency-sensitive workflows where global prefill, short convolutions, and multi-round drafting dominate responsiveness.

More broadly, the release highlights a continuing shift in open-source inference runtimes: general-purpose compute graphs increasingly rely on narrow, architecture-specific kernels when newer models blend hybrid convolutions, split attention, NVFP4/MXFP8 experts, and quantized draft heads.

Hardware Caveats, Missing Benchmarks, and Release Limitations

While the release note itemizes each new Metal kernel, v0.40.18 leaves key operational metrics undisclosed. No throughput figures, latency reductions, memory savings, or benchmark comparisons appear in the published changelog, making independent profiling necessary before projecting production speedups. Likewise, Ollama does not list the exact GPU generations or size classes required to hit the fast path instead of the stock-graph fallback.

Platform coverage is equally bounded: pull request #19843 applies solely to Inkling models on Metal, leaving Linux, Windows, CUDA, Vulkan, and non-Inkling architectures unchanged. Furthermore, the captured GitHub release page notes two assets that failed to load in the page snapshot and provides no standalone licensing breakdown for Inkling model weights beyond the tagged repository release itself. Operators deploying v0.40.18 should verify downloaded artifacts, inspect local dispatch behavior, and treat potential performance gains as unverified until measured on target hardware.

EXPLORE THE SOURCE

GitHub repositories

Automated Vertex AI (gemini-4-hydrogen) primary-source report; reviewed 2026-11-24.

Follow your curiosity.

Pass the signal.