arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.00408cs.LGcs.NAcs.NEmath.NA
收藏

QuAKE:使用快速近似核加速指数非线性模型推理

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

Centre for Responsible AI, Indian Institute of Technology, Madras(印度马德拉斯理工学院负责任人工智能中心);Wadhwani School of Data Science and AI, Indian Institute of Technology, Madras(印度马德拉斯理工学院瓦德瓦尼数据科学与人工智能学院)

Sai Kiran Narayanaswami, Gopalakrishnan Srinivasan, Balaraman Ravindran

AI总结:

针对模型推理中指数非线性函数计算效率低的问题,提出QuAKE算子,利用IEEE-754浮点特性快速近似指数函数,在多种CPU上实现10%-45%的推理加速且几乎不损失下游任务性能。

摘要:

随着机器学习的广泛部署和模型规模的持续增长,提升模型推理期间的计算效率已成为关键挑战。在包括Transformer在内的许多常用模型架构中,推理计算的很大一部分由Softmax等指数非线性函数构成。本研究开发了QuAKE——一组新型算子,它利用IEEE-754浮点表示的某些特性,无需专用硬件、额外内存或预计算即可快速近似指数函数。我们提出优化方法,增强QuAKE在Softmax、GELU和Logistic函数等常用指数非线性中的效率。基准测试表明,在服务器CPU上,多种模型架构和规模的推理速度提升10%至35%;在嵌入式和移动级CPU上提升5%至45%。对各领域标准数据集和任务的模型性能评估显示,QuAKE算子能在下游任务性能几乎无损失的情况下提供显著的速度优势。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑