Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language Models

Longze Chen, Ziqiang Liu, Wanwei He, Yunshui Li, Run Luo +1 more
5/28/2024
cs.CL

No official code found. Best implementation: October2001/ProLong (61 stars, last commit 2024-07-23).

Abstract

Long-context modeling capabilities are important for large language models (LLMs) in various applications. However, directly training LLMs with long context windows is insufficient to enhance this capability since some training samples do not exhibit strong semantic dependencies across long contexts. In this study, we propose a data mining framework \textbf{ProLong} that can assign each training sample with a long dependency score, which can be used to rank and filter samples that are more advantageous for enhancing long-context modeling abilities in LLM training. Specifically, we first use delta perplexity scores to measure the \textit{Dependency Strength} between text segments in a given document. Then we refine this metric based on the \textit{Dependency Distance} of these segments to incorporate spatial relationships across long-contexts. Final results are calibrated with a \textit{Dependency Specificity} metric to prevent trivial dependencies introduced by repetitive patterns. Moreover, a random sampling approach is proposed to optimize the computational efficiency of ProLong. Comprehensive experiments on multiple benchmarks indicate that ProLong effectively identifies documents that carry long dependencies and LLMs trained on these documents exhibit significantly enhanced long-context modeling capabilities.

View on arXivView PDF

Code Implementations(1)

October2001/ProLongCommunity100%

[ACL 2024 (Oral)] A Prospector of Long-Dependency Data for Large Language Models

611Shell, PythonFeb 27, 20242 years ago

Similar Papers

Cite this paper

@article{chen2024long,
  title  = {Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language Models},
  author = {Longze Chen and Ziqiang Liu and Wanwei He and Yunshui Li and Run Luo and Min Yang},
  year   = {2024},
  eprint = {2405.17915},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.17915v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.17915.svg)](https://codeofpaper.com/paper/2405.17915)

Discussion