paper-with-me

홈 › Papers

LongAttn: Selecting Long-context Training Data via Token-level Attention

2025-02-24 · Longyun Wu, Dawei Zhu, Guangxiang Zhao, Zhuocheng Yu, Junfeng Ran, Xiangyu Wong, Lin Sun, Sujian Li

With the development of large language models (LLMs), there has been an increasing need for significant advancements in handling long contexts. To enhance long-context capabilities, constructing high-quality training data with long-range dependencies is crucial. Existing methods to select long-context data often rely on sentence-level analysis, which can be greatly optimized in both performance and efficiency. In this paper, we propose a novel token-level framework, LongAttn, which leverages the self-attention mechanism of LLMs to measure the long-range dependencies for the data. By calculating token-level dependency strength and distribution uniformity of token scores, LongAttn effectively quantifies long-range dependencies, enabling more accurate and efficient data selection. We filter LongABC-32K from open-source long-context datasets (ArXiv, Book, and Code). Through our comprehensive experiments, LongAttn has demonstrated its excellent effectiveness, scalability, and efficiency. To facilitate future research in long-context data, we released our code and the high-quality long-context training data LongABC-32K.

📄 PDF Abstract BibTeX arXiv:2502.16860

Code (1)

Lyun0912-wu/LongAttn 공식 구현 pytorch

Tasks

Sentence

Similar Papers 제목 키워드 기반

LongAttnComp: Cross-Family Context Compression for Long-Context Reasoning

2026-05-31 · Mengmeng Ji, Ravi Shanker Raju, Jonathan Lingjie Li, Chen Wu arxiv

As real-world applications increasingly require processing inputs of 100k+ tokens, the gap between context length and inference efficiency has become a critical bottleneck. Context compression offers a way to reduce pref…

PolicyLong: Towards On-Policy Context Extension

2026-04-09 · Junlong Jia, Ziyang Chen, Xing Wu, Chaochen Gao 외 arxiv

Extending LLM context windows is hindered by scarce high-quality long-context data. Recent methods synthesize data with genuine long-range dependencies via information-theoretic verification, selecting contexts that redu…

Chunked TabPFN: Exact Training-Free In-Context Learning for Long-Context Tabular Data

2025-08-30 · Renat Sergazinov, Shao-An Yin arxiv

TabPFN v2 achieves better results than tree-based models on several tabular benchmarks, which is notable since tree-based models are usually the strongest choice for tabular data. However, it cannot handle more than 10K …

Attention Reveals More Than Tokens: Training-Free Long-Context Reasoning with Attention-guided Retrieval

2025-03-12 · Yuwei Zhang, Jayanth Srinivasa, Gaowen Liu, Jingbo Shang

Large Language Models (LLMs) often exhibit substantially shorter effective context lengths than their claimed capacities, especially when handling complex reasoning tasks that require integrating information from multipl…

LongHeads: Multi-Head Attention is Secretly a Long Context Processor

2024-02-16 · Yi Lu, Xin Zhou, wei he, Jun Zhao 외

Large language models (LLMs) have achieved impressive performance in numerous domains but often struggle to process lengthy inputs effectively and efficiently due to limited length generalization and attention's quadrati…

Sentence