# Demystifying Numerical Errors in LLM Inference: Achieving Reproducible Inference for Mission-Critical Tasks with HEAL

*Zhenting Zhu, Lucas Thai, Shan Yu, Yicheng Liu, Yifan Qiao, Chenxi Wang, Harry Xu, Junyi Shu*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/155629) · [Open on the map](../papers.html#p155629)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Low-Precision LLM Inference](../pgroup/142.md) · Type: new method · Keywords: LLM inference reproducibility, 16-bit quantization, error compensation, mission-critical tasks, MCR-Bench

## Summary
HEAL is a hybrid error alleviation technique that achieves reproducible LLM inference at 16-bit precision by using INT16 quantization for Q/K/V tensors and an algebraic error compensation strategy, matching FP32 reproducibility while reducing performance overhead up to 6.7×.

## Explained to a 5-year-old
When big computer programs called language models answer questions, they sometimes give different answers each time. This happens because the numbers they use are rounded when the computer is not very precise. The researchers looked at why this happens and found that small mistakes happen when moving numbers between parts of the computer. They created a new trick that keeps the numbers stable by using a special way to store them and fixing mistakes during calculations. This trick lets the programs give the same answer every time while still being fast and using less memory.

## Explained to a 5-year-old, longer
Big computer programs called language models are used to help people write and answer questions. Sometimes these programs give different answers when you ask the same question more than once. This happens because the computer uses a kind of math that rounds numbers to keep things fast. When the numbers are rounded, tiny errors can build up and change the final answer. The researchers looked at where these errors happen and discovered they occur at the boundaries between different parts of the computer. They found that using a very precise way of doing math all the time would make the answers consistent, but it would also make the computer slower and use a lot more memory. To solve this, they created a method that keeps the numbers stable without needing the computer to be super precise everywhere. First, they store some numbers in a special format that uses less space but still keeps the important information. Second, they add a step that corrects small mistakes during the calculations, making the final result accurate. This way, the language model can give the same answer every time, just like a reliable friend. The new method works on the usual fast computer hardware, so it doesn't need special equipment. As a result, the program stays fast, uses less memory, and gives consistent answers for important tasks.

## For a technical reader
The paper shows that 16-bit inference on GPUs can produce wildly different outputs for the same input because of rounding errors at kernel boundaries. It profiles these errors at the hardware level and finds that the KV cache quantization and matrix multiplications are the main culprits. The authors propose a two-pronged solution: quantizing Q/K/V to INT16 to preserve stability and adding an algebraic error-compensation step that simulates FP32 precision using existing Tensor Cores. They evaluate the solution on a new benchmark, MCR-Bench, and demonstrate that it matches the reproducibility of a full FP32 pipeline while cutting performance overhead by up to 6.7×. This approach lets engineers deploy LLMs in mission-critical domains (finance, medicine, law) with consistent outputs without sacrificing speed or memory.

## Problem
Mission-critical LLM deployments require reproducible outputs, but 16-bit inference suffers from catastrophic output divergence due to truncation errors at kernel boundaries, and using a full FP32 pipeline incurs prohibitive compute and memory costs.

## Method
The approach quantizes Q, K, V tensors to INT16 to preserve numerical stability without expanding the KV cache, and applies an algebraic error compensation strategy to synthesize high-precision matrix multiplications on 16-bit Tensor Cores, staying within existing hardware constraints.

## Results
The approach matches the reproducibility of the FP32 baseline on downstream tasks while reducing performance overhead by up to 6.7×.

## Contributions
The paper identifies truncation errors at kernel boundaries as the root cause of 16-bit inference divergence, proposes INT16 quantization and algebraic error compensation to achieve reproducible inference within hardware constraints, and introduces MCR-Bench for evaluating reproducibility.

## Practical relevance
The approach enables reliable, reproducible LLM inference for critical applications such as finance, medicine, and law, allowing deployment on existing 16-bit hardware without sacrificing performance.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/155629)
