arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.05233cs.CLcs.IR
收藏

向语言模型高效注入知识:一种新颖的集成编码器-解码器架构

Efficient Knowledge Feeding to Language Models: A Novel Integrated Encoder-Decoder Architecture

Jawaharlal Technological University(贾瓦哈拉尔·技术大学);North Carolina School of Science and Mathematics(北卡罗来纳科学与数学学校);Indian Institute of Information Technology, Bangalore(班加罗尔印度信息技术学院)

S Santosh Kumar, Rishi Gottimukkala, Supriya Devidutta, Karthikeyan S

AI总结:

本文提出上下文向量(ICV)方法,通过潜在嵌入偏移LLM状态以替代提示示例注入知识,在问答与检索任务上优于上下文学习和微调,并以少量参数实现与LLaMA-3等模型相当的性能,显著降低计算成本。

摘要:

本文提出了一种新颖的方法,通过在统一框架内集成检索与生成过程,在预测期间高效地向语言模型(LLM)注入知识。尽管检索增强生成(RAG)模型解决了LLM训练数据缺口和知识限制问题,但它受到令牌限制约束以及对检索系统准确性的依赖的阻碍。我们提出的架构引入上下文向量(ICV)来克服这些挑战。ICV通过使用LLM的潜在嵌入来创建一个捕捉关键任务信息的向量,从而重塑了上下文学习。该向量随后被用于偏移LLM的潜在状态,在不向提示中添加演示示例的情况下增强生成过程。ICV直接将信息集成到模型中,使其能够更有效地处理这些信息。我们广泛的实验评估表明,ICV在问答、信息检索和其他任务上优于标准上下文学习和微调。该方法缓解了当前RAG模型的局限性,并为处理广泛且多样化的数据集提供了更稳健的解决方案。尽管仅利用了少量参数,我们的ICV增强模型在与LLaMA-3、Gemma和Phi-3等模型的对比中取得了具有竞争力的性能,显著降低了计算成本和内存需求。ICV缩短了提示长度,易于控制,突破了令牌限制,并且与微调相比计算效率更高。

英文摘要:

This paper introduces a novel approach to efficiently feeding knowledge to language models (LLMs) during prediction by integrating retrieval and generation processes within a unified framework. While the Retrieval-Augmented Generation (RAG) model addresses gaps in LLMs' training data and knowledge limits, it is hindered by token limit restrictions and dependency on the retrieval system's accuracy. Our proposed architecture incorporates in-context vectors (ICV) to overcome these challenges. ICV recasts in-context learning by using latent embeddings of LLMs to create a vector that captures essential task information. This vector is then used to shift the latent states of the LLM, enhancing the generation process without adding demonstration examples to the prompt. ICV directly integrates information into the model, enabling it to process this information more effectively. Our extensive experimental evaluation demonstrates that ICV outperforms standard in-context learning and fine-tuning across question-answering, information retrieval, and other tasks. This approach mitigates the limitations of current RAG models and offers a more robust solution for handling extensive and diverse datasets. Despite leveraging a fraction of the parameters, our ICV-enhanced model achieves competitive performance against models like LLaMA-3, Gemma, and Phi-3, significantly reducing computational costs and memory requirements. ICV reduces prompt length, is easy to control, surpasses token limitations, and is computationally efficient compared to fine-tuning.

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

↑