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

学习你的词元:用于语言建模的词池化词元化

Learn Your Tokens: Word-Pooled Tokenization for Language Modeling

USC(南加州大学);ISI(信息科学研究所)

Avijit Thawani, Saurabh Ghanekar, Xiaoyuan Zhu, Jay Pujara

AI总结:

本文提出“学习你的词元”方案,利用单词边界将字节/字符池化为词表示输入主语言模型,并并行解码单个字符/字节。该端到端词元化器在下一词预测指标上比子词和字节/字符模型高出超300%,在罕见词上提升30倍,在效率与鲁棒性间实现了强有力权衡。

摘要:

语言模型通常将文本词元化为子词,使用确定性的、手工设计的启发式方法将字符组合成更长的表层字符串(如'ing')或整个单词。近期文献反复表明这种词元化策略的局限性,特别是对于非英语文档和数字的表示。在另一个极端,字节/字符级语言模型受到的限制要少得多,但会面临序列描述长度增加以及随后自注意力计算的二次方扩展问题。近期尝试用固定大小的卷积来压缩和限制这些上下文长度的方法虽有帮助,但完全忽略了单词边界。本文考虑了一种替代的“学习你的词元”方案,该方案利用单词边界将字节/字符池化为词表示,将其输入主语言模型,然后再次并行解码每个单词的单个字符/字节。我们发现,在各个数据集的下一词预测这一内在语言建模指标上,我们这种兼具适度表达能力和适度速度的端到端词元化器,其性能比子词和字节/字符模型高出超过300%。它在罕见词上表现尤为出色,性能提升了30倍!我们广泛研究了所有三类词元化器的语言建模设置,并从理论上分析了我们的端到端模型如何在效率和鲁棒性上实现强有力的权衡。

英文摘要:

Language models typically tokenize text into subwords, using a deterministic, hand-engineered heuristic of combining characters into longer surface-level strings such as 'ing' or whole words. Recent literature has repeatedly shown the limitations of such a tokenization strategy, particularly for documents not written in English and for representing numbers. On the other extreme, byte/character-level language models are much less restricted but suffer from increased sequence description lengths and a subsequent quadratic expansion in self-attention computation. Recent attempts to compress and limit these context lengths with fixed size convolutions is helpful but completely ignores the word boundary. This paper considers an alternative 'learn your tokens' scheme which utilizes the word boundary to pool bytes/characters into word representations, which are fed to the primary language model, before again decoding individual characters/bytes per word in parallel. We find that our moderately expressive and moderately fast end-to-end tokenizer outperform by over 300% both subwords and byte/character models over the intrinsic language modeling metric of next-word prediction across datasets. It particularly outshines on rare words, outperforming by a factor of 30! We extensively study the language modeling setup for all three categories of tokenizers and theoretically analyze how our end-to-end models can also be a strong trade-off in efficiency and robustness.

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

↑