QuAKE: Speeding up Model Inference Using Quick and Approximate Kernels for Exponential Non-Linearities

Sai Kiran Narayanaswami, Gopalakrishnan Srinivasan, Balaraman Ravindran
11/30/2024
cs.LGcs.NEmath.NA

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{narayanaswami2024quake,
  title  = {QuAKE: Speeding up Model Inference Using Quick and Approximate Kernels for Exponential Non-Linearities},
  author = {Sai Kiran Narayanaswami and Gopalakrishnan Srinivasan and Balaraman Ravindran},
  year   = {2024},
  eprint = {2412.00408},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.00408v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.00408.svg)](https://codeofpaper.com/paper/2412.00408)

Discussion