SELF:基于 logistic 生长函数扩展上下文长度
计算与语言
2025-05-26 v1 机器学习
摘要
大语言模型在处理超过其训练上下文长度的长文本时会遇到问题,由于注意力层中对 token 的标准位置编码,距离较远的 token 彼此之间几乎没有影响,长提示会产生意外结果。为解决此问题,我们提出SELF(Self-Extend the Context Length With Logistic Growth Function):一种使用 logistic 容量方程对连续 token 进行分组的解决方案,方程中在较小的相对距离处使用恒定的分组大小。我们的方法在 LEval 中的 Qwen 模型上相较于 LongLM 扩展方法提升了最高 12%的性能。在 LongBench 的摘要相关任务中,针对 Llama-2-7b 模型,本模型比 LongLM 表现出最高 6.4%的优势。在 LEval 的阅读理解任务中,本模型比 LongLM 表现出最高 5.4%的优势。我们的代码已公开于 https://github.com/alexeipc/SELF-LLM。
引用
@article{arxiv.2505.17296,
title = {SELF: Self-Extend the Context Length With Logistic Growth Function},
author = {Phat Thanh Dang and Saahil Thoppay and Wang Yang and Qifan Wang and Vipin Chaudhary and Xiaotian Han},
journal= {arXiv preprint arXiv:2505.17296},
year = {2025}
}
备注
11 pages, 5 figures, 3 tables