Developer Tools

llama.cpp b10361 fixes EXAONE 4.5's broken sliding window attention

LG's EXAONE 4.5 GGUF silently ran without SWA—now corrected in llama.cpp.

Deep Dive

Llama.cpp, the open-source C++ inference engine with over 124k GitHub stars, shipped release b10361 with a targeted fix for LG AI's EXAONE 4.5. The issue (#26848) was that sliding window attention (SWA) was never being enabled for the official LGAI-EXAONE GGUF model. The root cause was an ordering bug in load_arch_hparams: the code checked hparams.n_layer() == 64 before reading the MTP (multi-token prediction) head parameter. Because EXAONE 4.5 pairs 64 decoder layers with 1 MTP head (block_count=65, nextn=1), the SWA block was skipped entirely. As a result, llama_model_n_swa() reported 4096 but swa_type stayed NONE, making logs look correct while the model ran without actual sliding window attention.

The release also touched model loading for metadata-only paths, where tensors marked TENSOR_SKIP (typical for nextn/MTP architectures) caused null buffer crashes—though those follow-up changes were ultimately reverted. What matters most for developers: b10361 binaries are available for macOS (Apple Silicon and Intel), Linux (CPU, Vulkan, ROCm, OpenVINO, SYCL), Windows (CUDA, Vulkan, CPU, OpenCL), and Android. This fix ensures EXAONE 4.5 users on llama.cpp get the intended inference behavior, correcting both performance and output quality for one of the newer Korean LLMs now widely used in local deployments.

Key Points
  • Fixes #26848: EXAONE 4.5 SWA not enabled because MTP head shifts block_count to 65 vs. expected 64
  • Only affects models with MTP/nextn layers, including the official LGAI-EXAONE GGUF release
  • Release b10361 ships prebuilt binaries for macOS, Linux, Windows, Android, plus Vulkan/CUDA/ROCm backends

Why It Matters

Correct SWA in EXAONE 4.5 means more reliable local LLM inference, better output quality, and proper resource usage for llama.cpp users.

📬 Get the top 10 AI stories daily