Many applications of large language models (LLMs) require long-context understanding, but models continue to struggle with such tasks. We hypothesize that conventional next-token prediction training could contribute to this, because each token is assigned equal weight. Yet, intuitively, the amount of context needed to predict the next token accurately varies greatly across different data. To reflect this, we propose various novel token-weighting schemes that assign different weights to each training token in the loss, thereby generalizing existing works. For this, we categorize token-weighting methods using a two-step framework which compares the confidences of a long-context and short-context model to score tokens. We evaluate all methods on multiple long-context understanding tasks and show that non-uniform loss weights are helpful to improve the long-context abilities of LLMs. Different short-context models can be used effectively for token scoring, including models that are much smaller than the long-context model that is trained. All in all, this work contributes to a better understanding of the trade-offs long-context language modeling faces and provides guidelines for model steering via loss-weighting based on empirical evidence. The code can be found on Github.
Optimal Transport-Based Token Weighting scheme for Enhanced Preference Optimization
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学人工智能学院);LLM Team, Shopee Pte. Ltd.(Shopee Pte. Ltd. 语言模型团队);Beijing Key Laboratory of Research on Large Models and Intelligent Governance and Engineering Research Center of Next-Generation Intelligent Search and Recommendation, MOE(北京大型模型与智能治理研究重点实验室)
DOPRA: Decoding Over-accumulation Penalization and Re-allocation in Specific Weighting Layer
Northeastern University(东北大学);Sydney Smart Technology College(悉尼智能科技学院);Shanghai Jiao Tong University(上海交通大学);School of Electronic Information and Electrical Engineering(电子信息与电气工程学院)
Taking a Deep Breath: Enhancing Language Modeling of Large Language Models with Sentinel Tokens
State Key Laboratory of Multimedia Information Processing, School of Computer Science, Peking University(多媒体信息处理国家重点实验室,北京大学计算机学院);School of Software & Microelectronics, Peking University(北京大学软件与微电子学院);Tencent Hunyuan(腾讯文言);Department of Computing, The Hong Kong Polytechnic University(香港理工大学计算机系);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);Alibaba Group(阿里巴巴集团)
What Kinds of Tokens Benefit from Distant Text? An Analysis on Long Context Language Modeling
Wangxuan Institute of Computer Technology, Peking University(北京大学王选计算机研究所);School of Intelligence Science and Technology, Peking University(北京大学智能科学与技术学院);School of Electronics Engineering and Computer Science, Peking University(北京大学电子与计算机工程学院)
Length Value Model: Scalable Value Pretraining for Token-Level Length Modeling
University of California, Santa Barbara(加州大学圣巴巴拉分校);Carnegie Mellon University(卡内基梅隆大学);University of Wisconsin–Madison(威斯康星大学麦迪逊分校);LMSYS Org(LMSYS组织);Apple Inc.(苹果公司)
本文提出Length Value Model,通过令牌级建模实现高效的长度预测,提升生成长度的准确性和效率,实验显示其在多个任务中优于现有模型。
SCOPE: Signal-Calibrated On-Policy Distillation Enhancement with Dual-Path Adaptive Weighting
University of Science and Technology of China(中国科学技术大学);Meituan LongCat Interaction Team(美团 LongCat 交互团队);Nanjing University(南京大学);Fudan University(复旦大学);Huazhong University of Science and Technology(华中科技大学)
TASTE: Text-Aligned Speech Tokenization and Embedding for Spoken Language Modeling
MediaTek Research(联发科技研究);Graduate Institute of Communication Engineering, National Taiwan University(国立台湾大学通信工程研究所);Artificial Intelligence Center of Research Excellence, National Taiwan University(国立台湾大学卓越人工智能研究中心)
Weighting What Matters: Boosting Sample Efficiency in Medical Report Generation via Token Reweighting
TUM School of Computation, Information and Technology(慕尼黑技术大学计算、信息与技术学院);Technical University of Munich(慕尼黑技术大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心);Department of Computing, Imperial College London(伦敦帝国学院计算机系)
Rethinking Length-Based Training: Batch Composition and Loss Normalization in Speech Token Language Models
Beijing Institute of Technology, Zhuhai(北京理工大学珠海校区);Institute of Science Tokyo(东京科学大学);Northeastern University(东北大学);Sichuan University(四川大学);Wuhan University(武汉大学);Ant Group(蚂蚁集团)