LBPE: Long-token-first Tokenization to Improve Large Language Models

Haoran Lian, Yizhe Xiong, Zijia Lin, Jianwei Niu, Shasha Mo +3 more
11/8/2024
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

The prevalent use of Byte Pair Encoding (BPE) in Large Language Models (LLMs) facilitates robust handling of subword units and avoids issues of out-of-vocabulary words. Despite its success, a critical challenge persists: long tokens, rich in semantic information, have fewer occurrences in tokenized datasets compared to short tokens, which can result in imbalanced learning issue across different tokens. To address that, we propose LBPE, which prioritizes long tokens during the encoding process. LBPE generates tokens according to their reverse ranks of token length rather than their ranks in the vocabulary, granting longer tokens higher priority during the encoding process. Consequently, LBPE smooths the frequency differences between short and long tokens, and thus mitigates the learning imbalance. Extensive experiments across diverse language modeling tasks demonstrate that LBPE consistently outperforms the original BPE, well demonstrating its effectiveness.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lian2024lbpe,
  title  = {LBPE: Long-token-first Tokenization to Improve Large Language Models},
  author = {Haoran Lian and Yizhe Xiong and Zijia Lin and Jianwei Niu and Shasha Mo and Hui Chen and Peng Liu and Guiguang Ding},
  year   = {2024},
  eprint = {2411.05504},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.05504v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.05504.svg)](https://codeofpaper.com/paper/2411.05504)

Discussion