SELF:使用逻辑增长函数自我扩展上下文长度
SELF: Self-Extend the Context Length With Logistic Growth Function
AI总结:
提出SELF方法,通过逻辑增长函数分组扩展上下文长度,在LEval和LongBench上分别提升高达12%和6.4%的性能。
摘要:
大型语言模型在处理超过其训练上下文长度的长上下文时会出现问题,这源于注意力层中令牌的标准位置编码。相距很远的令牌之间很少会产生相互影响,长提示会产生意想不到的结果。为解决此问题,我们提出了SELF(使用逻辑增长函数的自我扩展上下文长度):一种使用逻辑容量方程以不同组大小对连续令牌进行分组,并在较小相对距离处使用恒定组大小的解决方案。与LongLM扩展方法相比,我们的模型在LEval上的性能提升了高达12%(特别是在Qwen模型上)。在LongBench中的摘要相关任务上,我们的模型比LongLM表现高出6.4%(特别是在Llama-2-7b模型上)。在LEval的阅读理解任务上,我们的模型比LongLM高出5.4%。我们的代码可在https://github.com/alexeipc/SELF-LLM获取。
英文摘要:
Large language models suffer issues when operated on long contexts that are larger than their training context length due to the standard position encoding for tokens in the attention layer. Tokens a long distance apart will rarely have an effect on each other and long prompts yield unexpected results. To solve this problem, we propose SELF (Self-Extend the Context Length With Logistic Growth Function): a solution of grouping consecutive tokens at varying group sizes using a logistic capacity equation combined with a constant group size at smaller relative distances. Our model had an increase in performance of up to 12% compared to the LongLM extension method in LEval (specifically on the Qwen model). On summarization related tasks in LongBench, our model performed up to 6.4% better than LongLM (specifically on the Llama-2-7b model). On reading comprehension tasks from LEval, our model performed up to 5.4% better than the LongLM. Our code is available at https://github.com/alexeipc/SELF-LLM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。