Pay Attention to What You Need

Yifei Gao, Shaohong Chen, Lei Wang, Ruiting Dai, Ziyun Zhang +3 more
7/25/2023
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Although large language models (LLMs) have achieved significant success in natural language processing, they still struggle with long-context comprehension. Traditional approaches to mitigating this issue typically rely on fine-tuning or retraining, which is both resource-intensive and challenging to deploy in lightweight industrial settings. In this paper, we investigate the potential to accomplish this without any additional resources. Through an in-depth study of the attention mechanism in LLMs, we propose a method called Scaled ReAttention (SRA) to strengthen LLMs' ability to interpret and retrieve information by strategically manipulating their attention scores during inference. Through extensive experiments, we demonstrate that integrating SRA significantly boosts LLMs' performance on a variety of downstream tasks, highlighting its practical potential for enhancing language understanding without incurring the overhead of traditional training.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gao2023attention,
  title  = {Pay Attention to What You Need},
  author = {Yifei Gao and Shaohong Chen and Lei Wang and Ruiting Dai and Ziyun Zhang and Kerui Ren and Jiaji Wu and Jun Cheng},
  year   = {2023},
  eprint = {2307.13365},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.13365v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.13365.svg)](https://codeofpaper.com/paper/2307.13365)

Discussion