mlsanityData to 7 Oct 2026

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

arXiv 2411.06360 ↗First posted 10 Nov 2024cs.LG cs.DScited by 2

Not on the map. Why?

Abstract (arXiv)

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(fracn2log 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.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 18 of its 30 references that are in the map. First posted on arXiv 10 Nov 2024.

Builds on

18 of 30 references.

References · 18

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2015BinaryConnect: Training Deep Neural Networks with binary weights during propagationscited by 571
  3. 2016Quantized Neural Networks: Training Neural Networks with Low Precision Weights and Activationscited by 413
  4. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 380
  5. 2024The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bitscited by 289
  6. 2015Quantized Convolutional Neural Networks for Mobile Devicescited by 212
  7. 2016Trained Ternary Quantizationcited by 203
  8. 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
  9. 2023BitNet: Scaling 1-bit Transformers for Large Language Modelscited by 175
  10. 2024EfficientQAT: Efficient Quantization-Aware Training for Large Language Modelscited by 123
  11. 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
  12. 2021VS-Quant: Per-vector Scaled Quantization for Accurate Low-Precision Neural Network Inferencecited by 59
6 more
  1. 2024Logits of API-Protected LLMs Leak Proprietary Informationcited by 38
  2. 2018Discovering Low-Precision Networks Close to Full-Precision Networks for Efficient Embedded Inferencecited by 33
  3. 2024Fast Matrix Multiplications for Lookup Table-Quantized LLMscited by 27
  4. 2017Minimum Energy Quantized Neural Networkscited by 20
  5. 2024ViT-1.58b: Mobile Vision Transformers in the 1-bit Eracited by 7
  6. 2022Fast matrix multiplication for binary and ternary CNNs on ARM CPUcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.