Papers
Topics
Authors
Recent
Search
2000 character limit reached

Fixed-Precision Transformers Explained

Updated 5 July 2026
  • Fixed-Precision Transformers are models that enforce a fixed approximation error or fixed arithmetic precision, ensuring consistent performance over arbitrary context lengths.
  • They often employ uniform low-bit quantization strategies, which reduce model size and increase hardware efficiency without severely compromising accuracy.
  • Formal analyses demonstrate that explicit rounding and fixed-point computations enable theoretical guarantees in universality and expressivity, despite practical deployment challenges.

Fixed-Precision Transformers is not a single technical object but a family of meanings that recur across the transformer literature. In one line of work, the phrase denotes deep transformers that attain a prescribed approximation error ϵ\epsilon uniformly over arbitrary, even infinite, context lengths while keeping embedding dimension and head count fixed; in that setting, “precision” means approximation error rather than numerical arithmetic precision. In quantization and systems work, the term usually refers to uniform low-bit or integer-only implementations in which weights, and sometimes activations and KV-cache, are represented with a fixed bit-width. In formal expressivity work, it denotes transformers whose arithmetic is restricted to a finite fixed-point domain with explicit rounding, sometimes with rounding inside attention itself. These usages address different questions—universality, deployment efficiency, numerical stability, or formal computational power—and their results should be read within their respective models (Furuya et al., 2024, Xu et al., 2021, Yang et al., 13 Feb 2026).

1. Terminological scope and core distinctions

The most important distinction is between approximation precision and arithmetic precision. In "Transformers are Universal In-context Learners" (Furuya et al., 2024), a “fixed-precision” transformer is a deep architecture that, for a chosen approximation tolerance ϵ>0\epsilon > 0, uniformly approximates a continuous in-context mapping over contexts of arbitrary cardinality while keeping the embedding dimension and number of heads fixed. The paper explicitly states that “precision” there is approximation error ϵ\epsilon, not numerical floating-point precision.

By contrast, in quantization papers such as "Mixed Precision of Quantization of Transformer LLMs for Speech Recognition" (Xu et al., 2021), fixed precision means uniform precision: all weight parameters across the Transformer are quantized to the same nn-bit format. The paper contrasts this with mixed precision, where bit-widths are assigned per layer or per module according to quantization sensitivity. Related systems papers extend this deployment-oriented meaning to integer-only execution, static INT4 quantization, and fixed-point accelerators (Ling et al., 2024, Marchisio et al., 2023, Breugel et al., 5 Jun 2025).

A third meaning is formal and language-theoretic. "Length Generalization Bounds for Transformers" (Yang et al., 13 Feb 2026) defines fixed-precision numbers as

Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},

and studies transformers with explicit rounding both outside and inside attention. The same paper distinguishes general (p,q)(p,q)-precision transformers from fixed-precision transformers, using “transformers” for (1,logn)(1,\log n) and “fixed-precision transformers” for (1,1)(1,1).

A separate literature uses “transformers” to mean abstract transfer functions in numerical abstract interpretation rather than the Transformer neural-network architecture. That usage is explicitly distinguished in "Universal Synthesis of Differentiably Tunable Numerical Abstract Transformers" (Gomber et al., 16 Jul 2025), and it is separate from the neural models discussed here.

2. Fixed approximation precision over arbitrary context length

The approximation-theoretic formulation begins by replacing finite token sequences with probability measures on a compact token domain. Let XRdX \subset \mathbb{R}^d be compact, and encode a finite set of tokens {xi}i=1n\{x_i\}_{i=1}^n as the empirical measure

ϵ>0\epsilon > 00

An in-context mapping is then

ϵ>0\epsilon > 01

or equivalently a distribution-to-function map ϵ>0\epsilon > 02 defined by ϵ>0\epsilon > 03. Continuity is imposed with respect to the weakϵ>0\epsilon > 04 topology on ϵ>0\epsilon > 05, metrized on compact domains by the ϵ>0\epsilon > 06-Wasserstein distance

ϵ>0\epsilon > 07

The main theorem proves uniform approximation of every continuous ϵ>0\epsilon > 08 on ϵ>0\epsilon > 09 by a deep transformer alternating multi-head attention layers ϵ\epsilon0 and token-wise MLPs ϵ\epsilon1:

ϵ\epsilon2

Crucially, the construction holds for arbitrary, even infinite, context size, because contexts are measures rather than fixed-length sequences (Furuya et al., 2024).

The “fixed-precision” content of the theorem is architectural. For a given ϵ\epsilon3, the embedding dimension is fixed and does not depend on ϵ\epsilon4 or on context length; in the explicit construction, ϵ\epsilon5 suffices. The number of heads is fixed at ϵ\epsilon6, independent of ϵ\epsilon7 and of the number of represented tokens. Each head has key/query dimension ϵ\epsilon8 and head output dimension ϵ\epsilon9. What scales with nn0 is depth nn1 and the size of MLPs used to approximate multiplication, but the proof is existential and does not provide explicit bounds on nn2 or MLP width as a function of nn3 (Furuya et al., 2024).

The attention operator is extended from finite-token softmax attention to a measure-theoretic integral operator. For one layer,

nn4

with an optional residual connection. Composition is defined via pushforward of the context measure:

nn5

The proof combines Stone–Weierstrass density of cylindrical function classes, an injectivity lemma related to the Radon transform, and MLP approximation of component-wise multiplication. A central point-separation functional is

nn6

with nn7. The same paper formalizes a causal, masked setting by “space-time lifting,” treating sequences as measures on nn8 and inserting the indicator nn9 into the attention kernel, but the universality theorem itself does not cover masked attention. Relative to earlier universality results such as Yun et al. (2019) and the smoothness issues emphasized by Nath (2024), this framework establishes universality over distributions with fixed embedding and head counts at fixed approximation precision (Furuya et al., 2024).

3. Uniform low-bit precision, mixed precision, and transform-assisted quantization

In deployment-oriented work, fixed-precision transformers are usually uniformly quantized transformers. "Mixed Precision of Quantization of Transformer LLMs for Speech Recognition" (Xu et al., 2021) defines fixed precision as a single uniform bit-width across the Transformer and contrasts it with mixed precision learned by either a Hessian-trace-weighted sensitivity metric (MinSen) or mixed-precision neural architecture search (MPNAS). The quantizer is a per-layer uniform quantizer with shared scale Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},0, and the loss increase under quantization noise is approximated by

Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},1

The paper uses the criterion

Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},2

and estimates Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},3 with Hutchinson’s estimator. On Penn Treebank, uniform 2-bit yields PPL Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},4 at size Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},5 MB and Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},6 compression, while MinSen at approximately Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},7 bits yields PPL Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},8 at size Fp,s={m2s:mZ, 2p1m<2p1},\mathbb{F}_{p,s} = \{m \cdot 2^{-s} : m \in \mathbb{Z},\ -2^{p-1} \le m < 2^{p-1}\},9 MB and (p,q)(p,q)0 compression. On Switchboard, MinSen at approximately (p,q)(p,q)1 bits yields PPL approximately (p,q)(p,q)2, size (p,q)(p,q)3 MB, (p,q)(p,q)4 compression, and evaluation time approximately (p,q)(p,q)5 s versus (p,q)(p,q)6 s for the FP32 baseline. The paper reports up to (p,q)(p,q)7 compression without WER degradation, and for a larger 16-layer Transformer LM, ADMM 4-bit yields a Hub5’00 swbd WER reduction of (p,q)(p,q)8 absolute ((p,q)(p,q)9 relative) versus the FP32 16-layer baseline (Xu et al., 2021).

"Learning Accurate Integer Transformer Machine-Translation Models" (Wu, 2020) shows that all (1,logn)(1,\log n)0 matrix multiplications in Transformer Base and Transformer Big can be converted to integer matmuls without material accuracy loss by combining range-preserving quantization for parameters with learned per-tensor scales for non-parameter tensors and staged QAT. The signed quantizer is

(1,logn)(1,\log n)1

with bankers’ rounding and clipping after rounding. Attention scores use

(1,logn)(1,\log n)2

softmax remains in FP32, and attention application uses

(1,logn)(1,\log n)3

On WMT14 En–De newstest2014 with beam (1,logn)(1,\log n)4 and length penalty (1,logn)(1,\log n)5, Transformer Base FP32 achieves (1,logn)(1,\log n)6 uncased and (1,logn)(1,\log n)7 cased BLEU, and INT8 matches them at (1,logn)(1,\log n)8 and (1,logn)(1,\log n)9. Transformer Big FP32 achieves (1,1)(1,1)0 uncased and (1,1)(1,1)1 cased, while INT8 gives (1,1)(1,1)2 and (1,1)(1,1)3. INT6 degrades more, by (1,1)(1,1)4 BLEU for Base and (1,1)(1,1)5–(1,1)(1,1)6 BLEU for Big (Wu, 2020).

More recent work treats fixed precision as an optimization target rather than a rigid architectural constraint. "FPTQuant: Function-Preserving Transforms for LLM Quantization" (Breugel et al., 5 Jun 2025) introduces four function-preserving transforms: a mergeable pre-RoPE transform for queries and keys, a mergeable transform for values, a mergeable scaling transform within the MLP block, and a cheap dynamic scaling transform. These transforms preserve the full-precision function while reshaping activation distributions to be more quantization-friendly. The pre-RoPE construction exploits the commutation of block-diagonal (1,1)(1,1)7 rotations and diagonal scalings with RoPE; the value transform exploits head-local invertibility; the MLP transform uses distributivity of diagonal scaling over the Hadamard product; and the residual scaling uses RMSNorm-derived per-token scalers. The paper targets static INT4 quantization for weights, activations, and KV-cache, requires no custom kernels, and reports static INT4 prefill speedups of (1,1)(1,1)8–(1,1)(1,1)9 over FP16, within XRdX \subset \mathbb{R}^d0–XRdX \subset \mathbb{R}^d1 of the INT4 upper bound. This does not redefine fixed precision as mixed precision; rather, it shows that fixed-bit deployment can be materially improved by transform design before quantization (Breugel et al., 5 Jun 2025).

Across these papers, a common pattern is that uniform fixed precision is hardware-friendly and analytically simple, but heterogeneous sensitivity of embeddings, attention projections, attention outputs, and FFN layers makes naive uniform low-bit quantization brittle. This suggests that “fixed precision” in practical deployment is often the baseline against which mixed precision, learned scaling, or function-preserving transforms are evaluated.

4. Integer-only and fixed-point hardware realizations

Hardware papers emphasize that fixed precision is not merely a storage format; it restructures the full inference pipeline. "Integer-only Quantized Transformers for Embedded FPGA-based Time-series Forecasting in AIoT" (Ling et al., 2024) presents a complete integer-only design for a single-encoder-layer, single-head Transformer on a Xilinx Spartan-7 XC7S15. The model uses XRdX \subset \mathbb{R}^d2, XRdX \subset \mathbb{R}^d3, XRdX \subset \mathbb{R}^d4, XRdX \subset \mathbb{R}^d5, and output projections all of dimensionality XRdX \subset \mathbb{R}^d6, FFN width XRdX \subset \mathbb{R}^d7, residual connections, and Batch Normalization in place of Layer Normalization. Quantization is asymmetric per-tensor for most tensors and symmetric for biases and BN offsets, with

XRdX \subset \mathbb{R}^d8

The attention scaling factor XRdX \subset \mathbb{R}^d9 is folded into integer scaling factors, residual additions use ApproxMul with right-shifted integer multipliers, softmax is implemented through LUTs plus a Radix-2 non-restoring divider, and BN is reparameterized into an affine map. On the AirU dataset, representative deployments include {xi}i=1n\{x_i\}_{i=1}^n0 with RMSE {xi}i=1n\{x_i\}_{i=1}^n1, {xi}i=1n\{x_i\}_{i=1}^n2 ms latency, and {xi}i=1n\{x_i\}_{i=1}^n3 mJ energy; {xi}i=1n\{x_i\}_{i=1}^n4 with RMSE {xi}i=1n\{x_i\}_{i=1}^n5, {xi}i=1n\{x_i\}_{i=1}^n6 ms, and {xi}i=1n\{x_i\}_{i=1}^n7 mJ; and {xi}i=1n\{x_i\}_{i=1}^n8 with RMSE {xi}i=1n\{x_i\}_{i=1}^n9, ϵ>0\epsilon > 000 ms, and ϵ>0\epsilon > 001 mJ. Compared to an 8-bit MCU baseline, the 4-bit FPGA model increases test loss by only ϵ>0\epsilon > 002, runs ϵ>0\epsilon > 003 faster, and is ϵ>0\epsilon > 004 more energy-efficient. The paper also stresses that reducing bit-width does not monotonically reduce latency or energy, because datapath balance, divider cost, rescaling overhead, and model configuration can dominate the outcome (Ling et al., 2024).

"SwiftTron: An Efficient Hardware Accelerator for Quantized Transformers" (Marchisio et al., 2023) addresses a more general full-Transformer inference path in a 65 nm ASIC flow. SwiftTron uses symmetric quantization with zero-point ϵ>0\epsilon > 005, INT8 inputs to MatMul, INT32 accumulators and nonlinear blocks, and dyadic requantization

ϵ>0\epsilon > 006

Attention is implemented as MatMul ϵ>0\epsilon > 007 Scale ϵ>0\epsilon > 008 Softmax ϵ>0\epsilon > 009 Requantization ϵ>0\epsilon > 010 MatMul, with max-subtraction, a second-order polynomial approximation of ϵ>0\epsilon > 011 on ϵ>0\epsilon > 012, integer-only GELU and LayerNorm, and dyadic rescaling for residual alignment. For RoBERTa-base on SST-2 with ϵ>0\epsilon > 013, ϵ>0\epsilon > 014, ϵ>0\epsilon > 015, and ϵ>0\epsilon > 016, the table reports end-to-end inference latency of ϵ>0\epsilon > 017 ms at 65 nm and 143 MHz, area ϵ>0\epsilon > 018 mmϵ>0\epsilon > 019, and a power discrepancy: ϵ>0\epsilon > 020 mW in the abstract versus ϵ>0\epsilon > 021 W in the synthesis table. The paper states that the abstract’s “1.83 ns” is a typographical error and that the table’s ϵ>0\epsilon > 022 ms value is the correct latency. Area and power are dominated by MatMul, with Softmax and LayerNorm contributing materially smaller but still nontrivial fractions (Marchisio et al., 2023).

These implementations clarify a recurrent misconception: low-bit fixed precision does not automatically imply an entirely homogeneous low-bit datapath. Integer-only systems often widen accumulators, use wider LUT outputs, or retain carefully designed normalization pathways. Conversely, matmul-only integerization, as in the machine-translation QAT approach, can already yield strong gains while leaving softmax, LayerNorm, residual adds, and related non-matmul operations in FP32 (Wu, 2020).

5. Finite precision, length generalization, and computational expressivity

Formal work on fixed precision asks what transformers can compute when arithmetic is explicitly rounded and the precision budget is part of the model. "Length Generalization Bounds for Transformers" (Yang et al., 13 Feb 2026) studies future-masked encoders over ϵ>0\epsilon > 023 and defines a fixed-precision variant in which attention-side quantities are rounded inside attention:

ϵ>0\epsilon > 024

The paper proves that fixed-precision transformers are equivalent, via two-way translations, to positive CRASP and to ϵ>0\epsilon > 025. For this positive fragment, the length complexity is exponential in the size of the program, with matching upper and lower bounds. By contrast, for general CRASP—and hence for standard transformers with log-precision attention—the paper proves that non-asymptotic length generalization bounds are not computable already at two layers. Its transformer-side summary is that fixed-precision transformers have length complexity ϵ>0\epsilon > 026 and ϵ>0\epsilon > 027, whereas unrestricted transformers do not admit computable non-asymptotic length generalization bounds (Yang et al., 13 Feb 2026).

"Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don't" (Svete et al., 28 May 2026) places fixed precision into a circuit-complexity framework. With signed fixed-point numbers of ϵ>0\epsilon > 028 bits and polynomial padding, it defines constant precision by ϵ>0\epsilon > 029, width ϵ>0\epsilon > 030, and volume ϵ>0\epsilon > 031. Under sufficient volume ϵ>0\epsilon > 032, polynomially padded L-uniform constant-precision transformers of constant depth are exactly L-uniform ϵ>0\epsilon > 033, while growing-precision ones are exactly L-uniform ϵ>0\epsilon > 034, regardless of width. With ϵ>0\epsilon > 035 looping, constant-precision models reach FO-uniform ϵ>0\epsilon > 036 and growing-precision models reach FO-uniform ϵ>0\epsilon > 037. The paper’s central claim is that numeric precision and model depth are the main factors affecting expressivity, while attention type and width are comparatively robust within this padded setting (Svete et al., 28 May 2026).

A different formal model reaches a different endpoint. "Constant Bit-size Transformers Are Turing Complete" (Li et al., 22 May 2025) defines a constant bit-size transformer as one with constant parameter precision ϵ>0\epsilon > 038 and constant parameter count ϵ>0\epsilon > 039, so total bit-size ϵ>0\epsilon > 040 is independent of input length. The construction uses a decoder-only autoregressive transformer with one decoder block, one hard-attention head, relative positional encoding, and a fixed vocabulary ϵ>0\epsilon > 041 derived from a Post machine simulating a Turing machine. The context window of length ϵ>0\epsilon > 042 acts as a queue, and the main theorem states

ϵ>0\epsilon > 043

for any non-decreasing ϵ>0\epsilon > 044, implying in particular ϵ>0\epsilon > 045. The same paper proves that a constant bit-size transformer with context window ϵ>0\epsilon > 046 can simulate a single-tape Turing machine using ϵ>0\epsilon > 047 space after ϵ>0\epsilon > 048 chain-of-thought steps (Li et al., 22 May 2025).

Finite-precision linear-attention models exhibit yet another profile. "Practical Computational Power of Linear Transformers and Their Recurrent and Self-Referential Extensions" (Irie et al., 2023) studies bounded precision, real-time, fixed-size-state linear Transformers or Fast Weight Programmers. Under these assumptions, vanilla linear Transformers are equivalent to RNN-like sequence processors with a fixed-size fast weight matrix. The paper shows that normalized linear Transformers are not rationally recurrent, can recognize certain counter languages, but cannot recognize certain regular languages such as ϵ>0\epsilon > 049 without positional encoding. Recurrent Delta and self-referential weight matrices empirically achieve ϵ>0\epsilon > 050 Bin0/Bin1 accuracy on parity, ϵ>0\epsilon > 051, and ϵ>0\epsilon > 052, whereas vanilla linear attention fails to generalize on parity and reset Dyck-1. This indicates that finite precision alone does not fix expressive power; recurrence, memory rewrite, and state-update structure also matter (Irie et al., 2023).

Taken together, these results do not yield a single expressivity hierarchy for “fixed-precision transformers.” They study different architectures, different attention rules, different resources that are allowed to scale, and different notions of generalization. A plausible implication is that formal claims about fixed precision are highly model-specific: round-everywhere future-masked encoders, padded fixed-point families, hard-attention context-window simulators, and fixed-state linear Transformers occupy distinct analytical regimes.

6. Numerical stability, common misconceptions, and open technical issues

Finite-precision deployment also raises a numerical-analysis question: how forward-pass round-off errors propagate through transformer blocks. "Numerical Error Analysis of LLMs" (Budzinskiy et al., 13 Mar 2025) adopts the standard floating-point model with unit roundoff

ϵ>0\epsilon > 053

and

ϵ>0\epsilon > 054

Using Higham-style ϵ>0\epsilon > 055–ϵ>0\epsilon > 056 notation, it derives local and global forward-error bounds for affine layers, RMS normalization, LayerNorm, ReLU MLPs, self-attention, residual connections, and whole pre-norm transformer stacks. RMS normalization has a uniformly bounded componentwise condition number ϵ>0\epsilon > 057, while standard LayerNorm becomes sensitive when the centered vector ϵ>0\epsilon > 058 has components near zero. For RMS LN,

ϵ>0\epsilon > 059

whereas LN carries additional factors depending on ϵ>0\epsilon > 060. Self-attention error depends strongly on the conditioning of ϵ>0\epsilon > 061, the magnitude of logits, and token norms. The global forward-pass bounds grow exponentially in depth ϵ>0\epsilon > 062, and experiments reported in the paper show roughly exponential growth in mean relative componentwise error with depth, although median error remains far smaller (Budzinskiy et al., 13 Mar 2025).

This numerical work aligns with several practical design choices seen elsewhere. Pre-norm architectures reduce attention conditioning, and the paper recommends computing similarity scores and softmax in higher precision, using mixed-precision GEMM with higher-precision accumulation, and preferring RMS LN to standard LN in low-precision regimes (Budzinskiy et al., 13 Mar 2025). These recommendations are consistent with deployment papers that either retain softmax and normalization in FP32 or use widened internal formats even when matmuls are quantized (Wu, 2020, Marchisio et al., 2023).

Several recurring misconceptions follow from the terminological breadth of the field. First, fixed precision does not always mean fixed bit-width: in the universality theorem over measures, it means fixed approximation precision ϵ>0\epsilon > 063 with fixed architectural width and head count (Furuya et al., 2024). Second, fixed precision does not always mean fully integer-only inference: many quantized systems keep softmax, LayerNorm, residual adds, or analogous nonlinear stages in FP32 or in widened integer formats (Wu, 2020, Xu et al., 2021). Third, lower bit-width does not necessarily imply lower latency or energy; the embedded FPGA study explicitly reports cases where 6-bit is slower and more energy-consuming than 8-bit because model size, cycle count, divider cost, and rescaling overhead dominate raw bit-width effects (Ling et al., 2024).

Open technical questions remain heterogeneous. In the universality setting, masked causal attention is formalized but not covered by the main theorem (Furuya et al., 2024). In quantization, activation quantization, extreme low-bit attention, and calibration of normalization layers remain difficult, and transform-assisted methods such as FPTQuant improve but do not eliminate these issues (Breugel et al., 5 Jun 2025). In formal expressivity, current bounds depend sharply on padding, rounding semantics, attention type, and context-window assumptions, and there is no single finite-precision abstraction subsuming all of the proven results (Yang et al., 13 Feb 2026, Svete et al., 28 May 2026, Li et al., 22 May 2025). The term “Fixed-Precision Transformers” therefore names a broad research area rather than a unified model class: one must always specify whether the subject is approximation at fixed ϵ>0\epsilon > 064, uniform low-bit quantization, integer-only hardware, or explicit finite-precision computation with formal rounding semantics.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Fixed-Precision Transformers.