中文
相关论文

相关论文: Self-attention Does Not Need $O(n^2)$ Memory

200 篇论文

The attention mechanism is becoming increasingly popular in Natural Language Processing (NLP) applications, showing superior performance than convolutional and recurrent architectures. However, attention becomes the compution bottleneck…

硬件体系结构 · 计算机科学 2024-07-22 Hanrui Wang , Zhekai Zhang , Song Han

As its core computation, a self-attention mechanism gauges pairwise correlations across the entire input sequence. Despite favorable performance, calculating pairwise correlations is prohibitively costly. While recent work has shown the…

机器学习 · 计算机科学 2022-09-02 Amir Yazdanbakhsh , Ashkan Moradifirouzabadi , Zheng Li , Mingu Kang

We propose a systematic approach to reduce the memory consumption of deep neural network training. Specifically, we design an algorithm that costs O(sqrt(n)) memory to train a n layer network, with only the computational cost of an extra…

机器学习 · 计算机科学 2016-04-25 Tianqi Chen , Bing Xu , Chiyuan Zhang , Carlos Guestrin

Scaling pre-trained language models has resulted in large performance gains in various natural language processing tasks but comes with a large cost in memory requirements. Inspired by the position embeddings in transformers, we aim to…

计算与语言 · 计算机科学 2023-10-13 Huiyin Xue , Nikolaos Aletras

Self-attention (SA) mechanisms can capture effectively global dependencies in deep neural networks, and have been applied to natural language processing and image processing successfully. However, SA modules for image reconstruction have…

计算机视觉与模式识别 · 计算机科学 2019-05-21 Zheng Wang , Jianwu Li , Ge Song , Tieling Li

We introduce Pointer, a novel architecture that achieves linear $O(NK)$ complexity for long-range sequence modeling while maintaining superior performance without requiring pre-training. Unlike standard attention mechanisms that compute…

计算与语言 · 计算机科学 2025-08-05 Zixi Li

It is widely accepted from transformer research that "attention is all we need", but the amount of attention required has never been systematically quantified. Is quadratic $O(L^2)$ attention necessary, or is there a sub-quadratic attention…

机器学习 · 计算机科学 2026-01-28 Yufeng Huang

Many machine learning models use the manipulation of dimensions as a driving force to enable models to identify and learn important features in data. In the case of sequential data this manipulation usually happens on the token dimension…

机器学习 · 计算机科学 2023-10-24 Daniel Biermann , Fabrizio Palumbo , Morten Goodwin , Ole-Christoffer Granmo

Scaling Transformers to longer sequence lengths has been a major problem in the last several years, promising to improve performance in language modeling and high-resolution image understanding, as well as to unlock new applications in…

机器学习 · 计算机科学 2023-07-18 Tri Dao

Recent research in the field of machine learning has increasingly focused on the memorization capacity of Transformers, but how efficient they are is not yet well understood. We demonstrate that Transformers can memorize labels with…

机器学习 · 计算机科学 2025-02-28 Tokio Kajitsuka , Issei Sato

Language models struggle to generalize beyond pretraining context lengths, limiting long-horizon reasoning and retrieval. Continued pretraining on long-context data can help but is expensive due to the quadratic scaling of Attention. We…

计算与语言 · 计算机科学 2026-03-19 Sakshi Choudhary , Aditya Chattopadhyay , Luca Zancato , Elvis Nunez , Matthew Trager , Wei Xia , Stefano Soatto

Motivated by the fact that most of the information relevant to the prediction of target tokens is drawn from the source sentence $S=s_1, \ldots, s_S$, we propose truncating the target-side window used for computing self-attention by making…

机器学习 · 计算机科学 2024-12-19 Ciprian Chelba , Mia Chen , Ankur Bapna , Noam Shazeer

System-level routers that intercept LLM requests for safety classification, domain routing, and PII detection must be both fast and operationally lightweight: they should add minimal latency to every request, yet not require a dedicated GPU…

计算与语言 · 计算机科学 2026-03-16 Xunzhuo Liu , Bowei He , Xue Liu , Andy Luo , Haichen Zhang , Huamin Chen

Linear attention is an efficient attention mechanism that has recently emerged as a promising alternative to conventional softmax attention. With its ability to process tokens in linear computational complexities, linear attention, in…

计算与语言 · 计算机科学 2024-01-17 Zhen Qin , Weigao Sun , Dong Li , Xuyang Shen , Weixuan Sun , Yiran Zhong

Transformer networks, driven by self-attention, are central to Large Language Models. In generative Transformers, self-attention uses cache memory to store token projections, avoiding recomputation at each time step. However, GPU-stored…

神经与进化计算 · 计算机科学 2024-11-26 Nathan Leroux , Paul-Philipp Manea , Chirag Sudarshan , Jan Finkbeiner , Sebastian Siegel , John Paul Strachan , Emre Neftci

Transformer models gain popularity because of their superior inference accuracy and inference throughput. However, the transformer is computation-intensive, causing a long inference time. The existing works on transformer inference…

性能 · 计算机科学 2023-04-19 Yuan Feng , Hyeran Jeon , Filip Blagojevic , Cyril Guyot , Qing Li , Dong Li

Although Transformer models such as Google's BERT and OpenAI's GPT-3 are successful in many natural language processing tasks, training and deploying these models are costly and inefficient.Even if pre-trained models are used, deploying…

机器学习 · 计算机科学 2021-01-26 Madhusudan Verma

Impressive performance of Transformer has been attributed to self-attention, where dependencies between entire input in a sequence are considered at every position. In this work, we reform the neural $n$-gram model, which focuses on only…

计算与语言 · 计算机科学 2022-07-28 Mengsay Loem , Sho Takase , Masahiro Kaneko , Naoaki Okazaki

Sparse attention, which selectively attends to a subset of tokens in the context was supposed to be efficient. However, its theoretical reduction in FLOPs has rarely translated into wall-clock speed-up over its dense attention counterparts…

计算与语言 · 计算机科学 2025-02-06 Xihui Lin , Yunan Zhang , Suyu Ge , Liliang Ren , Barun Patra , Vishrav Chaudhary , Hao Peng , Xia Song

Recently, Transformer networks have redefined the state of the art in many NLP tasks. However, these models suffer from quadratic computational cost in the input sequence length $n$ to compute pairwise attention in each layer. This has…

机器学习 · 计算机科学 2020-12-22 Chulhee Yun , Yin-Wen Chang , Srinadh Bhojanapalli , Ankit Singh Rawat , Sashank J. Reddi , Sanjiv Kumar