Manuscript Offprint

arXiv:2611.00915

Elastic Precision: Software-Hardware Co-Design of a Mixed-Precision Architecture for Long-Context LLM Inference

Boyang Chen, Xiao Wu, Haoran Wu, Yiren Zhao

ABSTRACT

Low-bit quantization reduces the data movement and computation costs of large language model (LLM) inference. However, uniform widths can waste precision and degrade model quality because computations differ in quantization sensitivity. Existing mixed-precision methods alleviate this mismatch by assigning widths to channels, tokens, or quantization groups, with some adapting widths to runtime inputs. However, when selecting one input's width, these methods do not fully account for how the other input of the current GEMM tile affects output error. Combining both inputs of the current GEMM tile to estimate output errors and allocate both input widths can therefore better match precision to the current computation, but introduces additional estimation and selection overheads on conventional GPUs and NPUs. We therefore propose Coffee, a runtime precision allocation architecture for long-context LLM inference. Under a fixed average bit-width budget, Coffee combines information from both input matrices of the current GEMM tile to estimate output errors at candidate widths. These estimates guide online allocation of both input widths across subarrays, directing more bits toward computations with greater estimated error reductions. Its mixed-precision hardware directly supports the selected widths in data access and computation, while overlapping error estimation and width selection with transfers and computation to limit additional stalls. The same read path supports attention-guided KV reads during decoding, reducing traffic and easing bandwidth bottlenecks. Coffee achieves lower perplexity and higher average zero-shot accuracy than the evaluated quantization baselines, and higher long-context retrieval recall than PLENA. For long-context decoding, system modeling projects up to 2.55× the throughput and 2.61× the energy efficiency of the reconfigured PLENA baseline, and up to 4.96× and 12.56×, respectively, compared with the B200 GPU baseline.

1 INTRODUCTION

Large language model (LLM) inference relies heavily on matrix multiplications in linear projections and attention. Low-bit quantization reduces their data movement and computation costs, but the resulting errors can degrade model quality. For example, on a single H100 at batch size one, NVIDIA reports that AWQ INT4 weight-only quantization raises Llama-3-8B throughput to 1.56× that of FP16 while reducing MMLU accuracy from 65.4% to 62.9% (Lasek et al., 2024).

Prior work mitigates quantization-induced quality loss through calibration-based error optimization (Frantar et al., 2023), data transformations (Ashkboos et al., 2024; Sun et al., 2025), and adaptive numerical representations (Guo et al., 2022; Hu et al., 2025). Mixed-precision methods complement these techniques by assigning more bits to sensitive computations. APTQ (Guan et al., 2024) and CMPQ (Chen et al., 2026) allocate widths offline at layer or channel granularity using sensitivity or importance estimates. Other methods adapt precision during inference: FGMP (Hooper et al., 2025) selects activation widths online, while OPAL (Koo et al., 2024) preserves runtime activation outliers at higher precision. Both retain offline-assigned weight precision. MoBiQuant (Wang et al., 2026) instead selects weight precision for individual tokens while keeping activation widths fixed.

These runtime methods adapt one input's precision while leaving the other's unchanged. However, the output error from quantizing either input depends on both inputs of the current GEMM tile. For example, Figure 1 shows that the same INT4 weights produce different output errors when multiplied by different token activations. Likewise, the output error from activation quantization depends on the corresponding weights. Selecting either input's width should therefore account for the current input on the other side; otherwise, additional bits may not be allocated where they would most effectively reduce output error. Coffee combines both current inputs to estimate output errors at candidate widths and uses these estimates to select each subarray's two input widths. Within the assigned budgets, it

¹Imperial College London, London, United Kingdom ²University of Cambridge, Cambridge, United Kingdom.

Preprint.

Figure

(a) Experimental setup.

(b) Results.

Figure 1. Input-dependent output error with fixed INT4 weights. (a) Experimental setup. The diagram locates the seven linear operators in Llama-3.1-8B. Their GEMMs are mapped to 64×6464 \times 64 and 128×128128 \times 128 matrix-multiplication units. For each unit, we fix the INT4 weight representation and vary FP16 activations across tokens. (b) Results. For each operator and unit size, bars report the 99th-to-1st percentile ratio (p99/p1p_{99}/p_1) of output normalized mean squared error (NMSE) across tokens. NMSE is ∥Y^−Y∥F2/∥Y∥F2\|\hat{Y} - Y\|_F^2 / \|Y\|_F^2, where YY and Y^\hat{Y} are computed using the same FP16 activations with FP16 and INT4 weights, respectively. These results show that even when one input's quantized representation remains fixed, the output error caused by its quantization still depends on the other input.

allocates additional bits where they yield greater estimated reductions in output error.

However, implementing such allocation on conventional GPUs and NPUs requires retrieving or estimating both inputs' magnitudes and quantization errors at candidate widths, then using this information to estimate output errors and select widths for each tile. These steps add instructions, data accesses, and computation. Separate GPU kernels also incur launch overhead and intermediate data transfers. GPU matrix units further support only a limited set of predefined formats (NVIDIA Corporation), making it difficult to translate one-bit width adjustments and different input-width combinations into execution benefits. These overheads and format constraints motivate hardware that makes low-overhead decisions and supports the selected widths in data access and computation.

We therefore propose Coffee, a hardware architecture for runtime precision allocation in long-context LLM inference. Its compute core follows PLENA's flattened systolic-array organization (Wu et al., 2025), distributing matrix multiplication along the reduction dimension across subarrays with independently configurable widths for each subarray's two inputs. Dedicated circuitry overlaps output-error estimation and width selection with input transfers and preceding computations to limit additional stalls. Subarray gating and

selective reads from nested encodings translate lower widths into reduced compute energy and data movement.

Coffee combines offline budget allocation with online width selection. Offline calibration estimates sensitivity differences across computations and assigns more budget to more sensitive computations under a unified average bit-width constraint. Since these estimates do not fully capture local requirements that vary with current inputs, the runtime pipeline combines information from both current input matrices to estimate output errors at candidate widths. These estimates guide the selection of each subarray's two input widths within the assigned tile input-side budgets, allocating additional bits where they yield greater estimated reductions in output error. The same mixed-precision read path also supports attention-guided KV reads during long-context decoding, building on prior importance-aware KV quantization (Yang et al., 2024; He et al., 2024) to further reduce KV traffic.

Our main contributions are as follows:

  • Dynamic precision allocation guided by both current inputs. We use both current inputs to estimate output errors and guide online selection of each subarray's two input widths within offline-assigned budgets, prioritizing precision increases with greater estimated error reductions.

  • Efficient hardware for runtime mixed-precision execution. We integrate online decision logic, independent input-width control, subarray gating, and selective reads from nested encodings. The shared hardware supports dynamic precision allocation and attention-guided KV reads, translating low precision into lower compute energy and reduced data movement.

  • Improved model quality and system efficiency. Our method achieves lower perplexity and higher average zero-shot accuracy than the evaluated quantization baselines, and higher long-context retrieval recall than PLENA. For long-context decoding, system modeling projects up to 2.55×2.55\times the throughput and 2.61×2.61\times the energy efficiency of the reconfigured PLENA baseline, and up to 4.96×4.96\times and 12.56×12.56\times, respectively, compared with the B200 GPU baseline.

References (33)