paper-with-me

홈 › Papers

LongAlign: A Recipe for Long Context Alignment of Large Language Models

2024-01-31 · Yushi Bai, Xin Lv, Jiajie Zhang, Yuze He, Ji Qi, Lei Hou, Jie Tang, Yuxiao Dong, Juanzi Li

Extending large language models to effectively handle long contexts requires instruction fine-tuning on input sequences of similar length. To address this, we present LongAlign -- a recipe of the instruction data, training, and evaluation for long context alignment. First, we construct a long instruction-following dataset using Self-Instruct. To ensure the data diversity, it covers a broad range of tasks from various long context sources. Second, we adopt the packing and sorted batching strategies to speed up supervised fine-tuning on data with varied length distributions. Additionally, we develop a loss weighting method to balance the contribution to the loss across different sequences during packing training. Third, we introduce the LongBench-Chat benchmark for evaluating instruction-following capabilities on queries of 10k-100k in length. Experiments show that LongAlign outperforms existing recipes for LLMs in long context tasks by up to 30\%, while also maintaining their proficiency in handling short, generic tasks. The code, data, and long-aligned models are open-sourced at https://github.com/THUDM/LongAlign.

📄 PDF Abstract BibTeX arXiv:2401.18058

Code (1)

thudm/longalign 공식 구현 pytorch

Tasks

DiversityInstruction Following

Methods 이 논문이 사용한 방법론

SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…

Similar Papers 제목 키워드 기반

Improving Long-Text Alignment for Text-to-Image Diffusion Models

2024-10-15 · Luping Liu, Chao Du, Tianyu Pang, Zehan Wang 외

The rapid advancement of text-to-image (T2I) diffusion models has enabled them to generate unprecedented results from given texts. However, as text inputs become longer, existing encoding methods like CLIP face limitatio…

A Recipe for Long-Context Reasoning in Large Language Models via On-Policy Optimization and Distillation

2026-05-12 · Miguel Moura Ramos, Duarte M. Alves, André F. T. Martins arxiv

Existing approaches to post-train models for long-context tasks face complementary limitations: (i) supervised fine-tuning (SFT) provides stable supervision but suffers from exposure bias; (ii) reinforcement learning met…

Reinforcement Learning

LongRecipe: Recipe for Efficient Long Context Generalization in Large Language Models

2024-08-31 · Zhiyuan Hu, Yuliang Liu, Jinman Zhao, Suyuchen Wang 외

Large language models (LLMs) face significant challenges in handling long-context tasks because of their limited effective context window size during pretraining, which restricts their ability to generalize over extended…

8kGPU

Images & Recipes: Retrieval in the cooking context

2018-05-02 · Micael Carvalho, Rémi Cadène, David Picard, Laure Soulier 외

Recent advances in the machine learning community allowed different use cases to emerge, as its association to domains like cooking which created the computational cuisine. In this paper, we tackle the picture-recipe ali…

BIG-bench Machine LearningRetrieval

POINTS-Seeker: An Open Recipe for Multimodal Search Agents with Visual Memory Management

2026-04-15 · Yikun Liu, Yuan Liu, Le Tian, Xiao Zhou 외 arxiv

Large Multimodal Models (LMMs) excel at visual perception but struggle with real-time, knowledge-intensive queries due to their reliance on static parametric knowledge. While multimodal search agents offer a promising so…

Visual Reasoning