Large language models (LLMs) have acquired the ability to solve general tasks by utilizing instruction finetuning (IFT). However, IFT still relies heavily on instance training of extensive task data, which greatly limits the adaptability of LLMs to real-world scenarios where labeled task instances are scarce and broader task generalization becomes paramount. Contrary to LLMs, humans acquire skills and complete tasks not merely through repeated practice but also by understanding and following instructional guidelines. This paper is dedicated to simulating human learning to address the shortcomings of instance training, focusing on instruction learning to enhance cross-task generalization. Within this context, we introduce Task Adapters Generation from Instructions (TAGI), which automatically constructs the task-specific model in a parameter generation manner based on the given task instructions without retraining for unseen tasks. Specifically, we utilize knowledge distillation to enhance the consistency between TAGI developed through Learning with Instruction and task-specific models developed through Training with Instance, by aligning the labels, output logits, and adapter parameters between them. TAGI is endowed with cross-task generalization capabilities through a two-stage training process that includes hypernetwork pretraining and finetuning. We evaluate TAGI on the Super-Natural Instructions and P3 datasets. The experimental results demonstrate that TAGI can match or even outperform traditional meta-trained models and other hypernetwork models, while significantly reducing computational requirements.
翻译:大型语言模型(LLMs)通过指令微调(IFT)获得了解决通用任务的能力。然而,IFT仍然严重依赖于大量任务数据的实例训练,这极大地限制了LLMs在现实场景中的适应性——现实中标注任务实例稀缺,而更广泛的任务泛化能力至关重要。与LLMs不同,人类获取技能和完成任务不仅通过重复练习,还通过理解和遵循指导性准则。本文致力于模拟人类学习以解决实例训练的不足,聚焦于指令学习以增强跨任务泛化能力。在此背景下,我们提出了基于指令的任务适配器生成(TAGI),该方法能够以参数生成的方式,根据给定的任务指令自动构建任务特定模型,而无需针对未见任务进行重新训练。具体而言,我们利用知识蒸馏来增强通过指令学习开发的TAGI与通过实例训练开发的任务特定模型之间的一致性,方法是对齐两者的标签、输出逻辑值和适配器参数。TAGI通过包含超网络预训练和微调的两阶段训练过程,被赋予了跨任务泛化能力。我们在Super-Natural Instructions和P3数据集上评估了TAGI。实验结果表明,TAGI能够匹配甚至超越传统的元训练模型及其他超网络模型,同时显著降低计算需求。