arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.10322cs.CLcs.AIcs.LG
收藏

分层自回归Transformer:结合字节级与词级处理以实现稳健、适应性强的语言模型

Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language Models

Aleph Alpha Research(Aleph Alpha研究院)

Pit Neitemeier, Björn Deiseroth, Constantin Eichenberg, Lukas Balles

AI总结:

本研究提出分层自回归Transformer,结合字符级与词级处理,避免固定词汇表,在70亿参数规模下匹配子词模型性能,同时显著增强对输入扰动的稳健性,并在跨语言持续预训练中实现近两倍加速和更优目标语言性能。

摘要:

分词是自然语言处理中的基础步骤,将文本切分为计算模型可处理的单元。尽管学习得到的子词分词器已成为事实上的标准,但它们带来了诸如词汇表庞大、对新领域或新语言的适应性有限以及对拼写错误和变体敏感等挑战。为克服这些局限,我们研究了一种用于自回归语言建模的分层架构,该架构结合了字符级与词级处理。它采用一个轻量级的字符级编码器将字符序列转换为词嵌入,随后由词级主干模型处理,并通过一个紧凑的字符级解码器解码回字符。这种方法保留了词级分词带来的序列压缩优势,而无需依赖僵化、预定义的词汇表。我们证明了,在高达70亿参数的规模下,分层Transformer在下游任务性能上与基于子词分词器的模型相当,同时对输入扰动表现出显著更强的稳健性。此外,在跨领域语言的持续预训练中,我们的模型训练速度几乎快两倍,在目标语言上取得更优性能,并保留更多先前学到的知识。分层Transformer为构建跨语言和跨领域更稳健、更灵活、更具泛化能力的NLP系统铺平了道路。

英文摘要:

Tokenization is a fundamental step in natural language processing, breaking text into units that computational models can process. While learned subword tokenizers have become the de-facto standard, they present challenges such as large vocabularies, limited adaptability to new domains or languages, and sensitivity to spelling errors and variations. To overcome these limitations, we investigate a hierarchical architecture for autoregressive language modelling that combines character-level and word-level processing. It employs a lightweight character-level encoder to convert character sequences into word embeddings, which are then processed by a word-level backbone model and decoded back into characters via a compact character-level decoder. This method retains the sequence compression benefits of word-level tokenization without relying on a rigid, predefined vocabulary. We demonstrate, at scales up to 7 billion parameters, that hierarchical transformers match the downstream task performance of subword-tokenizer-based models while exhibiting significantly greater robustness to input perturbations. Additionally, during continued pretraining on an out-of-domain language, our model trains almost twice as fast, achieves superior performance on the target language, and retains more of its previously learned knowledge. Hierarchical transformers pave the way for NLP systems that are more robust, flexible, and generalizable across languages and domains.

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

↑