Large language models are typically adapted to downstream tasks through supervised fine-tuning on domain-specific data. While standard fine-tuning focuses on minimizing generation loss to optimize model parameters, we take a deeper step by retaining and leveraging the model's own learning signals, analogous to how human learners reflect on past mistakes to improve future performance. We first introduce the concept of Mistake Log to systematically track the model's learning behavior and recurring errors throughout fine-tuning. Treating the original transformer-based model as the Pilot, we correspondingly design a Copilot model to refine the Pilot's inference performance via logits rectification. We name the overall Pilot-Copilot framework the Transformer Copilot, which introduces (i) a novel Copilot model design, (ii) a joint training paradigm where the Copilot continuously learns from the evolving Mistake Log alongside the Pilot, and (iii) a fused inference paradigm where the Copilot rectifies the Pilot's logits for enhanced generation. We provide both theoretical and empirical analyses on our new learning framework. Experiments on 12 benchmarks spanning commonsense, arithmetic, and recommendation tasks demonstrate that Transformer Copilot consistently improves performance by up to 34.5%, while introducing marginal computational overhead to Pilot models and exhibiting strong scalability and transferability. Our code is released at https://github.com/jiaruzouu/TransformerCopilot.
翻译:大语言模型通常通过在特定领域数据上进行监督微调来适应下游任务。标准的微调方法侧重于最小化生成损失以优化模型参数,而本文则进一步提出保留并利用模型自身的学习信号,类似于人类学习者通过反思过往错误来提升未来表现。我们首先引入“错误日志”的概念,以系统追踪模型在微调过程中的学习行为与重复性错误。将基于Transformer的原始模型视为“领航员”,我们相应设计了一个“副驾驶”模型,通过逻辑值校正来优化领航员的推理性能。我们将这一整体领航员-副驾驶框架命名为Transformer Copilot,该框架包含:(一)一种新颖的副驾驶模型设计;(二)一种联合训练范式,使副驾驶能够持续从动态更新的错误日志中学习,并与领航员同步训练;(三)一种融合推理范式,副驾驶通过校正领航员的逻辑值以提升生成质量。我们为这一新学习框架提供了理论与实证分析。在涵盖常识推理、算术运算及推荐任务的12个基准测试上的实验表明,Transformer Copilot能够持续提升模型性能,最高可达34.5%,同时仅对领航员模型引入边际计算开销,并展现出良好的可扩展性与可迁移性。代码已发布于https://github.com/jiaruzouu/TransformerCopilot。