# Jamie-Stirling/RetNet

An implementation of "Retentive Network: A Successor to Transformer for Large Language Models"

Repository: https://github.com/Jamie-Stirling/RetNet
Canonical: https://ross.abutalabs.com/products/retnet
Language: Python
License: MIT
License Family: permissive
Last push: 2023-10-22T18:16:42+00:00

## Health v2 (maintenance only)
Score: 28/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 81
- inputs: {"age_days": 1141, "days_push": 1046, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1209, forks 106 (observed 2026-08-28T04:03:59.832235+00:00)

## What it is
A minimal, pure PyTorch implementation of the Retentive Network (RetNet) architecture proposed as a successor to Transformers for large language models. It implements parallel, recurrent, and chunkwise retention paradigms plus a causal language model built on top.

## Use cases
- implement retnet architecture in pytorch
- experiment with retention network instead of transformer
- train a causal language model with retnet
- compare parallel recurrent and chunkwise retention paradigms
- study the retnet paper implementation
- research alternative attention-free sequence models

## When to choose
- you want a readable, correctness-focused reference implementation of RetNet
- you are researching retention-based sequence models in PyTorch
- you need all three retention paradigms (parallel, recurrent, chunkwise)

## When to avoid
- you need a production-optimized, high-performance training stack
- you require half-precision complex positional encodings
- you want a maintained framework with releases and long-term support

## Facets
- artifact type: library
- maturity: experimental
- function: machine-learning, deep-learning, llm-training
- domain: deep-learning, large-language-models
- platform: python
- tags: retnet, pytorch, transformer-alternative, research-implementation, retention-mechanism, natural-language-processing

## Member repositories
- Jamie-Stirling/RetNet (main) score 28

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.832235+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:18:33.323602+00:00, confidence not recorded.
  - readme: https://github.com/Jamie-Stirling/RetNet (fetched 2026-08-28T04:03:59.832235+00:00, sha 9507445d23d7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
