Ross ROSS = Recommend OSS · open-source software intelligence for agents

Smerity/sha-rnn

Single Headed Attention RNN - "Stop thinking with your head" observed · 2026-08-28

github.com/Smerity/sha-rnn · Python observed · 2026-08-28

Health v2 · maintenance only

32/100

  • Activity 0
  • Release rhythm 35
  • Longevity 100

Flags: no_releases no_license

How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 2543
  • days_rel: n/a
  • days_push: 1740
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

1180 stars · 131 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A PyTorch implementation of the Single Headed Attention RNN (SHA-LSTM) from Stephen Merity's paper, combining an LSTM with a single attention head for byte-level language modeling. It achieves strong enwik8 results while training in under 24 hours on a single 12GB GPU.

Use cases

  • train a byte-level language model on a single GPU
  • reproduce SHA-LSTM results on enwik8
  • model long-range dependencies without transformer memory overhead
  • avoid fragile transformer warmup and training instability
  • build a small language model exportable to ONNX with standard components

When to choose

  • you need an efficient, low-resource language model trainable on one GPU
  • you want LSTM-based architecture with simple attention for long contexts
  • you need a model composed of standard, productionizable components

When to avoid

  • you need state-of-the-art transformer performance
  • you want a polished library with CLI options and stable API
  • you need an actively maintained project - the code is research-grade and the author notes it is not kind

Facets

library · maturity maintenance

machine-learning deep-learning deep-learning machine-learning python rnn lstm attention language-modeling pytorch research-code sha-lstm natural-language-processing gpu

1 source

Member repositories

RepositoryRoleHealth v2
Smerity/sha-rnnmain32

For agents

markdown · JSON · MCP: product_card(name="Smerity/sha-rnn")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem