LoPT: Lossless Parallel Tokenization Acceleration for Long Context Inference of Large Language Model

Wei Shao, Lingchao Zheng, Pengyu Wang, Peizhen Zheng, Jun Li +1 more
11/7/2025
cs.CL

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

Abstract

Long context inference scenarios have become increasingly important for large language models, yet they introduce significant computational latency. While prior research has optimized long-sequence inference through operators, model architectures, and system frameworks, tokenization remains an overlooked bottleneck. Existing parallel tokenization methods accelerate processing through text segmentation and multi-process tokenization, but they suffer from inconsistent results due to boundary artifacts that occur after merging. To address this, we propose LoPT, a novel Lossless Parallel Tokenization framework that ensures output identical to standard sequential tokenization. Our approach employs character-position-based matching and dynamic chunk length adjustment to align and merge tokenized segments accurately. Extensive experiments across diverse long-text datasets demonstrate that LoPT achieves significant speedup while guaranteeing lossless tokenization. We also provide theoretical proof of consistency and comprehensive analytical studies to validate the robustness of our method.

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{shao2025lopt,
  title  = {LoPT: Lossless Parallel Tokenization Acceleration for Long Context Inference of Large Language Model},
  author = {Wei Shao and Lingchao Zheng and Pengyu Wang and Peizhen Zheng and Jun Li and Yuwei Fan},
  year   = {2025},
  eprint = {2511.04952},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.04952v1}
}

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/2511.04952.svg)](https://codeofpaper.com/paper/2511.04952)

Discussion