Figuring out which Pre-Trained Model (PTM) from a model zoo fits the target task is essential to take advantage of plentiful model resources. With the availability of numerous heterogeneous PTMs from diverse fields, efficiently selecting the most suitable PTM is challenging due to the time-consuming costs of carrying out forward or backward passes over all PTMs. In this paper, we propose Model Spider, which tokenizes both PTMs and tasks by summarizing their characteristics into vectors to enable efficient PTM selection. By leveraging the approximated performance of PTMs on a separate set of training tasks, Model Spider learns to construct tokens and measure the fitness score between a model-task pair via their tokens. The ability to rank relevant PTMs higher than others generalizes to new tasks. With the top-ranked PTM candidates, we further learn to enrich task tokens with their PTM-specific semantics to re-rank the PTMs for better selection. Model Spider balances efficiency and selection ability, making PTM selection like a spider preying on a web. Model Spider demonstrates promising performance in various configurations of model zoos.
翻译:摘要:从模型库中找出适用于目标任务的预训练模型(PTM),是充分利用丰富模型资源的关键。由于不同领域的众多异构PTM可以获取,对所有PTM执行前向或后向传播需要消耗大量时间,因此高效选择最合适的PTM具有挑战性。本文提出模型蜘蛛,通过将PTM和任务的特征总结为向量进行标记,从而实现高效的PTM选择。通过利用PTM在一组独立训练任务上的近似性能,模型蜘蛛学习构建标记,并通过标记度量模型-任务对之间的适配分数。将相关PTM排在其他模型之前的能力可泛化到新任务上。基于排名靠前的PTM候选,我们进一步学习用其PTM特定语义丰富任务标记,以重新排序PTM,实现更好的选择。模型蜘蛛平衡了效率与选择能力,使PTM选择如同蜘蛛在网络上捕食。模型蜘蛛在多种模型库配置下均展现出优异的性能。