paper-with-me

홈 › Papers

NoMAD-Attention: Efficient LLM Inference on CPUs Through Multiply-add-free Attention

2024-03-02 · Tianyi Zhang, Jonah Wonkyu Yi, Bowen Yao, Zhaozhuo Xu, Anshumali Shrivastava

Large language model inference on Central Processing Units (CPU) is challenging due to the vast quantities of expensive Multiply-Add (MAD) matrix operations in the attention computations. In this paper, we argue that there is a rare gem in modern CPUs, Single-Instruction-Multiple-Data (SIMD) registers, which allow for ultra-low-latency lookups in batch. We leverage this unique capability of CPUs to propose NoMAD-Attention, an efficient attention algorithm that replaces MAD operations with in-register lookups. Through hardware-aware algorithmic designs, NoMAD-Attention achieves the computation of attention scores using repeated fast accesses to SIMD registers despite their highly limited sizes. Moreover, NoMAD-Attention works with pre-trained attention-based LLMs without model finetuning. Empirical evaluations demonstrate that NoMAD-Attention maintains the quality of the original LLMs well, and speeds up the 4-bit quantized LLaMA-7B-based model by up to 2$\times$ at 16k context length. Our results are reproducible at https://github.com/tonyzhang617/nomad-dist.

📄 PDF Abstract BibTeX arXiv:2403.01273

Code (1)

tonyzhang617/nomad-dist 공식 구현

Tasks

16kCPULanguage ModelingLanguage ModellingLarge Language Model

Similar Papers 제목 키워드 기반

Highly Optimized Kernels and Fine-Grained Codebooks for LLM Inference on Arm CPUs

2024-12-23 · Dibakar Gope, David Mansell, Danny Loh, Ian Bratt

Large language models (LLMs) have transformed the way we think about language understanding and generation, enthralling both researchers and developers. However, deploying LLMs for inference has been a significant challe…

Quantization

TernGEMM: GEneral Matrix Multiply Library with Ternary Weights for Fast DNN Inference

2021-11-13 · 2021 IEEE Workshop on Signal Processing Systems (SiPS) 2021 11 · Seokhyeon Choi, Kyuhong Shim, Jungwook Choi, Wonyong Sung 외

Efficient implementation of deep neural networks on CPU-based systems is very critical because applications proliferate to embedded and Internet of Things (IoT) systems. Many CPUs for personal computers and embedded syst…

CPU

NOMAD: Linguistic Resources and Tools Aimed at Policy Formulation and Validation

2014-05-01 · LREC 2014 5 · George Kiomourtzis, George Giannakopoulos, Georgios Petasis, Pythagoras Karampiperis 외

The NOMAD project (Policy Formulation and Validation through non Moderated Crowd-sourcing) is a project that supports policy making, by providing rich, actionable information related to how citizens perceive different po…

RetrievalSentiment AnalysisText RetrievalTopic Classification

Variant interpretation using population databases: lessons from gnomAD

2021-07-23 · Sanna Gudmundsson, Moriel Singer-Berk, Nicholas A. Watts, William Phu 외

Reference population databases are an essential tool in variant and gene interpretation. Their use guides the identification of pathogenic variants amidst the sea of benign variation present in every human genome, and su…

ScalableHD: Scalable and High-Throughput Hyperdimensional Computing Inference on Multi-Core CPUs

2025-06-10 · Dhruv Parikh, Viktor Prasanna

Hyperdimensional Computing (HDC) is a brain-inspired computing paradigm that represents and manipulates information using high-dimensional vectors, called hypervectors (HV). Traditional HDC methods, while robust to noise…

Activity RecognitionHuman Activity Recognitionimage-classificationImage Classification