# llama.cpp Vulkan update fixes infinities and NaN handling in top‑k

> The Oct 8 2026 release patches a Vulkan bug that caused crashes and wrong results when infinities or NaN values appear in top‑k calculations.

Oossa · 2026-10-08 · https://oossa.com/en/llama-cpp-vulkan-update-fixes-infinities-and-nan-handling-in-top-k

The open‑source llama.cpp library released version b11505 on 2026‑10‑08. The update fixes a Vulkan shader bug in the top‑k operation. Previously, +inf and NaN values were ignored and could cause hangs on NVIDIA GPUs or wrong indices on AMD GPUs. The patch maps NaN to -inf, expands the bucket range to count every value, and corrects the k = 1 path for negative numbers. A new test called test_top_k_inf checks these cases.

## The facts

- Release date: 2026‑10‑08
- Fix addresses TOP_K handling of +inf, NaN and negative values in Vulkan

## Why it matters

Developers using llama.cpp with Vulkan will see fewer crashes and more accurate token‑ranking results when their prompts contain extreme float values.

## Sources & references

1. [ggml-org/llama.cpp b11505](https://github.com/ggml-org/llama.cpp/releases/tag/b11505) – llama.cpp, 2026-10-08

Last updated: 2026-10-08
