REVIEW 3 major objections 5 minor 41 references
QuAKE: Speeding up Model Inference Using Quick and Approximate Kernels for Exponential Non-Linearities
T0 review · 3 major / 5 minor · reviewed 2026-08-12 · deepseek-v4-flash
Pith's one-line read QuAKE replaces exponential non-linearities such as Softmax, GELU, and the logistic function with bit-manipulation approximations that speed up model inference by 10–45% with negligible accuracy loss.
desk verdict A solid, honest engineering paper with a genuinely useful fusion trick, but the headline speedups are upper bounds because the benchmarks disable vectorization. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the QuAKE kernel, a bit-level approximation of the exponential based on the IEEE-754 single-precision format: the float is reinterpreted as an integer, an affine transform $z = c_0 x + c_1$ is applied (folding in any needed input scaling or bias), and the resulting integer bits are reinterpreted as a float. QuAKE2 extends this by masking and reinserting the exponent field to obtain the value $1 + \{x\}$, then applying the quadratic correction $(a_m^2 + 2)/3$ to the mantissa and recombining with the original exponent. The affine-view identity $z = (x + B) \cdot 2^{l_m}$ is what carries the argument, because it makes the approximation cost essentially one fused multiply-add and two bit casts per element.
What would settle it
Rebuild the same TFLite models with auto-vectorization enabled and the default optimized math library, then re-run the Table III benchmarks on the EPYC and Raspberry Pi 5; if the end-to-end QuAKE speedups fall below roughly 5% for most models, the paper's central speed claim does not generalize to standard compiler settings.
Extended reading notes
Core claim
The central discovery is that the approximate exponential $2^x \approx 2^{\lfloor x \rfloor}(1 + \{x\})$ can be computed by viewing the IEEE-754 single-precision bits of $x$ as an integer $z = (x + B) \cdot 2^{l_m}$, which is just an affine map $z = c_0 x + c_1$. Any affine input transformation—softmax temperature and maximum subtraction, GELU's polynomial constants, logistic scaling—can be folded into $c_0$ and $c_1$ at no extra cost, turning the whole non-linearity into a float-to-int conversion, an add-multiply, and a bit reinterpretation. The paper further introduces QuAKE2, a second-order refinement that extracts the mantissa, applies a quadratic correction with rational coefficients $(a_m^2 + 2)/3$, and reattaches the exponent, reducing the worst-case relative error to about 0.34% while remaining continuous for integer inputs. On that basis the paper claims operator-level speedups of more than 2x for softmax and 2.5x for GELU, end-to-end model speedups of 10–35% on server CPUs and up to 45% on embedded CPUs, and downstream task performance that matches or slightly exceeds the reference implementation.
Load-bearing premise
The speedups are measured with vector instructions and auto-vectorization disabled, on a single thread, in TensorFlow Lite; the claim that QuAKE gives 'sizable speed benefits' in real deployments depends on those controlled-condition gains surviving in production kernels that use vectorized math-library exponentials.
Editorial extensions
If this is right
- QuAKE and QuAKE2 act as drop-in replacements for Softmax, GELU, and logistic activations in TensorFlow Lite, with speedups proportional to the fraction of inference time those non-linearities occupy, consistent with Amdahl's law.
- Models with heavy exponential use—ConvNeXt, vision Transformers, and Whisper encoders—gain the most, with ConvNeXt showing up to 46% speedup on the Raspberry Pi 5.
- The zero-cost affine fusion removes the separate maximum-subtraction and scaling passes in softmax, and the separate constant multiplications in GELU, so the speedups are larger than simply swapping the exponential call.
- Because QuAKE needs no extra memory, precomputation, or specialized hardware, it can be combined orthogonally with quantization and other inference optimizations.
- The accuracy loss on ImageNet, LibriSpeech, and Hellaswag is at most a few hundredths of a percent, and QuAKE2 matches or slightly improves task accuracy in most tested configurations.
Reading between the lines
- If the speedups persist under vectorized, multi-threaded real-world builds—which the paper does not test—QuAKE-style kernels could be slotted into production inference engines as a compiler-level alternative to math-library exponentials.
- The same affine-view trick applies to any function of the form $a^x$ or scaled logarithms, so the approach could plausibly extend to log-sum-exp, LayerNorm's variance, or other transcendental activation primitives.
- The fact that QuAKE often beats the exact implementation on downstream tasks hints that the approximation's perturbations act as a mild regularizer; a direct test would compare QuAKE against reference models on distribution-shifted inputs.
- A natural next measurement is energy: since QuAKE replaces a multi-instruction polynomial exponential with a few integer ops, the per-inference energy savings on mobile CPUs could be proportionally larger than the latency savings.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes QuAKE, a family of approximate exponential operators built on IEEE-754 bit manipulation, with a first-order version (QuAKE) and a second-order refinement (QuAKE2). The main algorithmic contribution is the fusion of affine input transformations (softmax temperature scaling and max subtraction, GELU and logistic constants) into the bit-level exponential approximation at no extra cost. The authors implement the operators in TensorFlow Lite and benchmark them on four CPU platforms across transformers and CNNs, reporting 10–35% speedups on server CPUs, 5–45% on embedded/mobile CPUs, and negligible downstream accuracy changes on ImageNet, LibriSpeech, and HellaSwag. The central claim is that QuAKE operators provide sizable inference speed benefits with little to no loss of task performance.
Significance. The paper addresses an important and timely problem: reducing the cost of exponential non-linearities in neural network inference. Its strengths include a transparent derivation in Section III, coefficients that are chosen from approximation-error considerations rather than fitted to downstream tasks, a broad hardware and model coverage, and downstream evaluations across three diverse task families. The operators require no extra memory, no precomputation, and no specialized hardware, which makes them appealing as a portable optimization. The main weakness is that the headline speedup numbers are measured under a benchmark configuration with vector instructions and auto-vectorization disabled, which is not representative of production inference environments; one reported speedup entry is negative and goes unaddressed. If the speedups survive comparison against vectorized baselines, the contribution would be practically valuable, but the current evidence does not establish that.
major comments (3)
- [Section V-A] The benchmark setup disables vector instructions and auto-vectorization through compiler flags, and all inference is single-threaded. This makes the reported speedups comparisons against a scalar baseline only. Production inference frameworks and math libraries (e.g., XNNPACK, oneDNN, libmvec, SVML) routinely use vectorized exponential approximations, and the paper itself lists amenability to vectorization as a desirable property but never measures it. The headline 10–45% speedups may therefore shrink or disappear in realistic deployments, which is a threat to the paper's central claim. Please either benchmark against a vectorized baseline, or explicitly restrict the speedup claims to scalar non-vectorized inference settings.
- [Table III / Section V-A1] The Whisper-S(D) row on Raspberry Pi 5 reports speedups of -1.1% for QuAKE and -3.6% for QuAKE2, i.e., slowdowns. This directly contradicts the text in Section V-A1 that 'speedups are consistent' and the claim in Section VII that QuAKE2 'always' provides substantial speedups. The negative entries are not discussed or explained. Please address this outlier explicitly and qualify the consistency claim accordingly.
- [Section V-A1 / Table III] The speedup table reports a geometric average over configurations but provides no variance or confidence intervals for the per-model measurements. For entries with small speedups, such as GPT2-L with 0.8% speedup on Vision Five 2 or Whisper-Ti(D) with 0.4–0.8% across platforms, run-to-run noise could change the sign of the result. Given that the paper's main claim is quantitative (10–35% and 5–45% speedups), per-configuration standard deviations or repeated-run distributions are needed to establish that these numbers are robust.
minor comments (5)
- [Section III-B] The claim that the empirical maximum relative error of the second-order approximation is 0.17% (or 0.34% for the chosen coefficients) is stated without describing the sampling method or density used to estimate it; please specify the procedure.
- [Section V-B] Tables V–VII report accuracy deltas of at most 0.17%, which supports the claim of 'little to no loss', but the observation that QuAKE is sometimes more accurate than the baseline is likely measurement noise and should be presented as such rather than as a systematic benefit.
- [Section V-A1] There is a typo in the sentence 'Once cause of these less substantial speedups' which should read 'One cause'; the same section also uses 'model's' where 'models' may have been intended.
- [Section VII] The word 'imlpementations' appears in the conclusion and should be corrected to 'implementations'.
- [Entire manuscript] No code or artifacts are released. The algorithms are described in pseudocode, but public code would substantially improve reproducibility of the Table III and Table IV measurements and would allow the community to verify the vectorization concerns raised in the major comments.
Circularity Check
No circular derivation: QuAKE operators are measured, not fitted to the reported outcomes, and every cited foundation is external prior work.
full rationale
The paper's derivation chain is self-contained in the relevant sense. The QuAKE constants are obtained from the IEEE-754 structural identity in Equation 3 or are chosen by an exhaustive grid search that minimizes relative approximation error in Section III-B; they are not tuned to the reported inference speedups or downstream accuracies. The downstream results in Tables V, VI, and VII are measured on standard datasets after the operators are fixed, and the speedups in Table III are measured under a stated TFLite benchmark configuration. None of the reported quantities is defined in terms of the predicted outcome, and no fitted parameter is renamed as a prediction. The only notable caveat is external validity rather than circularity: Section V-A states that 'Vector instructions and auto-vectorization are disabled through compiler flags,' so the speedups over a scalar baseline may not transfer to production SIMD-optimized libraries, but this affects generalization of the benchmark, not the logical derivation of the operators. Citations to Schraudolph (1999) and Moroz et al. (2022) are prior external work, not self-citations, and no uniqueness theorem or ansatz is imported from the authors' own prior publications. Therefore no circular step is present.
Assumptions & free parameters
free parameters (3)
- Schraudolph exponent bias correction (-0.0436*2^23 in c1) =
(127 - 0.0436)*2^23
- QuAKE2 quadratic coefficients a0=1/3, a2=2/3 (a1=0) =
a0=1/3, a1=0, a2=2/3
- MIN_EXPONENT threshold in Softmax-QuAKE =
unspecified
assumptions (4)
- standard math IEEE-754 single-precision floats encode value as 2^{exponent}(1+mantissa) with 8 exponent bits and bias 127.
- domain assumption Converting float to integer truncates toward zero, which approximates the floor needed for the exponent field.
- domain assumption Empirically claimed error bounds (4.3 percent first-order, 0.34 percent second-order) are correct over the full input range.
- ad hoc to paper Disabling vectorization and auto-vectorization is a fair way to measure operator speedups.
Cite this review
Pith. "Pith review of QuAKE: Speeding up Model Inference Using Quick and Approximate Kernels for Exponential Non-Linearities." pith.science (2026). https://pith.science/paper/ZC3QVTS7
@misc{pith2026241200408,
author = {Pith},
title = {Pith review of: QuAKE: Speeding up Model Inference Using Quick and Approximate Kernels for Exponential Non-Linearities},
year = {2026},
howpublished = {\url{https://pith.science/paper/ZC3QVTS7}},
note = {Machine review of arXiv:2412.00408}
}
read the original abstract
As machine learning gets deployed more and more widely, and model sizes continue to grow, improving computational efficiency during model inference has become a key challenge. In many commonly used model architectures, including Transformers, a significant portion of the inference computation is comprised of exponential non-linearities such as Softmax. In this work, we develop QuAKE, a collection of novel operators that leverage certain properties of IEEE-754 floating point representations to quickly approximate the exponential function without requiring specialized hardware, extra memory, or precomputation. We propose optimizations that enhance the efficiency of QuAKE in commonly used exponential non-linearities such as Softmax, GELU, and the Logistic function. Our benchmarks demonstrate substantial inference speed improvements between 10% and 35% on server CPUs, and 5% and 45% on embedded and mobile-scale CPUs for a variety of model architectures and sizes. Evaluations of model performance on standard datasets and tasks from various domains show that QuAKE operators are able to provide sizable speed benefits with little to no loss of performance on downstream tasks.
Reference graph
Works this paper leans on
-
[1]
“Introducing chatgpt,” OpenAI Blog , 2022. [Online]. Available: https://openai.com/index/chatgpt/
work page 2022
-
[2]
Multilayer fee dforward networks are universal approximators,
K. Hornik, M. Stinchcombe, and H. White, “Multilayer fee dforward networks are universal approximators,” Neural Networks , vol. 2, no. 5, pp. 359–366, 1989
work page 1989
-
[3]
Gaussian error linear units (gelus),
D. Hendrycks and K. Gimpel, “Gaussian error linear units (gelus),”
-
[4]
A. V aswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones , A. N. Gomez, L. u. Kaiser, and I. Polosukhin, “Attention is all you need,” in Advances in Neural Information Processing Systems , I. Guyon, U. V . Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Gar nett, Eds., vol. 30. Curran Associates, Inc., 2017
work page 2017
-
[5]
Nn-lut: neural approximation of non-linear operations for efficien t transformer inference,
J. Y u, J. Park, S. Park, M. Kim, S. Lee, D. H. Lee, and J. Choi , “Nn-lut: neural approximation of non-linear operations for efficien t transformer inference,” in Proceedings of the 59th ACM/IEEE Design Automation Conference, ser. DAC ’22. New Y ork, NY , USA: Association for Computing Machinery, 2022, p. 577–582
work page 2022
-
[6]
Peano -vit: Power- efficient approximations of non-linearities in vision tran sformers,
M. E. Sadeghi, A. Fayyazi, S. Azizi, and M. Pedram, “Peano -vit: Power- efficient approximations of non-linearities in vision tran sformers,” in Proceedings of the 29th ACM/IEEE International Symposium o n Low Power Electronics and Design , ser. ISLPED ’24. New Y ork, NY , USA: Association for Computing Machinery, 2024, p. 1–6
work page 2024
-
[7]
Ml-pla c: Multiplierless piecewise linear approximation for nonlin ear function evaluation,
F. Lyu, Y . Xia, Z. Mao, Y . Wang, Y . Wang, and Y . Luo, “Ml-pla c: Multiplierless piecewise linear approximation for nonlin ear function evaluation,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 69, no. 4, pp. 1546–1559, 2022
work page 2022
-
[8]
Hardware-efficient softmax approximation for self-attention networks,
N. A. Koca, A. T. Do, and C.-H. Chang, “Hardware-efficient softmax approximation for self-attention networks,” in 2023 IEEE International Symposium on Circuits and Systems (ISCAS) , 2023, pp. 1–5
work page 2023
Show all 41 references
-
[9]
Softermax: Hardware/software co-design of an efficient so ftmax for transformers,
J. R. Stevens, R. V enkatesan, S. Dai, B. Khailany, and A. R aghunathan, “Softermax: Hardware/software co-design of an efficient so ftmax for transformers,” in 2021 58th ACM/IEEE Design Automation Conference (DAC), 2021, pp. 469–474
2021
-
[10]
A fast, compact approximation of th e exponential function,
N. N. Schraudolph, “A fast, compact approximation of th e exponential function,” Neural Computation, vol. 11, no. 4, pp. 853–862, 1999
1999
-
[11]
Ieee standard for floating-point arithmetic,
“Ieee standard for floating-point arithmetic,” IEEE Std 754-2019 (Revi- sion of IEEE 754-2008) , pp. 1–84, 2019
2019
-
[12]
Simple multiple precision algorithms for exponential functions [tips and t ricks],
L. Moroz, V . Samotyy, Z. Kokosi ´nski, and P . Gepner, “Simple multiple precision algorithms for exponential functions [tips and t ricks],” IEEE Signal Processing Magazine , vol. 39, no. 4, pp. 130–137, 2022
2022
-
[13]
TensorFlow: Large-scale machine learning on heterogeneo us systems,
M. Abadi, A. Agarwal, P . Barham, E. Brevdo, Z. Chen, C. Ci tro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfel low, A. Harp, G. Irving, M. Isard, Y . Jia, R. Jozefowicz, L. Kaiser , M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murra y, C. Olah...
2015
-
[14]
Visionfive 2 datasheet,
“Visionfive 2 datasheet,” Star Five , 2023. [Online]. Available: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_Datasheet.pdf
2023
-
[15]
Imagenet: A large-scale hierarchical image database,
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fe i, “Imagenet: A large-scale hierarchical image database,” in 2009 IEEE Conference on Computer Vision and Pattern Recognition , 2009, pp. 248–255
2009
-
[16]
Libr ispeech: An asr corpus based on public domain audio books,
V . Panayotov, G. Chen, D. Povey, and S. Khudanpur, “Libr ispeech: An asr corpus based on public domain audio books,” in 2015 IEEE International Conference on Acoustics, Speech and Signal P rocessing (ICASSP), 2015, pp. 5206–5210
2015
-
[17]
Hellaswag: Can a machine really finish your sentence?
R. Zellers, A. Holtzman, Y . Bisk, A. Farhadi, and Y . Choi , “Hellaswag: Can a machine really finish your sentence?” in Proceedings of the 57th Annual Meeting of the Association for Computational Lingui stics, 2019
2019
-
[18]
Raspberry pi 5,
“Raspberry pi 5,” Raspberry Pi Ltd , 2024. [Online]. Available: https://datasheets.raspberrypi.com/rpi5/raspberry-pi-5-product-brief.pdf
2024
-
[19]
Raspberry pi zero 2 w,
“Raspberry pi zero 2 w,” Raspberry Pi Ltd , 2024. [Online]. Available: https://datasheets.raspberrypi.com/rpizero2/raspberry-pi-zero-2-w-product-brief.pdf
2024
-
[20]
Amd epyc™ 7002 series processors: A new standard for the modern data center,
“Amd epyc™ 7002 series processors: A new standard for the modern data center,” AMD, 2020. [Online]. Available: https://www.amd.com/content/dam/amd/en/documents/products/epyc/amd-epyc-7002-series-datasheet.pdf
2020
-
[21]
An image is worth 16x16 words: Trans- formers for image recognition at scale,
A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenbor n, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gel ly, J. Uszkoreit, and N. Houlsby, “An image is worth 16x16 words: Trans- formers for image recognition at scale,” in International Conference on Lear...
2021
-
[22]
Swin transformer: Hierarchical vision transforme r using shifted windows,
Z. Liu, Y . Lin, Y . Cao, H. Hu, Y . Wei, Z. Zhang, S. Lin, and B. Guo, “Swin transformer: Hierarchical vision transforme r using shifted windows,” in 2021 IEEE/CVF International Conference on Computer Vision (ICCV), 2021, pp. 9992–10 002
2021
-
[23]
A convnet for the 2020s,
Z. Liu, H. Mao, C.-Y . Wu, C. Feichtenhofer, T. Darrell, a nd S. Xie, “A convnet for the 2020s,” in 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) , 2022, pp. 11 966–11 976
2022
-
[24]
Y olov8,
“Y olov8,” Ultralytics, 2022. [Online]. Available: https://yolov8.com/
2022
-
[25]
Fast segment anything,
X. Zhao, W. Ding, Y . An, Y . Du, T. Y u, M. Li, M. Tang, and J. Wang, “Fast segment anything,” 2023. [Online]. Avail able: https://arxiv.org/abs/2306.12156
2023 arXiv
-
[26]
Robust speech recognition via large-scale w eak supervi- sion,
A. Radford, J. W. Kim, T. Xu, G. Brockman, C. Mcleavey, an d I. Sutskever, “Robust speech recognition via large-scale w eak supervi- sion,” in Proceedings of the 40th International Conference on Machin e Learning, ser. Proceedings of Machine Learning Research, A. Krause, E. Br...
2023
-
[27]
Opt: Open pre-trained transformer langua ge models,
S. Zhang, S. Roller, N. Goyal, M. Artetxe, M. Chen, S. Che n, C. Dewan, M. Diab, X. Li, X. V . Lin, T. Mihaylov, M. Ott, S. Shleifer, K. Shuster, D. Simig, P . S. Koura, A. Sridhar, T. Wang, and L. Zettlemoyer, “Opt: Open pre-trained transformer langua ge models,”
-
[28]
Language models are few-shot l earners,
T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P . D hariwal, A. Neelakantan, P . Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-V oss, G. Krueger, T. Henighan, R. Child, A. Rames h, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Lit win, S. Gra...
-
[29]
Language models are unsupervised multitask learners,
A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutske ver et al. , “Language models are unsupervised multitask learners,” OpenAI blog , vol. 1, no. 8, p. 9, 2019
2019
-
[30]
J. L. Hennessy and D. A. Patterson, Computer Architecture, Fifth Edition: A Quantitative Approach , 5th ed. San Francisco, CA, USA: Morgan Kaufmann Publishers Inc., 2011
2011
-
[31]
Computer multiplication and division using binary logarithms,
J. N. Mitchell, “Computer multiplication and division using binary logarithms,” IRE Transactions on Electronic Computers , vol. EC-11, no. 4, pp. 512–517, 1962
1962
-
[32]
sqrt implementation in fdlibm,
W. Kahan and K. Ng, “sqrt implementation in fdlibm,” 198 6
-
[33]
Fast inverse square root,
“Fast inverse square root,” Wikipedia
-
[34]
Aifes: A next-generation edge ai framewo rk,
L. Wulfert, J. Kühnel, L. Krupp, J. Viga, C. Wiede, P . Gem baczka, and A. Grabmaier, “Aifes: A next-generation edge ai framewo rk,” IEEE Transactions on Pattern Analysis and Machine Intelligence , vol. 46, no. 6, pp. 4519–4533, 2024
2024
-
[35]
C ompiling kb- sized machine learning models to tiny iot devices,
S. Gopinath, N. Ghanathe, V . Seshadri, and R. Sharma, “C ompiling kb- sized machine learning models to tiny iot devices,” in Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Des ign and Implementation, ser. PLDI 2019. New Y ork, NY , USA: Association for...
2019
-
[36]
Fast approximations of expon ential and loga- rithm functions combined with efficient storage/retrieval for combustion kinetics calculations,
F. Perini and R. D. Reitz, “Fast approximations of expon ential and loga- rithm functions combined with efficient storage/retrieval for combustion kinetics calculations,” Combustion and Flame, vol. 194, pp. 37–51, 2018
2018
-
[37]
Two-pass softmax algorit hm,
M. Dukhan and A. Ablavatski, “Two-pass softmax algorit hm,” in 2020 IEEE International Parallel and Distributed Processing Sy mposium W orkshops (IPDPSW), 2020, pp. 386–395
2020
-
[38]
W. J. Cody, Software Manual for the Elementary Functions (Prentice- Hall series in computational mathematics) . USA: Prentice-Hall, Inc., 1980
1980
-
[2020]
Available: https://arxiv.org/abs/2005
[Online]. Available: https://arxiv.org/abs/2005. 14165
2005
-
[2022]
Available: https://arxiv.org/abs/2205
[Online]. Available: https://arxiv.org/abs/2205. 01068
-
[2023]
Available: https://arxiv.org/abs/1606
[Online]. Available: https://arxiv.org/abs/1606. 08415
Reviewed August 12, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.