arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.00593cs.CLcs.AIcs.LG
收藏

通过词元翻译适配语言模型

Adapting Language Models via Token Translation

Carnegie Mellon University(卡内基梅隆大学);Microsoft Research(微软研究院)

Zhili Feng, Tanya Marwah, Nicolo Fusi, David Alvarez-Melis, Lester Mackey

AI总结:

针对固定词元化器在目标域上压缩和语义对齐不佳的问题,提出S2T2方法,通过定制目标词元化器并学习词元翻译,提升域外序列的困惑度和压缩率,且可低成本迁移至大模型。

摘要:

现代大型语言模型使用固定的词元化器来有效压缩来自源域的文本。然而,将同一词元化器应用于新的目标域通常会导致压缩效果较差、推理成本更高以及语义对齐度降低。为了解决这一缺陷,我们引入了稀疏Sinkhorn词元翻译(S2T2)。S2T2为目标域训练一个定制词元化器,并学习在目标词元和源词元之间进行翻译,从而更有效地重用预训练的下一个源词元预测器。在我们对微调后的英语语言模型进行的实验中,S2T2同时改善了域外蛋白质序列的困惑度和压缩率,优于使用源词元化器或目标词元化器直接微调的方法。此外,我们发现为较小、较便宜的模型学到的词元翻译可以直接迁移到更大、更强大的模型,从而以较低成本获得S2T2的益处。

英文摘要:

Modern large language models use a fixed tokenizer to effectively compress text drawn from a source domain. However, applying the same tokenizer to a new target domain often leads to inferior compression, more costly inference, and reduced semantic alignment. To address this deficiency, we introduce Sparse Sinkhorn Token Translation (S2T2). S2T2 trains a tailored tokenizer for the target domain and learns to translate between target and source tokens, enabling more effective reuse of the pre-trained next-source-token predictor. In our experiments with finetuned English language models, S2T2 improves both the perplexity and the compression of out-of-domain protein sequences, outperforming direct finetuning with either the source or target tokenizer. In addition, we find that token translations learned for smaller, less expensive models can be directly transferred to larger, more powerful models to reap the benefits of S2T2 at lower cost.

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

↑