IGOT: Information Gain Optimized Tokenizer on Domain Adaptive Pretraining
作者: Dawei Feng, Yihai Zhang, Zhixuan Xu
分类: cs.CL, cs.AI
发布日期: 2024-05-16
💡 一句话要点
提出信息增益优化的领域自适应预训练分词器IGOT,提升领域模型效率。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 领域自适应预训练 分词器优化 信息增益 大型语言模型 持续预训练
📋 核心要点
- 现有领域自适应方法缺乏通用范式,直接微调或持续预训练效率较低,难以有效利用领域知识。
- IGOT通过信息增益分析领域token,构建领域特定分词器,并在下游任务上持续预训练,提升模型效率。
- 实验表明,IGOT在LLaMA-7B和T5模型上分别实现了显著的token节省、训练时间节省和GPU VRAM使用节省。
📝 摘要(中文)
大型语言模型(LLM)如ChatGPT、Claude等在自然语言生成领域表现出强大的能力。然而,在特定领域使用LLM时仍存在诸多问题。一种常见方法是通过持续训练或微调,向预训练模型添加新知识(例如,私有领域知识、前沿信息)。本文提出信息增益优化的分词器(IGOT),它分析下游任务的特殊token集合,使用启发式函数φ以及特殊token及其信息增益构建新的子集,从而构建新的领域特定分词器,并在下游任务数据上继续预训练。实验表明,这种定制分词器的方法在领域自适应预训练中具有诸多积极作用,并且优于普通的数据收集和微调方法。基于实验,IGOT与LLaMA-7B的持续预训练实现了11.9%的token节省,12.2%的训练时间节省和5.8%的最大GPU VRAM使用节省。结合T5模型,甚至可以达到31.5%的训练时间节省,使得通用生成AI到特定领域的移植比以往更有效。在特定领域任务中,有监督的IGOT_τ在保持预训练期间,在减小收敛半径和收敛点方面表现出良好的性能。
🔬 方法详解
问题定义:现有领域自适应预训练方法通常直接使用通用分词器,无法有效利用领域特定知识,导致训练效率低下,模型性能提升有限。痛点在于如何高效地将领域知识融入到预训练模型中,同时降低计算成本。
核心思路:核心思路是构建一个领域特定的分词器,该分词器能够更好地表示领域知识,从而提高预训练效率。通过分析领域数据中token的信息增益,选择对领域知识贡献最大的token加入到分词器中。这样可以减少序列长度,降低计算复杂度,并提高模型对领域知识的敏感度。
技术框架:IGOT的整体框架包括以下几个主要步骤:1) 分析下游任务的特殊token集合;2) 使用启发式函数φ和token的信息增益构建新的token子集;3) 基于新的token子集构建领域特定的分词器;4) 在下游任务数据上使用新的分词器进行持续预训练。
关键创新:关键创新在于提出了信息增益优化的分词器构建方法。与传统的基于频率或规则的分词器构建方法不同,IGOT利用信息增益来衡量token对领域知识的贡献,从而选择最具代表性的token加入到分词器中。这种方法能够更有效地捕捉领域知识,提高预训练效率。
关键设计:启发式函数φ用于选择具有高信息增益的token。具体实现细节(例如,信息增益的计算方法、启发式函数的具体形式)在论文中可能有所描述。此外,持续预训练过程中的学习率、batch size等超参数也需要根据具体任务进行调整。有监督的IGOT_τ可能使用了特定的损失函数来指导分词器的学习,以减小收敛半径和收敛点。
🖼️ 关键图片
📊 实验亮点
实验结果表明,IGOT在LLaMA-7B上实现了11.9%的token节省,12.2%的训练时间节省和5.8%的最大GPU VRAM使用节省。结合T5模型,训练时间节省甚至可以达到31.5%。有监督的IGOT_τ在领域特定任务中表现出良好的收敛性能。
🎯 应用场景
IGOT可应用于各种领域自适应的自然语言处理任务,例如医疗、金融、法律等。通过构建领域特定的分词器,可以提高模型在这些领域的性能和效率,降低计算成本,加速领域模型的部署。该方法有助于将通用生成AI更有效地迁移到特定领域,提升行业智能化水平。
📄 摘要(原文)
Pretrained Large Language Models (LLM) such as ChatGPT, Claude, etc. have demonstrated strong capabilities in various fields of natural language generation. However, there are still many problems when using LLM in specialized domain-specific fields. When using generative AI to process downstream tasks, a common approach is to add new knowledge (e.g., private domain knowledge, cutting-edge information) to a pretrained model through continued training or fine-tuning. However, whether there is a universal paradigm for domain adaptation training is still an open question. In this article, we proposed Information Gain Optimized Tokenizer (IGOT), which analyzes the special token set of downstream tasks, constructs a new subset using heuristic function $φ$ with the special token and its information gain, to build new domain-specific tokenizer, and continues pretraining on the downstream task data. We explored the many positive effects of this method's customized tokenizer on domain-adaptive pretraining and verified this method can perform better than the ordinary method of just collecting data and fine-tuning. Based on our experiment, the continued pretraining process of IGOT with LLaMA-7B achieved 11.9\% token saving, 12.2\% training time saving, and 5.8\% maximum GPU VRAM usage saving, combined with the T5 model, we can even reach a 31.5\% of training time saving, making porting general generative AI to specific domains more effective than before. In domain-specific tasks, supervised $IGOT_τ$ shows great performance on reducing both the convergence radius and convergence point during keep pretraining.