Lune

ICML2023顶会

LookupFFN: Making Transformers Compute-lite for CPU inference

Zhanpeng Zeng, Michael Davies, Pranav Pulijala, Karthikeyan Sankaralingam, Vikas Singh

摘要

While GPU clusters are the de facto choice for training large deep neural network (DNN) models today, several reasons including ease of workflow, security and cost have led to efforts investigating whether CPUs may be viable for inference in routine use in many sectors of the industry. But the imbalance between the compute capabilities of GPUs and CPUs is huge. Motivated by these considerations, we study a module which is a workhorse within modern DNN architectures, GEMM based Feed Forward Networks (FFNs), and assess the extent to which it can be made compute- (or FLOP-) lite. Specifically, we propose an alternative formulation (we call it LookupFFN) to GEMM based FFNs inspired by the recent studies of using Locality Sensitive Hashing (LSH) to approximate FFNs. Our formulation recasts most essential operations as a memory look-up, leveraging the trade-off between the two resources on any platform: compute and memory (since CPUs offer it in abundance). For RoBERTa language model pretraining, our formulation achieves similar performance compared to GEMM based FFNs, while dramatically reducing the required FLOP. Our development is complemented with a detailed hardware profiling of strategies that will maximize efficiency -- not just on contemporary hardware but on products that will be offered in the near/medium term future. Code is avaiable at https://github.com/mlpen/LookupFFN.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Big Bird: Transformers for Longer Sequences 引用了 Reformer: The Efficient Transformer
  • Rethinking Attention with Performers 引用了 Reformer: The Efficient Transformer
  • You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling 引用了 Rethinking Attention with Performers
  • You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling 引用了 Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention
  • You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling 引用了 Reformer: The Efficient Transformer
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention 引用了 Rethinking Attention with Performers
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention 引用了 Reformer: The Efficient Transformer
  • Spark Transformer: Reactivating Sparsity in Transformer FFN and Attention 引用了 Reformer: The Efficient Transformer
  • MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected Layers 引用了 Rethinking Attention with Performers
  • MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected Layers 引用了 You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling
  • MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected Layers 引用了 Reformer: The Efficient Transformer
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. FrameQuant: Flexible Low-Bit Quantization for TransformersHarshavardhan Adepu, Zhanpeng Zeng, Li Zhang, Vikas SinghICML 2024 · 16 次引用
  2. MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected LayersNing Ding, Yehui Tang, Haochen Qin, Zhenli Zhou 等NeurIPS 2024 · 8 次引用
  3. MEFT: Memory-Efficient Fine-Tuning through Sparse AdapterJitai Hao, Weiwei Sun, Xin Xin, Qi Meng 等ACL 2024 · 4 次引用
  4. Spark Transformer: Reactivating Sparsity in Transformer FFN and AttentionChong You, Kan Wu, Zhipeng Jia, Lin Chen 等NeurIPS 2025 · 3 次引用
  5. Composing Linear Layers from IrreduciblesTravis Pence, Daisuke Yamada, Vikas SinghNeurIPS 2025 · 1 次引用

它引用的 Paper8

  1. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
  2. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
  3. Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan 等AAAI 2021 · 675 次引用
  4. Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song 等ICLR 2021 · 122 次引用
  5. You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli SamplingZhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya 等ICML 2021 · 22 次引用

相关 Paper

  1. FIGLUT: An Energy-Efficient Accelerator Design for FP-INT GEMM Using Look-Up TablesGunho Park, Hyeokjun Kwon, Jiwoo Kim, Jeongin Bae 等HPCA 2025 · 10 次引用
  2. SMYRF - Efficient Attention using Asymmetric ClusteringGiannis Daras, Nikita Kitaev, Augustus Odena, Alexandros G. DimakisNeurIPS 2020 · 54 次引用
  3. FSA: An Alternative Efficient Implementation of Native Sparse Attention KernelRan Yan, Youhe Jiang, Zhuoming Chen, Haohui Mai 等ICLR 2026 · 10 次引用
  4. LUT-NN: Empower Efficient Neural Network Inference with Centroid Learning and Table LookupXiaohu Tang, Yang Wang, Ting Cao, Li Lyna Zhang 等MobiCom 2023 · 29 次引用
  5. NLP From Scratch Without Large-Scale Pretraining: A Simple and Efficient FrameworkXingcheng Yao, Yanan Zheng, Xiaocong Yang, Zhilin YangICML 2022 · 50 次引用
黄昏的海面,两侧是细线勾勒的悬崖