The latest release of llama.cpp, tagged b10156, contains exactly one code change. It disables the -ffast-math compiler flag for the HIP backend, the AMD GPU programming model underlying ROCm. That is it. No new model support, no quantization scheme, no architectural overhaul. One flag, flipped off, for one hardware platform.

This is not a small release. It is a diagnostic.

-ffast-math is a GCC and Clang flag that tells the compiler it may break strict IEEE 754 floating-point rules in exchange for speed. It reorders operations, assumes no NaNs or infinities, and treats fused multiply-add as a single atomic instruction. For most applications the tradeoff is invisible. For neural network inference it can be catastrophic. A single denormalized number, a single reassociated addition, a single fused multiply-add that a different backend would not fuse — these produce divergent outputs. The model runs faster. It also runs differently.

The pull request behind the change, #25495, does not elaborate on the specific failure. But the pattern is well known in the llama.cpp issue tracker. AMD GPUs using the HIP backend have produced silent numerical mismatches with CPU and CUDA backbones for months. Users reported that the same model, same prompt, same quantization produced different tokens on an RX 7900 XTX versus an RTX 4090. The usual suspect was always -ffast-math.

This is the kind of bug that does not crash. It does not segfault. It produces plausible output that is subtly wrong. For a chatbot the cost is a weird reply. For a code generation model the cost is a logic error that compiles. For a scientific or medical application the cost is worse.

The broader picture is that AMD’s ROCm stack has struggled to match NVIDIA’s CUDA ecosystem on numerical consistency. NVIDIA’s compiler team has spent years tuning the CUDA math libraries for bit-exact reproducibility across GPU generations. AMD’s HIP layer, built on Clang and the LLVM toolchain, inherits the aggressive optimizations of the open-source compiler world. -ffast-math is on by default in many HIP build configurations. It should not be.

llama.cpp has shipped 10156 releases. Each one is a binary snapshot of a project that runs on CPU, Apple Silicon, NVIDIA CUDA, AMD ROCm, Intel SYCL, Vulkan, OpenVINO, and Qualcomm Adreno. The release matrix in b10156 lists builds for Ubuntu x64 with ROCm 7.2, Windows x64 with CUDA 12 and CUDA 13, Windows arm64 with OpenCL Adreno, and openEuler on Ascend 910b. That is a staggering surface area for a volunteer project. Every backend is a promise: the same model, the same output, the same behavior. -ffast-math breaks that promise.

The fix also reveals something about the project’s governance. The llama.cpp maintainers, led by Georgi Gerganov, have historically favored performance over strict correctness. The project’s early reputation was built on running LLaMA models on a MacBook Air at interactive speeds. That required every optimization available. But as the project matured and its user base expanded to include researchers, enterprise developers, and hardware vendors, the calculus shifted. A 5% speedup on AMD hardware is not worth a silent divergence from the CUDA baseline.

The release also ships a notable absence. The macOS Apple Silicon build with KleidiAI enabled is listed as “DISABLED.” KleidiAI is Arm’s machine learning library for matrix operations, optimized for the Apple M-series Neural Engine and GPU. It was enabled in a previous release and disabled in b10156. The linked pull request, #23780, suggests the integration is not ready. This is the second compiler-level correctness issue in one release.

For local AI builders, the lesson is uncomfortable. The hardware ecosystem is fragmenting faster than the software can stabilize. AMD, Intel, Apple, Qualcomm, and Arm all ship different compilers, different math libraries, and different floating-point semantics. The same GGUF model file loaded on two different GPUs produces two different models. The community has assumed that quantization is the main source of variance. It is not. The compiler is a source of variance too.

The practical takeaway for anyone running llama.cpp on AMD hardware is to verify outputs against a known reference. Run the same prompt on a CPU build and a HIP build. Compare the logits. If they diverge, the build is the problem, not the model. The b10156 release fixes that divergence for the HIP backend. But the same issue will reappear on other backends as new hardware targets are added.

What to watch next is whether the llama.cpp project formalizes a correctness testing regime. The release notes do not mention a regression test for numerical consistency. The project has a benchmark suite for tokens per second. It does not have a benchmark suite for token identity. As local AI moves from hobbyist tinkering to production deployment, that gap will matter more than any single compiler flag.

The flag is off now. The next time it comes on, it should come with a test.