paper-with-me

홈 › Papers

When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language Models

2025-09-23 · Yingming Zheng, Hanqi Li, Kai Yu, Lu Chen arxiv

Large language models (LLMs) have achieved impressive performance across natural language processing (NLP) tasks. As real-world applications increasingly demand longer context windows, continued pretraining and supervised fine-tuning (SFT) on long-context data has become a common approach. While the effects of data length in continued pretraining have been extensively studied, their implications for SFT remain unclear. In this work, we systematically investigate how SFT data length influences LLM behavior on short-context tasks. Counterintuitively, we find that long-context SFT improves short-context performance, contrary to the commonly observed degradation from long-context pretraining. To uncover the underlying mechanisms of this phenomenon, we first decouple and analyze two key components, Multi-Head Attention (MHA) and Feed-Forward Network (FFN), and show that both independently benefit from long-context SFT. We further study their interaction and reveal a knowledge preference bias: long-context SFT promotes contextual knowledge, while short-context SFT favors parametric knowledge, making exclusive reliance on long-context SFT suboptimal. Finally, we demonstrate that hybrid training mitigates this bias, offering explainable guidance for fine-tuning LLMs.

📄 PDF Abstract BibTeX arXiv:2509.18762

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

LongBench Pro: A More Realistic and Comprehensive Bilingual Long-Context Evaluation Benchmark

2026-01-06 · Ziyang Chen, Xing Wu, Junlong Jia, Chaochen Gao 외 arxiv

The rapid expansion of context length in large language models (LLMs) has outpaced existing evaluation benchmarks. Current long-context benchmarks often trade off scalability and realism: synthetic tasks underrepresent r…

Long-Context Understanding

Randomized YaRN Improves Length Generalization for Long-Context Reasoning

2026-06-22 · Manas Mehta, Fangcong Yin, Greg Durrett arxiv

Large language models (LLMs) are typically pretrained on short sequences and then extended to work on longer sequences with additional training. However, such LLMs still struggle to further generalize to very long sequen…

Coreference Resolution

FastCuRL: Curriculum Reinforcement Learning with Progressive Context Extension for Efficient Training R1-like Reasoning Models

2025-03-21 · Mingyang Song, Mao Zheng, Zheng Li, Wenjie Yang 외

Improving the training efficiency remains one of the most significant challenges in large-scale reinforcement learning. In this paper, we investigate how the model's context length and the complexity of the training data…

Language ModelingLanguage ModellingMathreinforcement-learning+1

What is the Best Sequence Length for BABYLM?

2025-10-22 · Suchir Salhan, Richard Diehl Martinez, Zébulon Goriely, Paula Buttery arxiv

Transformer language models typically operate with a fixed-length context window, which has grown in step with large-scale pretraining datasets. In the BabyLM Challenge, however, many past submissions have defaulted to u…

Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidence

2025-02-06 · Shaopeng Fu, Liang Ding, Jingfeng Zhang, Di Wang

Jailbreak attacks against large language models (LLMs) aim to induce harmful behaviors in LLMs through carefully crafted adversarial prompts. To mitigate attacks, one way is to perform adversarial training (AT)-based ali…

In-Context Learning