TensorX
返回文献探索

Paper · arXiv 2404.07904

HGRN2: Gated Linear RNNs with State Expansion

Zhen Qin, Songlin Yang, Weixuan Sun, Xuyang Shen, Dong Li, Weigao Sun, Yiran Zhong

21 upvotesApril 11, 2024arXiv 预印本
AI 摘要

The introduction of an outer-product-based state expansion mechanism in hierarchical gated linear RNN (HGRN) enhances its performance and expressiveness without additional parameters, outperforming architectures like Mamba and LLaMa in various tasks.

hierarchically gated linear RNNlinear attentionouter-product-based state expansionlinear attention formhardware-efficient trainingLong Range Arenalanguage modelingimage classificationMambaLLaMa Architecture Transformer

Abstract

Hierarchically gated linear RNN (HGRN,Qin et al. 2023) has demonstrated competitive training speed and performance in language modeling, while offering efficient inference. However, the recurrent state size of HGRN remains relatively small, which limits its expressiveness.To address this issue, inspired by linear attention, we introduce a simple outer-product-based state expansion mechanism so that the recurrent state size can be significantly enlarged without introducing any additional parameters. The linear attention form also allows for hardware-efficient training.Our extensive experiments verify the advantage of HGRN2 over HGRN1 in language modeling, image classification, and Long Range Arena.Our largest 3B HGRN2 model slightly outperforms Mamba and LLaMa Architecture Transformer for language modeling in a controlled experiment setting; and performs competitively with many open-source 3B models in downstream evaluation while using much fewer total training tokens.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
HGRN2: Gated Linear RNNs with State Expansion | TensorX