arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.05192cs.CL
收藏

更快的超词 tokenization

Faster Superword Tokenization

Kensho Technologies;MIT(麻省理工学院)

Craig W. Schmidt, Chris Tanner, Yuval Pinter

AI总结:

本文提出改进的 BoundlessBPE 和 SuperBPE 算法,通过聚合超词候选提升训练速度,实现超词生成并优化超参数选择,使训练时间显著缩短。

摘要:

本文提出改进的 BoundlessBPE 和 SuperBPE 算法,通过聚合超词候选提升训练速度,实现超词生成并优化超参数选择,使训练时间显著缩短。

英文摘要:

Byte Pair Encoding (BPE) is a widely used tokenization algorithm, whose tokens cannot extend across pre-tokenization boundaries, functionally limiting it to representing at most full words. The BoundlessBPE and SuperBPE algorithms extend and improve BPE by relaxing this limitation and allowing the formation of superwords, which are combinations of pretokens that form phrases. However, previous implementations were impractical to train: for example, BoundlessBPE took 4.7 CPU days to train on 1GB of data. We show that supermerge candidates, two or more consecutive pretokens eligible to form a supermerge, can be aggregated by frequency much like regular pretokens. This avoids keeping full documents in memory, as the original implementations of BoundlessBPE and SuperBPE required, leading to a significant training speedup. We present a two-phase formulation of BoundlessBPE that separates first-phase learning of regular merges from second-phase learning of supermerges, producing identical results to the original implementation. We also show a near-equivalence between two-phase BoundlessBPE and SuperBPE, with the difference being that a manually selected hyperparameter used in SuperBPE can be automatically determined in the second phase of BoundlessBPE. These changes enable a much faster implementation, allowing training on that same 1GB of data in 603 and 593 seconds for BoundlessBPE and SuperBPE, respectively, a more than 600x increase in speed. For each of BoundlessBPE, SuperBPE, and BPE, we open-source both a reference Python implementation and a fast Rust implementation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑