无需训练、不存记忆,实时高效编辑大模型知识。
UltraEdit: Training-, Subject-, and Memory-Free Lifelong Editing in Language Models
- 一步计算参数修改量,仅用隐藏状态和梯度
- 7B模型可在24GB消费级显卡上完成编辑,速度超前法7倍
- 支持超百万次持续编辑,适合真实世界长期学习
终身学习使大语言模型能持续更新内部知识以适应变化信息。理想系统需高效、广泛地更新知识,同时保持原有能力并确保可靠部署。模型编辑为此提供了一种聚焦高效的解决方案。尽管近期方法取得进展,但在大规模实际终身适应中仍面临挑战。为此,我们提出UltraEdit,一种无需训练、不依赖特定主题、无内存存储的全新方法,适用于超大规模现实场景下的终身模型编辑。UltraEdit通过一步计算仅基于隐藏状态及其梯度的参数偏移,实现简单而高效。为提升长期适用性,采用持续更新特征统计的终身归一化策略,有效应对分布漂移并保持一致性。实验表明,UltraEdit比当前最优方法快7倍以上,显存占用减少4倍,首次实现7B模型在24GB消费级显卡上的编辑。我们构建了目前该领域最大的数据集UltraEditBench,包含超200万条编辑对,验证其可支持高达200万次编辑且保持高准确率。在五个数据集和六种模型上的综合实验显示,UltraEdit在多种编辑场景中均表现卓越,推动安全可扩展终身学习更进一步。代码已开源:https://github.com/XiaojieGu/UltraEdit。
原文摘要 · Abstract (English)
Lifelong learning enables large language models (LLMs) to adapt to evolving information by continually updating their internal knowledge. An ideal system should support efficient, wide-ranging updates while preserving existing capabilities and ensuring reliable deployment. Model editing stands out as a promising solution for this goal, offering a focused and efficient way to revise a model's internal knowledge. Although recent paradigms have made notable progress, they often struggle to meet the demands of practical lifelong adaptation at scale. To bridge this gap, we propose UltraEdit, a training-, subject-, and memory-free approach that is well-suited for ultra-scalable, real-world lifelong model editing. UltraEdit fundamentally differs from traditional paradigms by computing parameter shifts in one step using only a hidden state and its gradient, making the approach simple yet efficient. To improve scalability in lifelong settings, UltraEdit employs a lifelong normalization strategy that continuously updates feature statistics across turns, allowing it to adapt to distributional shifts and maintain consistency over time. UltraEdit achieves editing speeds more than $7\times$ faster than the previous state-of-the-art method, while requiring $4\times$ less VRAM. This makes it the only method currently capable of editing a 7B LLM on a 24GB consumer-grade GPU. Furthermore, we construct UltraEditBench, the largest dataset in the field to date with over 2M editing pairs, and demonstrate that our method supports up to 2M edits while maintaining high accuracy. Comprehensive experiments on five datasets and six models show that UltraEdit consistently achieves superior performance across diverse model editing scenarios, taking a further step towards safe and scalable lifelong learning. Our code is available at https://github.com/XiaojieGu/UltraEdit.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。