Lune

ICML2025顶会

An Efficient Matrix Multiplication Algorithm for Accelerating Inference in Binary and Ternary Neural Networks

Mohsen Dehghankar, Mahdi Erfanian, Abolfazl Asudeh

问 Lune

摘要

Despite their tremendous success and versatility, Deep Neural Networks (DNNs) such as Large Language Models (LLMs) suffer from inference inefficiency and rely on advanced computational infrastructure. To address these challenges and make these models more accessible and cost-effective, in this paper, we propose algorithms to improve the inference time and memory efficiency of DNNs with binary and ternary weight matrices. Particularly focusing on matrix multiplication as the bottleneck operation of inference, we observe that, once trained, the weight matrices of a model no longer change. This allows us to preprocess these matrices and create indices that help reduce the storage requirements by a logarithmic factor while enabling our efficient inference algorithms. Specifically, for a n × n weight matrix, our efficient algorithm guarantees a time complexity of O( n 2 log n ), a logarithmic factor improvement over the standard vector-matrix multiplication. Besides theoretical analysis, we conduct extensive experiments to evaluate the practical efficiency of our algorithms. Our results confirm the superiority of our approach both with respect to time and memory, as we observed a reduction in the multiplication time up to 29x and memory usage up to 6x. When applied to LLMs, our experiments show up to a 5.24x speedup in the inference time. 1 Related Work is further discussed in Appendix B.

问 Lune

尽管问,回答会引用原文。

Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。

可以从这些问题问起

Lune 的依据

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

获取答案

免费开始,无需绑卡

引用它的顶会 Paper1

  1. RTInfer: Real-Time Inference of Multiple DNNs on Edge GPUsRenjie Li, Tong Sun, Yi Gao, Wei DongICML 2026

它引用的 Paper3

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Ladder: Enabling Efficient Low-Precision Deep Learning Computing through Hardware-aware Tensor TransformationLei Wang, Lingxiao Ma, Shijie Cao, Quanlu Zhang 等OSDI 2024 · 56 次引用
  3. Fast Matrix Multiplications for Lookup Table-Quantized LLMsHan Guo, William Brandon, Radostin Cholakov, Jonathan Ragan-Kelley 等EMNLP Findings 2024 · 5 次引用

相关 Paper

  1. Computation and Memory-Efficient Model Compression with Gradient ReweightingZhiwei Li, Yuesen Liao, Binrui Wu, Yuquan Zhou 等NeurIPS 2025
  2. Basis Sharing: Cross-Layer Parameter Sharing for Large Language Model CompressionJingcun Wang, Yu-Guang Chen, Ing-Chao Lin, Bing Li 等ICLR 2025
  3. Scaling Laws and Efficient Inference for Ternary Language ModelsTejas Vaidhya, Ayush Kaushal, Vineet Jain, Francis Couture Harpin 等ACL 2025
  4. Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in TransformersYingyu Liang, Heshan Liu, Zhenmei Shi, Zhao Song 等EMNLP Findings 2025
  5. Differentiable Learning of Generalized Structured Matrices for Efficient Deep Neural NetworksChangwoo Lee, Hun-Seok KimICLR 2024 · 6 次引用
黄昏的海面,两侧是细线勾勒的悬崖