LookupFFN: Making Transformers Compute-lite for CPU inference
Zhanpeng Zeng, Michael Davies, Pranav Pulijala, Karthikeyan Sankaralingam, Vikas Singh
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8b8049dc-ea67-425f-9cce-06a4331aa15cCited by top-tier papers6
- FrameQuant: Flexible Low-Bit Quantization for TransformersHarshavardhan Adepu, Zhanpeng Zeng, Li Zhang, Vikas SinghICML 2024 · 16 citations
- MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected LayersNing Ding, Yehui Tang, Haochen Qin, Zhenli Zhou et al.NeurIPS 2024 · 8 citations
- MEFT: Memory-Efficient Fine-Tuning through Sparse AdapterJitai Hao, Weiwei Sun, Xin Xin, Qi Meng et al.ACL 2024 · 4 citations
- Spark Transformer: Reactivating Sparsity in Transformer FFN and AttentionChong You, Kan Wu, Zhipeng Jia, Lin Chen et al.NeurIPS 2025 · 3 citations
- Composing Linear Layers from IrreduciblesTravis Pence, Daisuke Yamada, Vikas SinghNeurIPS 2025 · 1 citation
Builds on8
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
- Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan et al.AAAI 2021 · 675 citations
- Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song et al.ICLR 2021 · 122 citations
- You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli SamplingZhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya et al.ICML 2021 · 22 citations
Related papers
- FIGLUT: An Energy-Efficient Accelerator Design for FP-INT GEMM Using Look-Up TablesGunho Park, Hyeokjun Kwon, Jiwoo Kim, Jeongin Bae et al.HPCA 2025 · 10 citations
- SMYRF - Efficient Attention using Asymmetric ClusteringGiannis Daras, Nikita Kitaev, Augustus Odena, Alexandros G. DimakisNeurIPS 2020 · 54 citations
- FSA: An Alternative Efficient Implementation of Native Sparse Attention KernelRan Yan, Youhe Jiang, Zhuoming Chen, Haohui Mai et al.ICLR 2026 · 10 citations
- LUT-NN: Empower Efficient Neural Network Inference with Centroid Learning and Table LookupXiaohu Tang, Yang Wang, Ting Cao, Li Lyna Zhang et al.MobiCom 2023 · 29 citations
- NLP From Scratch Without Large-Scale Pretraining: A Simple and Efficient FrameworkXingcheng Yao, Yanan Zheng, Xiaocong Yang, Zhilin YangICML 2022 · 50 citations
