需要小型专用语言模型?早做规划!
Need a Small Specialized Language Model? Plan Early!
AI总结:
针对小推理预算下专用小模型的构建需求,本文分别面向可单独预训练和低成本单模型适配两种场景,提出重要性采样重预训练和投影网络架构两种方案,并通过多场景实验验证了有效性。
摘要:
大语言模型是通用工具,但不适用于推理预算有限的场景。小模型推理效率更高,但容量较低,只有将其应用范围限定在专用领域时才能取得良好性能。本文探索如何利用大规模通用预训练集和有限的专用数据,获得性能优异的小型专用语言模型。我们考虑两种场景:(i)有能力为每个专用任务预训练一个模型;(ii)希望以低成本让单个预训练模型适配每个任务。在第一种场景中,我们提出一种基于重要性采样的有效方案:对预训练集重采样以模拟专用数据,再在其上训练小模型。在第二种场景中,我们提出一种新型架构——投影网络(projected networks, PN)。PN是一个大型网络,其参数可线性投影到小型网络中以实现专用化。针对两种场景,我们在多个领域、不同训练集规模和训练预算下,通过实验验证了所提方案的有效性。
英文摘要:
Large language models are versatile tools but are not suitable for small inference budgets. Small models have more efficient inference, but their lower capacity means that their performance can be good only if one limits their scope to a specialized domain. This paper explores how to get good specialized small language models using a large, generic, pretraining set and a limited amount of specialized data. We consider two scenarios, depending on whether (i) one can afford pretraining a model for each specialization task, or (ii) one wants to cheaply adapt a single pretrained model for each task. In the first scenario, we propose an effective solution based on importance sampling: we resample the pretraining set to imitate the specialization data and train a small model on it. In the second scenario, we propose a novel architecture, projected networks (PN). PN is a large network whose parameters can be linearly projected into a small network for specialization. For both scenarios, we demonstrate the empirical effectiveness of our solutions across various domains, training set sizes, and training budgets.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。