arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.06169cs.LGcs.AIcs.CLstat.ML
收藏

就地测试时间训练

In-Place Test-Time Training

Peking University(北京大学)

Guhao Feng, Shengjie Luo, Kai Hua, Ge Zhang, Di He, Wenhao Huang, Tianle Cai

AI总结:

本文提出了一种无需重新训练的就地测试时间训练框架,通过调整MLP块的最终投影矩阵实现模型在推理时的动态更新,提升大语言模型在长上下文任务中的性能。

摘要:

静态的"训练后部署"范式从根本上限制了大型语言模型(LLMs)在现实任务中动态适应权重的能力。测试时间训练(TTT)通过在推理时更新部分模型参数(快权重)提供了一种有吸引力的替代方案,但其在当前LLM生态系统中的潜力受到关键障碍的限制,包括架构不兼容性、计算效率低下以及语言建模中快权重目标的不一致。本文引入了就地测试时间训练(In-Place TTT),一种能够无缝赋予LLMs测试时间训练能力的框架。In-Place TTT将普遍存在MLP块的最终投影矩阵作为其可调节的快权重,使LLMs能够无需从头开始重新训练即可获得增强。此外,我们用一个经过理论支撑的定制目标替代了TTT通用的重建目标,该目标与自回归语言建模的下一个标记预测任务一致。这种原理性的目标,结合高效的分块更新机制,导致了一个高度可扩展的算法,与上下文并行兼容。广泛的实验验证了我们框架的有效性:作为一种就地增强,它使4B参数模型在上下文长度达128k的任务上取得优越性能;当从头开始预训练时,它在竞争性的TTT相关方法中表现一致。消融研究结果进一步提供了对设计选择的深入见解。总体而言,我们的结果确立了In-Place TTT作为LLM持续学习范式的重要一步。

英文摘要:

The static ``train then deploy" paradigm fundamentally limits Large Language Models (LLMs) from dynamically adapting their weights in response to continuous streams of new information inherent in real-world tasks. Test-Time Training (TTT) offers a compelling alternative by updating a subset of model parameters (fast weights) at inference time, yet its potential in the current LLM ecosystem is hindered by critical barriers including architectural incompatibility, computational inefficiency and misaligned fast weight objectives for language modeling. In this work, we introduce In-Place Test-Time Training (In-Place TTT), a framework that seamlessly endows LLMs with Test-Time Training ability. In-Place TTT treats the final projection matrix of the ubiquitous MLP blocks as its adaptable fast weights, enabling a ``drop-in" enhancement for LLMs without costly retraining from scratch. Furthermore, we replace TTT's generic reconstruction objective with a tailored, theoretically-grounded objective explicitly aligned with the Next-Token-Prediction task governing autoregressive language modeling. This principled objective, combined with an efficient chunk-wise update mechanism, results in a highly scalable algorithm compatible with context parallelism. Extensive experiments validate our framework's effectiveness: as an in-place enhancement, it enables a 4B-parameter model to achieve superior performance on tasks with contexts up to 128k, and when pretrained from scratch, it consistently outperforms competitive TTT-related approaches. Ablation study results further provide deeper insights on our design choices. Collectively, our results establish In-Place TTT as a promising step towards a paradigm of continual learning in LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑