arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2109.07460cs.CL
收藏

基于自适应Tokenization的语言模型有效领域自适应

Efficient Domain Adaptation of Language Models via Adaptive Tokenization

Stanford University(斯坦福大学);Amazon(亚马逊);AWS AI HLT(AWS 人工智能人类语言技术)

Vin Sachidananda, Jason S. Kessler, Yi-an Lai

摘要:

在大型数据集上训练的基于上下文嵌入的语言模型,如BERT和RoBERTa,在广泛的任务中提供了强大的性能,在现代NLP中无处不在。已经观察到,在涉及来自与它们被预训练的域不同的域的数据的任务上微调这些模型可能导致次优性能。最近的工作已经探索了通过使用特定领域的语料库和任务数据结合额外的预训练来使预训练的语言模型适应新领域的方法。我们提出了一种替代方法,通过调整其标记器将预训练的语言模型转移到新的域。我们表明,特定领域的子词序列可以有效地确定直接从分歧的基础和特定领域的语料库的条件令牌分布。在来自四个不同领域的数据集中,我们发现预训练的RoBERTa模型上的自适应标记化提供了超过97%的特定领域预训练的性能优势。我们的方法比其他使用标记器增强的方法产生更小的模型和更少的训练和推理时间。虽然自适应标记化在我们的实验中导致模型参数增加了6%,但由于引入了10k个新的特定于领域的标记,我们的方法使用64个vCPU,比在8个TPU上对特定于领域的语料库进一步预训练语言模型快72倍。

英文摘要:

Contextual embedding-based language models trained on large data sets, such as BERT and RoBERTa, provide strong performance across a wide range of tasks and are ubiquitous in modern NLP. It has been observed that fine-tuning these models on tasks involving data from domains different from that on which they were pretrained can lead to suboptimal performance. Recent work has explored approaches to adapt pretrained language models to new domains by incorporating additional pretraining using domain-specific corpora and task data. We propose an alternative approach for transferring pretrained language models to new domains by adapting their tokenizers. We show that domain-specific subword sequences can be efficiently determined directly from divergences in the conditional token distributions of the base and domain-specific corpora. In datasets from four disparate domains, we find adaptive tokenization on a pretrained RoBERTa model provides >97% of the performance benefits of domain specific pretraining. Our approach produces smaller models and less training and inference time than other approaches using tokenizer augmentation. While adaptive tokenization incurs a 6% increase in model parameters in our experimentation, due to the introduction of 10k new domain-specific tokens, our approach, using 64 vCPUs, is 72x faster than further pretraining the language model on domain-specific corpora on 8 TPUs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑