基于层级语言模型的动态多字节预测

·

观点分析 · 2026/08/19

字节级分层语言模型(LMs)最近成为使用子词分词的主流模型的有力替代方案。然而,逐字节生成仍然是推理速度的瓶颈。为了解决这个问题,我们引入了多字节预测(MBP),它并行生成多个字节,在几乎不影响性能且不增加参数的情况下加速推理。MBP建立在流行的多令牌预测(MTP)范式之上,并有两个关键创新。首先,我们引入了一个可变长度的预测窗口,与分层LM的潜在令牌或分段对齐。其次,我们实现了一种新颖的注意力掩蔽方案,使得并行字节预测在不违反因果性的情况下成为可能。我们展示了多字节预测在多个生成任务(指令跟随、问答、摘要和机器翻译)中实现了帕累托最优的权衡,在性能和推理吞吐量之间取得了最佳平衡。

该论文提出了一种新颖的多字节预测方法,有效解决了字节级分层语言模型推理速度慢的问题,在保持性能的同时显著提升吞吐量,对实际应用具有重要价值。

Byte-level hierarchical language models (LMs) have recently emerged as a robust alternative to their popular counterparts that use subword tokenization. However, generating one byte at a time remains a bottleneck for inference speed. To address this, we introduce multi-byte prediction (MBP), which generates multiple bytes in parallel, speeding up inference with minimal performance impact and no additional parameters. MBP builds on the popular multi-token prediction (MTP) paradigm with two crucial innovations. First, we introduce a variable-length prediction window that aligns with the latent tokens, or segments, of a hierarchical LM. Second, we implement a novel attention-masking scheme that enables parallel byte prediction without violating causality. We show that multi-byte prediction strikes a Pareto-optimal trade-off across multiple generative tasks, instruction following, question answering, summarization, and machine translation, achieving the best trade-off between performance and inference throughput.

阅读原文

参与讨论