arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2403.08312cs.CLcs.AI
收藏

StreamingDialogue:通过最小损失的长上下文压缩实现长时对话学习

StreamingDialogue: Prolonged Dialogue Learning via Long Context Compression with Minimal Losses

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Kunming University of Science and Technology(昆明理工大学)

Jia-Nan Li, Quan Tu, Cunli Mao, Zhengtao Yu, Ji-Rong Wen, Rui Yan

AI总结:

针对大语言模型处理长对话的效率与一致性难题,提出基于对话注意力汇聚点的StreamingDialogue方法,通过压缩长对话历史实现长时学习,搭配两种学习策略降低信息损失,在对话任务中性能更优且大幅提升速度、降低内存占用。

摘要:

标准大语言模型(LLM)因效率和一致性问题,难以处理长上下文对话。我们观察到,对话上下文具有高度结构化的特点,对话中的话语结束(End-of-Utterance,EoU)特殊标记具备信息聚合潜力,我们将这类EoU标记称为“对话注意力汇聚点”(conv-attn sinks)。据此我们提出StreamingDialogue方法,它能以极小损失将长对话历史压缩到conv-attn sinks中,使计算复杂度随汇聚点数量(即话语数量)呈二次方降低。当前LLM已展现出处理长上下文窗口的能力,例如200K或更大的窗口尺寸。基于此,通过将话语压缩为EoU,我们的方法有望处理超过20万条话语,实现长时对话学习。为最小化压缩后重建带来的信息损失,我们设计了短记忆重建(SMR)和长记忆再激活(LMR)两种学习策略。该方法在对话任务上优于多个强基线模型,与稠密注意力重计算相比,实现了4倍的速度提升,同时内存使用量降低了18倍。

英文摘要:

Standard Large Language Models (LLMs) struggle with handling dialogues with long contexts due to efficiency and consistency issues. According to our observation, dialogue contexts are highly structured, and the special token of \textit{End-of-Utterance} (EoU) in dialogues has the potential to aggregate information. We refer to the EoU tokens as ``conversational attention sinks'' (conv-attn sinks). Accordingly, we introduce StreamingDialogue, which compresses long dialogue history into conv-attn sinks with minimal losses, and thus reduces computational complexity quadratically with the number of sinks (i.e., the number of utterances). Current LLMs already demonstrate the ability to handle long context window, e.g., a window size of 200K or more. To this end, by compressing utterances into EoUs, our method has the potential to handle more than 200K of utterances, resulting in a prolonged dialogue learning. In order to minimize information losses from reconstruction after compression, we design two learning strategies of short-memory reconstruction (SMR) and long-memory reactivation (LMR). Our method outperforms strong baselines in dialogue tasks and achieves a 4 $\times$ speedup while reducing memory usage by 18 $\times$ compared to dense attention recomputation.

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

↑