zikele

zikele

人生如此自可乐

SemToken:用于高效长上下文语言建模的语义感知分词方法

2508.15190v1

中文标题#

SemToken:用于高效长上下文语言建模的语义感知分词方法

英文标题#

SemToken: Semantic-Aware Tokenization for Efficient Long-Context Language Modeling

中文摘要#

分词在语言建模中起着关键作用,但现有的方法,如字节对编码(BPE)或 WordPiece,仅基于频率统计操作,忽略了文本的潜在语义结构。 这导致了语义冗余跨度的过度分词和上下文连贯性的利用不足,尤其是在长上下文场景中。 在本工作中,我们提出了 \textbf {语义令牌},这是一种语义感知的分词框架,能够联合减少标记冗余并提高计算效率。 SemToken 首先通过轻量级编码器提取上下文语义嵌入,并进行局部语义聚类以合并语义等价的标记。 然后,它根据语义密度分配异构的标记粒度,允许在内容丰富的区域进行更细粒度的分词,在重复或低熵跨度中进行更粗粒度的压缩。 SemToken 可以无缝集成到现代语言模型和注意力加速方法中。 在 WikiText-103 和 LongBench 等长上下文语言建模基准上的实验表明,SemToken 在标记数量上最多减少了 2.4×,并在速度上提升了 1.9×,同时对困惑度和下游准确性几乎没有或没有下降。 我们的研究结果表明,语义结构为优化大型语言模型中的分词和计算提供了一个有前景的新维度。

英文摘要#

Tokenization plays a critical role in language modeling, yet existing approaches such as Byte-Pair Encoding (BPE) or WordPiece operate purely on frequency statistics, ignoring the underlying semantic structure of text. This leads to over-tokenization of semantically redundant spans and underutilization of contextual coherence, particularly in long-context scenarios. In this work, we propose \textbf{SemToken}, a semantic-aware tokenization framework that jointly reduces token redundancy and improves computation efficiency. SemToken first extracts contextual semantic embeddings via lightweight encoders and performs local semantic clustering to merge semantically equivalent tokens. Then, it allocates heterogeneous token granularity based on semantic density, allowing finer-grained tokenization in content-rich regions and coarser compression in repetitive or low-entropy spans. SemToken can be seamlessly integrated with modern language models and attention acceleration methods. Experiments on long-context language modeling benchmarks such as WikiText-103 and LongBench show that SemToken achieves up to 2.4× reduction in token count and 1.9× speedup, with negligible or no degradation in perplexity and downstream accuracy. Our findings suggest that semantic structure offers a promising new axis for optimizing tokenization and computation in large language models.

文章页面#

SemToken:用于高效长上下文语言建模的语义感知分词方法

PDF 获取#

查看中文 PDF - 2508.15190v1

智能达人抖店二维码

抖音扫码查看更多精彩内容

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。