LoPT:面向大语言模型长上下文推理的无损并行分词加速
LoPT: Lossless Parallel Tokenization Acceleration for Long Context Inference of Large Language Model
AI总结:
针对大语言模型长上下文推理中分词瓶颈,提出无损并行分词框架 LoPT,通过字符位置匹配和动态分块长度调整保证与串行分词结果一致,并在实验中实现显著加速。
摘要:
长上下文推理场景对大语言模型日益重要,但会引入显著的计算延迟。此前研究已通过算子、模型架构和系统框架优化长序列推理,而分词仍是一个被忽视的瓶颈。现有并行分词方法通过文本切分和多进程分词来加速处理,但合并后会产生边界伪影,导致结果不一致。为解决该问题,我们提出 LoPT,一种新颖的无损并行分词框架,确保输出与标准串行分词完全一致。我们的方法采用基于字符位置的匹配和动态分块长度调整,以准确对齐和合并分词片段。在多种长文本数据集上的大量实验表明,LoPT 在保证无损分词的同时实现了显著加速。我们还提供了一致性的理论证明和全面的分析研究,以验证该方法的鲁棒性。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。