The llama.cpp project released build b11064, which modifies the metal backend to support arbitrary head counts (hc) in the dsv4_hc_pre kernel. Previously, these kernels hardcoded hc = 4, causing operations with other head counts to fall back to CPU execution.
- The change passes n_hc as a function constant and loops over it in both pre kernels with direct loads.
- Test-backend-ops cases were added for hc values of 1, 2, 3, 5, 8, and 65, covering both gated and not gated scenarios.
- This update enables models like Kimi-K3 to run efficiently on GPU by supporting dynamic banked checkpoint counts in the cross-layer residual stack.
The release includes binaries for macOS, Linux, Windows, Android, and openEuler across various hardware backends including CPU, CUDA, ROCm, Vulkan, OpenVINO, and SYCL.