arXiv:2601.05531q-bio.GNcs.LG2026-01

为基因组语言模型设计的高速GPU字节编码器,突破了文本处理瓶颈。

DNATokenizer: A GPU-First Byte-to-Identifier Tokenizer for High-Throughput DNA Language Models

  • 用基于查找表的字节流替代传统字符串处理,实现GPU优先计算
  • 在单碱基、非重叠k-mer等模式下比Hugging Face快84-95倍
  • 适合需要大规模基因组数据训练与推理的研究者使用

分词是高通量基因组输入与GPU计算之间的关键瓶颈,传统方法在算法设计和系统吞吐量上均面临挑战。重叠k-mer分词在掩码语言建模中可能引入信息泄露,降低下游性能;单碱基分词虽避免泄露但显著增加序列长度;非重叠k-mer与字节对编码(BPE)虽能压缩且无泄露,却存在边界敏感或可解释性下降问题。实证表明分词策略与模型架构及任务强相关。系统层面,当输入达数十亿碱基时,通用字符串分词与主机端词典查找成为主要耗时环节,无论采用何种分词算法。本文提出DNATok,一种面向GPU的高性能分词系统,通过字节查找表(LUT)驱动标识符流与重叠的主机到设备(H2D)/计算流水线,结合固定内存与架构并行性,实现词汇无关的高效分词。该系统支持单碱基、非重叠k-mer、BPE等多种分词方式,可无缝集成至基因组基础模型之下。实验显示,其编码吞吐量较优化版Hugging Face基准提升84–95倍,主机到设备传输最高提升1.9倍。端到端流式处理可达每秒1.27–1.84亿个标记,有效消除生产级训练与推理中的分词瓶颈。

原文摘要 · Abstract (English)

Tokenization sits at the boundary between high-throughput genomic input and GPU compute, posing challenges in both algorithm design and system throughput. Overlapping k-mer tokenization can introduce information leakage under masked language modeling (MLM) and may degrade downstream accuracy. Single-nucleotide tokenization avoids leakage and preserves per-base fidelity, but it greatly increases sequence length for attention-based architectures. Non-overlapping k-mers and byte-pair encoding (BPE) provide compression and avoid leakage, at the cost of boundary sensitivity or reduced interpretability. Empirically, the choice of tokenization interacts strongly with model architecture and task requirements. At the system level, however, standard string tokenizers and host-bound vocabulary lookups dominate wall-clock time once inputs reach billions of bases, regardless of the tokenization algorithm. We present DNATok, a high-performance, GPU-first tokenization system that replaces general-purpose string processing with byte lookup table (LUT)-based identifier streaming and an overlapped host-to-device (H2D)/compute pipeline using pinned memory and architectural parallelism. DNATok is vocabulary-agnostic: it accelerates single-nucleotide, non-overlapping k-mer, and BPE tokenization, and integrates as a drop-in systems layer beneath genomic foundation models. DNATok achieves 84-95x higher encoding throughput than optimized Hugging Face baselines and up to 1.9x higher H2D throughput. End-to-end streaming reaches 1.27-1.84e8 tokens/s depending on configuration, effectively removing tokenization as a bottleneck for production-scale training and inference.

基因组模型GPU加速分词器高效计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。