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

tokenization 空间中的信号在哪里?

Where is the signal in tokenization space?

University of California, Los Angeles(加利福尼亚大学洛杉矶分校)

Renato Lui Geh, Honghua Zhang, Kareem Ahmed, Benjie Wang, Guy Van den Broeck

AI总结:

本文研究非规范 tokenization,证明寻找最可能分词和计算边际概率的计算困难性,并发现聚合非规范分词概率可在多类 LLM 架构和评估基准上带来性能提升。

摘要:

大语言模型(LLM)通常随分词器一起发布,这些分词器将文本确定性地编码为所谓的规范 token 序列,LLM 再为这些序列赋予概率值。一个常见假设是,一段文本的概率就是其规范 token 序列的概率。然而,字符串的分词方式并不唯一:例如,Llama2 分词器将 Tokens 编码为 [Tok,ens],但 [Tok,en,s] 也表示同一文本。本文研究非规范分词。我们证明,对于自回归 LLM,给定一个字符串,寻找最可能的分词以及计算所有可能分词上的边际概率在计算上都是困难的。随后我们表明,在多数情况下,该边际概率与规范概率难以区分。令人惊讶的是,我们通过实验证明 tokenization 空间中隐藏着大量信号。值得注意的是,仅通过聚合非规范分词的概率,我们就在一系列 LLM 评估基准上为多种架构(包括 transformers 和状态空间模型)取得了改进。

英文摘要:

Large Language Models (LLMs) are typically shipped with tokenizers that deterministically encode text into so-called canonical token sequences, to which the LLMs assign probability values. One common assumption is that the probability of a piece of text is the probability of its canonical token sequence. However, the tokenization of a string is not unique: e.g., the Llama2 tokenizer encodes Tokens as [Tok,ens], but [Tok,en,s] also represents the same text. In this paper, we study non-canonical tokenizations. We prove that, given a string, it is computationally hard to find the most likely tokenization for an autoregressive LLM, as well as to compute the marginal probability over all possible tokenizations. We then show how the marginal is, in most cases, indistinguishable from the canonical probability. Surprisingly, we then empirically demonstrate the existence of a significant amount of signal hidden within tokenization space. Notably, by simply aggregating the probabilities of non-canonical tokenizations, we achieve improvements across a range of LLM evaluation benchmarks for a variety of architectures, including transformers and state space models.

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

↑