大型语言模型中的故障令牌:分类体系与有效检测
Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detection
AI总结:
本研究首次系统定义并分类了大型语言模型中的故障令牌现象,提出基于嵌入空间聚类的GlitchHunter检测方法,在多个模型上显著优于基线,为缓解分词错误提供了新途径。
摘要:
随着大型语言模型(LLMs)在各领域的应用日益广泛,全面研究其意外行为及由此产生的后果变得至关重要。在本研究中,我们引入并系统探索了“故障令牌”(glitch tokens)现象,即由既定分词器产生的异常令牌,这些令牌可能损害模型响应的质量。具体而言,我们在使用三种不同分词器的七个主流大型语言模型上进行了实验,共涉及182,517个令牌。我们对识别出的故障令牌进行了分类,并展示了大型语言模型在与故障令牌交互时所表现出的症状。基于我们观察到的故障令牌倾向于在嵌入空间中聚集的现象,我们提出了GlitchHunter,一种新颖的基于迭代聚类的技术,用于高效检测故障令牌。评估结果表明,我们的方法在八个开源大型语言模型上显著优于三种基线方法。据我们所知,我们首次对故障令牌进行了全面研究。我们的新检测方法进一步为缓解大型语言模型中与分词相关的错误提供了宝贵的见解。
英文摘要:
With the expanding application of Large Language Models (LLMs) in various domains, it becomes imperative to comprehensively investigate their unforeseen behaviors and consequent outcomes. In this study, we introduce and systematically explore the phenomenon of "glitch tokens", which are anomalous tokens produced by established tokenizers and could potentially compromise the models' quality of response. Specifically, we experiment on seven top popular LLMs utilizing three distinct tokenizers and involving a totally of 182,517 tokens. We present categorizations of the identified glitch tokens and symptoms exhibited by LLMs when interacting with glitch tokens. Based on our observation that glitch tokens tend to cluster in the embedding space, we propose GlitchHunter, a novel iterative clustering-based technique, for efficient glitch token detection. The evaluation shows that our approach notably outperforms three baseline methods on eight open-source LLMs. To the best of our knowledge, we present the first comprehensive study on glitch tokens. Our new detection further provides valuable insights into mitigating tokenization-related errors in LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。