All models

HGRN-150M (OpenNLPLab)

HGRN is a gated linear RNN whose forget gates have learnable lower bounds that rise with layer depth.

Language · 6,885 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 6,885 operations (5 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
146.1M
Operations
6,885
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2023
Cited by
45 (as of 22 October 2026)
Authors
Zhen Qin, Songlin Yang, Yiran Zhong
Name in source
OpenNLPLab:HGRN-150M
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m2045
Graph hash
107177ee250467c84ce5e9060bd8f824f0e9134c87c1a3e589c1bf14314493d6
Skeleton hash
a6da57c53be870ee6c2b55ea5859881a23a41fcd2aa2af6ab6595200d195657c
Architecture hash
d622df51d17b84535575c32a80e468634cc931186c57f25e99ec67a818829639
Diagram SHA-256
ccc163f4791ee1670fa288941ec232b77c4573ad2e1a9210b1523c25dabf70b4
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is the HGRN-150M checkpoint from the official OpenNLPLab release, tagged on its model card for English text generation.

HGRN, the Hierarchically Gated Recurrent Neural Network, is a gated linear RNN for sequence modeling. The paper's observation is that recent linear RNNs apply gating to the output of the linear recurrence layer while ignoring forget gates inside the recurrence itself.

HGRN's forget gates are bounded from below by a learnable value, and that lower bound increases monotonically from one layer to the next going up the stack. The effect is that upper layers can model long-term dependencies while lower layers model more local, short-term ones. The official repository spells out the computation: a softmax across layers followed by a cumulative sum gives each layer its lower bound, which is then used to compute the forget gate.

The paper reports experiments on language modeling, image classification and the long-range arena benchmarks. The Flash Linear Attention library also implements the architecture, and lists it alongside a 2024 model named HGRN2.

Key idea. HGRN is a gated linear RNN whose forget gates are lower bounded by a learnable value that increases monotonically in higher layers, so upper layers model long-term dependencies.

  • hgrn
  • hierarchically gated recurrent neural network
  • gated linear rnn
  • linear rnn
  • hgrn2
  • forget gate lower bound
  • recurrent language model
  • language modeling
  • flash linear attention

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{qin2023hierarchicallygatedrecurrentneural,
      title={Hierarchically Gated Recurrent Neural Network for Sequence Modeling}, 
      author={Zhen Qin and Songlin Yang and Yiran Zhong},
      year={2023},
      eprint={2311.04823},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2311.04823}, 
}