Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Use

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Chen, Yuhan, Lv, Ang, Lin, Ting-En, Chen, Changyu, Wu, Yuchuan, Huang, Fei, Li, Yongbin, Yan, Rui
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917683498319872
author Chen, Yuhan
Lv, Ang
Lin, Ting-En
Chen, Changyu
Wu, Yuchuan
Huang, Fei
Li, Yongbin
Yan, Rui
author_facet Chen, Yuhan
Lv, Ang
Lin, Ting-En
Chen, Changyu
Wu, Yuchuan
Huang, Fei
Li, Yongbin
Yan, Rui
contents In this paper, we demonstrate that an inherent waveform pattern in the attention allocation of large language models (LLMs) significantly affects their performance in tasks demanding a high degree of context awareness, such as utilizing LLMs for tool-use. Specifically, the crucial information in the context will be potentially overlooked by model when it is positioned in the trough zone of the attention waveform, leading to decreased performance. To address this issue, we propose a novel inference method named Attention Buckets. It allows LLMs to process their input through multiple parallel processes. Each process utilizes a distinct base angle for the rotary position embedding, thereby creating a unique attention waveform. By compensating an attention trough of a particular process with an attention peak of another process, our approach enhances LLM's awareness to various contextual positions, thus mitigating the risk of overlooking crucial information. In the largest tool-use benchmark, our method elevates a 7B model to achieve state-of-the-art performance, comparable to that of GPT-4. On other benchmarks and some RAG tasks, which also demand a thorough understanding of contextual content, Attention Buckets also exhibited notable enhancements in performance.
format Preprint
id arxiv_https___arxiv_org_abs_2312_04455
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Use
Chen, Yuhan
Lv, Ang
Lin, Ting-En
Chen, Changyu
Wu, Yuchuan
Huang, Fei
Li, Yongbin
Yan, Rui
Computation and Language
Artificial Intelligence
Machine Learning
In this paper, we demonstrate that an inherent waveform pattern in the attention allocation of large language models (LLMs) significantly affects their performance in tasks demanding a high degree of context awareness, such as utilizing LLMs for tool-use. Specifically, the crucial information in the context will be potentially overlooked by model when it is positioned in the trough zone of the attention waveform, leading to decreased performance. To address this issue, we propose a novel inference method named Attention Buckets. It allows LLMs to process their input through multiple parallel processes. Each process utilizes a distinct base angle for the rotary position embedding, thereby creating a unique attention waveform. By compensating an attention trough of a particular process with an attention peak of another process, our approach enhances LLM's awareness to various contextual positions, thus mitigating the risk of overlooking crucial information. In the largest tool-use benchmark, our method elevates a 7B model to achieve state-of-the-art performance, comparable to that of GPT-4. On other benchmarks and some RAG tasks, which also demand a thorough understanding of contextual content, Attention Buckets also exhibited notable enhancements in performance.
title Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Use
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2312.04455