Manuscript Offprint

arXiv:2610.09969

TR-PTQ: High-Accuracy Integer-Only Transformer Post Training Quantization via Taylor Region Reformulation

Eliyahu Levy, Adam Teman, Yoni Pugachov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Post-training quantization (PTQ) enables efficient deployment, yet transformer architectures remain challenging to quantize due to nonlinear layers. While existing methods attribute accuracy loss to insufficient numerical precision, often necessitating floating-point fallbacks, we demonstrate that degradation is actually driven by specific structural error sources. We find that learned scale parameters in normalization layers and compounded approximations in GELU are the primary error contributors, whereas SoftMax remains inherently robust to aggressive quantization. To address these bottlenecks, we introduce TR-PTQ, a unified integer-only formulation using shared Taylor Region (TR) exponential and logarithm primitives. This approach allows computationally expensive operations, including division and square roots, to be performed entirely in the log-domain via standard integer arithmetic. Combined with a calibration-free, outlier-aware optimization for LayerNorm parameters, our method eliminates the need for floating-point hardware units for nonlinearities, achieving less than 1.5% absolute accuracy degradation across vision and language benchmarks.

1. Introduction

Post-training quantization (PTQ) enables efficient model deployment by bypassing the costs of retraining and extensive calibration. Despite these benefits, transformer architectures present significant challenges to quantization due to their heavy reliance on nonlinear layers. Prevailing approaches typically attribute the resulting accuracy loss to insufficient numerical precision. Consequently, existing methods often resort to complex calibration procedures, specialized observers, or mixed-precision execution with floating-point fallbacks.

In this work, we challenge the assumption that nonlinear layers fundamentally require high-precision arithmetic. We demonstrate that accuracy degradation under aggressive per-tensor PTQ is driven not by a general lack of precision, but by specific, identifiable structural error sources. By isolating these sources, we show that many nonlinear components can tolerate aggressive quantization when handled appropriately, while others fail due to specific parameter interactions rather than inherent numerical sensitivity.

We first identify that in normalization layers, such as layer normalization (LayerNorm), quantization error is dominated by the learned scale parameters ( γ\gamma) rather than by input activations. The heavy-tailed distributions of these parameters interact poorly with standard min-max and histogram-based observers, often inducing larger accuracy degradation than errors introduced by mean or root-mean-square (RMS) estimation. For nonlinear activation functions, such as Gaussian Error Linear Unit (GELU), we identify an approximation-on-approximation effect where surrogate implementations compounded with quantization lead to amplified errors.

In contrast, we find that SoftMax is inherently robust under aggressive quantization. By rounding intermediate activations prior to exponentiation, SoftMax can be accurately implemented using a compact lookup table with as few as eight entries, significantly smaller than the commonly used 256-entry designs. This robustness results from logarithmic scaling and normalization, which preserve relative relationships while suppressing absolute magnitude errors. This renders inaccuracies in low-probability elements largely inconsequential.

Building on these insights, we propose a unified, integer-only optimization framework for PTQ of transformer nonlinear layers. By restructuring nonlinear computations and their associated parameters into low-precision formulations, our method eliminates the need for calibration data for nonlinearities, specialized observers, or floating-point arithmetic units.

Our specific contributions include the following:

1^{1} Faculty of Engineering, Bar-Ilan University, Ramat Gan, Israel. Correspondence to: Eliyahu Levy eliyahu.levy@biu.ac.il.

Preprint. October 8, 2026.

TR-PTQ: High-Accuracy Integer-Only Transformer Post Training Quantization via Taylor Region Reformulation

• We demonstrate that accuracy degradation in post-training quantization of transformer nonlinearities is driven by a small set of structural error sources rather than by insufficient numerical precision. This finding challenges the prevailing assumption that nonlinear layers fundamentally require high-precision floating-point arithmetic.

• We introduce a unified, integer-only formulation for transformer nonlinear operations built around shared Taylor Region exponential and logarithm primitives. This enables hardware-efficient implementations of SoftMax, GELU, and LayerNorm without floating-point fallback.

• We identify and address two under-emphasized bottlenecks in PTQ: (i) compounded approximation effects in nonlinear activations such as GELU, and (ii) the dominance of learned scale parameters ( γ\gamma) in normalization layers. We propose a simple, calibration-free outlier-aware optimization to effectively mitigate these errors.

• We validate the proposed approach on vision and language transformers, demonstrating consistent performance under aggressive quantization while significantly simplifying the PTQ pipeline.

References (21)