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

Harmonic: 用于高效长上下文语言建模的分层状态空间模型

Harmonic: Hierarchical State Space Models for Efficient Long-Context Language Modeling

Independent Researcher(独立研究员)

Petr Nyoma

AI总结:

提出分层状态空间模型Harmonic,通过堆叠三个不同时间尺度的循环层,每层接收下层预测误差而非原始隐藏状态,在长序列上显著优于Transformer和Mamba,并消除了RoPE位置编码限制。

摘要:

我们提出Harmonic,一种用于语言建模的分层状态空间模型(SSM)。该架构堆叠了三个循环层级,时间尺度逐渐变慢;每个层级接收其下层的预测误差作为输入,而非原始隐藏状态。在enwiki8上,使用相同的token预算,Harmonic在1K token上比同等规模的Transformer(28M参数)提升1.4%,在8K token上提升6.7%,在32K token上提升11.4%(bpt,越低越好)。它在每个测试长度上也比Mamba提升0.7-1.8%。在64K token时,Mamba和Transformer均在80GB H100上内存不足;Harmonic成功训练,达到6.169 bpt。结果在WikiText-103上复现(在1K-32K范围内H-TF差距为+1.7%至+7.2%)。在1B参数规模下,将TinyLlama 1.1B中的所有注意力层替换为HarmonicBlock,消除了RoPE位置编码限制:得到的Hallamonic模型在两个独立干净基准(Lambada和fineweb-edu保留集)上,序列长度1K-8K内保持稳定损失,而TinyLlama在超过2K token的RoPE限制后性能急剧下降(在Lambada上seq=8K时差距为+9.4 bpt)。计算量为每次前向传播O(L),而注意力为O(L^2)。日志:此https URL。

英文摘要:

We present Harmonic, a hierarchical state space model (SSM) for language modeling. The architecture stacks three recurrent levels at progressively slower timescales; each level receives the prediction error of the level below as input, rather than its raw hidden state. On enwiki8 with equal token budgets, Harmonic outperforms a comparable Transformer (28M params) by +1.4% at 1K tokens, +6.7% at 8K tokens, and +11.4% at 32K tokens (bpt, lower is better). It also outperforms Mamba at every tested length by 0.7--1.8%. At 64K tokens, both Mamba and Transformer run out of memory on an 80GB H100; Harmonic trains successfully, reaching 6.169 bpt. Results replicate on WikiText-103 (H-TF gap +1.7% to +7.2% across 1K--32K). At 1B parameter scale, replacing all attention layers in TinyLlama 1.1B with HarmonicBlock eliminates the RoPE positional encoding limit: the resulting Hallamonic model maintains stable loss across sequence lengths 1K--8K on two independent clean benchmarks (Lambada and fineweb-edu held-out), while TinyLlama degrades catastrophically past its 2K-token RoPE limit (gap: +9.4 bpt at seq=8K on Lambada). Compute is O(L) per forward pass vs. O(L^2) for attention. Logs: https://github.com/Omibranch/harmonic-logs.

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

↑