arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.02409cs.CLcs.AIcs.LG
收藏

Dodo:面向仅解码器大语言模型的动态上下文压缩

Dodo: Dynamic Contextual Compression for Decoder-only LMs

Johns Hopkins University(约翰斯·霍普金斯大学);Microsoft(微软公司)

Guanghui Qin, Corby Rosset, Ethan C. Chau, Nikhil Rao, Benjamin Van Durme

AI总结:

针对Transformer语言模型长上下文效率低的问题,提出动态上下文压缩方法Dodo,通过每层动态隐藏状态降低自注意力成本,支持LLaMA等模型经LoRA适配,在多任务中保留能力的同时大幅削减解码开销,可实现近乎无损的高压缩率编码。

摘要:

基于Transformer的语言模型(LM)在长上下文场景下效率低下。我们提出了Dodo这一上下文压缩解决方案。与标准Transformer模型中每个token对应一个向量不同,Dodo在每一层用动态数量的隐藏状态表示文本,将自注意力的时间和空间成本降至常规水平的一小部分。此外,LLaMA等现成模型可通过LoRA等高效参数微调方法适配Dodo。在使用中,Dodo既可以作为自回归语言模型,也可以充当下游任务的上下文压缩器。我们通过语言建模、问答和摘要任务的实验证明,Dodo保留了这些任务的能力,同时大幅降低了解码阶段的开销。例如,在自编码任务中,Dodo以20倍的压缩率压缩上下文,重建的BLEU得分达98%,实现了近乎无损的编码。

英文摘要:

Transformer-based language models (LMs) are inefficient in long contexts. We propose Dodo, a solution for context compression. Instead of one vector per token in a standard transformer model, Dodo represents text with a dynamic number of hidden states at each layer, reducing the cost of self-attention to a fraction of typical time and space. Moreover, off-the-shelf models such as LLaMA can be adapted to Dodo by efficient parameter tuning methods such as LoRA. In use, Dodo can act as either an autoregressive LM or a context compressor for downstream tasks. We demonstrate through experiments in language modeling, question answering, and summarization that Dodo retains capabilities in these tasks, while drastically reducing the overhead during decoding. For example, in the autoencoding task, Dodo shrinks context at a 20x compression ratio with a BLEU score of 98% for reconstruction, achieving nearly lossless encoding.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑