Skip to main content
QUICK REVIEW

[论文解读] NLI:Non-uniform Linear Interpolation Approximation of Nonlinear Operations for Efficient LLMs Inference

Jiangyong Yu, Xiaomeng Han|arXiv (Cornell University)|Feb 3, 2026
Natural Language Processing TechniquesComputer Science被引用 0
一句话总结

NLI 引入了一个无需标定的、动态规划–最优的非均匀线性插值,用以在 LLMs 中逼近非线性算子,从而实现可重复使用的查找表方法以及可即插即用的硬件引擎,并带来显著的效率提升。

ABSTRACT

Large Language Models (LLMs) have demonstrated remarkable performance across a wide range of tasks, but their deployment is often constrained by substantial memory footprints and computational costs. While prior work has achieved significant progress in compressing and accelerating linear layers, nonlinear layers-such as SiLU, RMSNorm, and Softmax-still heavily depend on high-precision floating-point operations. In this paper, we propose a calibration-free, dynamic-programming-optimal, and hardware-friendly framework called Non-uniform Linear Interpolation (NLI). NLI is capable of efficiently approximating a variety of nonlinear functions, enabling seamless integration into LLMs and other deep neural networks with almost no loss in accuracy. NLI ingeniously recasts cutpoint selection as a dynamic-programming problem, achieving the globally minimal interpolation error in O(MxN2) time via Bellman's optimality principle. Based on the NLI algorithm, we also design and implement a plug-and-play universal nonlinear computation unit. Hardware experiments demonstrate that the NLI Engine achieves more than 4x improvement in computational efficiency compared to the state-of-the-art designs.

研究动机与目标

  • 在LLMs中由于非线性层(例如 Softmax、RMSNorm、SiLU)的高 FP32 成本,推动对高效非线性运算加速的需求。
  • 提出一个无需标定、全局最优的非均匀插值框架(NLI),在模型与层之间实现可重复使用的 LUT。
  • 开发一个硬件友好型 NLI 引擎,具有两级寻址转换以提升吞吐、面积和功耗。
  • 在软件端展示在 Llama、Qwen 及其他 DNNs 上的准确性保持,以及相对于最先进单元的硬件效率提升。

提出的方法

  • 将分割点放置问题建模为动态规划问题,以在 FP16 网格上使用 M 个分割点最小化平均相对插值误差,得到无需标定的 LUT。
  • 通过 Bellman 最优性求解 DP,在 O(M N^2) 时间内达到全局最优(N 为 FP16 点,M 为分割点)。
  • 在硬件中采用两级地址转换,将比较器数量从 259 减少到 10,实现高效 LUT 查找与插值。
  • 将 NLI 引擎设计为一个可插拔的非线性计算单元,具有四级流水线,分别用于主区间选择、微地址生成、LUT 读出和插值。
  • 软件评估:在 Llama 和 Qwen 上替换非线性算子为 NLI,且无需标定且准确性损失可忽略不计;在视觉模型(ViT、CNNs)上评估以验证通用性。
  • 硬件评估:在 SMIC 28nm 芯片上合成 NLI,比较面积、功耗、吞吐量与效率,与 NN-LUT 和 RI-LUT 相比。
Figure 1: (a) Range of SiLU activations in representative LLMs; values can exceed $\pm 100$ (e.g., Qwen2.5-32B, Qwen3-8B). (b) Wikitext-2 perplexity (log-scale) with FP32, NN-LUT, and our NLI . NN-LUT collapses when outliers occur—perplexity skyrockets up to $7.0{\times}10^{4}$ —whereas NLI matches
Figure 1: (a) Range of SiLU activations in representative LLMs; values can exceed $\pm 100$ (e.g., Qwen2.5-32B, Qwen3-8B). (b) Wikitext-2 perplexity (log-scale) with FP32, NN-LUT, and our NLI . NN-LUT collapses when outliers occur—perplexity skyrockets up to $7.0{\times}10^{4}$ —whereas NLI matches

实验结果

研究问题

  • RQ1一个无需标定、全局最优的非均匀插值方案在不同模型中对非线性算子近似时是否几乎无精度损失?
  • RQ2NLI LUT 是否能跨 LLM 与视觉模型泛化,其硬件占用相对于现有非线性计算单元的表现如何?
  • RQ3在实际 LLM/NNP 工作负载中部署 NLI 时,软件与硬件层面的实际收益(准确性、延迟、面积、功耗、吞吐量)是怎样的?

主要发现

  • NLI 在具有代表性的新颖模型和视觉模型上保持接近 FP32 的非线性算子保真度,误差可忽略不计。
  • 在 Llama 和 Qwen 上用 NLI 替换非线性算子,在零样本基准测试中不出现精度下降,在 WikiText-2 上保持具有竞争力的困惑度。
  • 硬件评估显示 NLI 引擎相比于当前最先进的非线性单元(NN-LUT 和 RI-LUT)实现了超过 4× 的效率提升。
  • 与 NN-LUT 和 RI-LUT 相比,NLI 在 1 GHz 下将面积降低约 68–69%,并在实现相似吞吐量的同时功耗更低。
  • 两级寻址转换设计使所需比较器数量从 259 降至 10,使非线性单元紧凑、快速且具流水线性。
  • 基于 DP 的 LUT 构造具有 11 个宏端点(加上 259 个总分割点),在 FP16 输入上的最坏情况误差维持在 1.2e-3 以下,接近全局最优插值。
Figure 2: Approximation quality of the SiLU activation over the range $[-150,150]$ , which covers $\geq$ 99.9% of activations under our measurement protocol (see Figure. 1 (a) and Appendix. A.4 ). Panel (a) and Panel (b) show the result of NN-LUT, and panel (c) shows our NLI framework. For each meth
Figure 2: Approximation quality of the SiLU activation over the range $[-150,150]$ , which covers $\geq$ 99.9% of activations under our measurement protocol (see Figure. 1 (a) and Appendix. A.4 ). Panel (a) and Panel (b) show the result of NN-LUT, and panel (c) shows our NLI framework. For each meth

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。