b9873

ggml-org/llama.cppb9873Jul 4, 2026by github-actions[bot]same day as b9871

What changed since b9871

low risk

Adds a NULL-buffer guard for K/V rotation inputs, fixing a DFlash speculative decoding crash.

Improvements

  • K/V rotation inputs in llm_graph_input_attn_kv and its ISWA variant now skip upload when the tensor buffer is unallocated, matching the existing kq_mask guard pattern.

Bug fixes

  • Prevents a GGML_ASSERT abort caused by calling ggml_backend_buffer_is_host() on a NULL buffer during DFlash speculative decoding KV-injection passes (issue #25191).

Upgrade notes

This is a drop-in stability fix with no API or configuration changes. Users running DFlash speculative decoding with graphs that store K/V without attending should upgrade to avoid the assertion crash; others see no behavioral difference.

Analyzed Oct 28, 2026

Upgrading?

Release notes summary

Adds a guard for K/V rotation inputs when buffers are unallocated. This prevents a crash (GGML_ASSERT) in DFlash speculative decoding when buffers are NULL.

Key Highlights

  • Fixes crash in DFlash speculative decoding with unallocated buffers
  • Prevents calling buffer checks on NULL pointers
  • Fixes issue #25191
  • Applies check to llm_graph_input_attn_kv functions

New Features

  • Stability fix for DFlash speculative decoding with unallocated buffers

Release Notes (excerpt)

<details open> llama : add guard for K/V rotation input when buffer is unallocated (#25215) llm_graph_input_attn_kv::set_input and llm_graph_input_attn_kv_iswa::set_input call set_input_k_rot / set_input_v_rot whenever the rotation tensor pointer is non-null, but the tensor's buffer can be unallocated (NULL) when a graph only stores K/V without attending -- e.g. DFlash speculative decoding's KV-injection pass. set_input_k_rot then calls ggml_backend_buffer_is_host() on a NULL buffer…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories