BPE分词的形式化
Formalizing BPE Tokenization
AI总结:
本文形式化了实用BPE分词,定义了SentencePiece与HuggingFace分词器的语义及其关系,并提出增量式、常量内存的从左到右分词方法,使有限状态转换器可用于分词。
摘要:
本文对大型语言模型及其他自然语言处理系统中所使用的实用字节对编码(BPE)分词进行了形式化,特别是正式定义并研究了SentencePiece与HuggingFace分词器的语义,以及它们之间如何根据分词规则的构造方式而相互关联。除此之外,我们还考虑了如何以增量方式进行分词,以及如何从左到右进行分词,同时使用与字符串长度无关的常量内存,从而使得例如使用有限状态字符串到字符串转换器成为可能。
英文摘要:
In this paper, we formalize practical byte pair encoding tokenization as it is used in large language models and other NLP systems, in particular we formally define and investigate the semantics of the SentencePiece and HuggingFace tokenizers, in particular how they relate to each other, depending on how the tokenization rules are constructed. Beyond this we consider how tokenization can be performed in an incremental fashion, as well as doing it left-to-right using an amount of memory constant in the length of the string, enabling e.g. using a finite state string-to-string transducer.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。