#2020th of 23 in Open models

rwkv-lm

Reference code for training and running RWKV, an attention-free RNN language model

Stars
14.7k
License
Apache-2.0
Last commit
Sep 2026
Last release
Dec 2023
Language
Python

Missed the latest GitHub check; these facts may be older.

Overview

Reference implementation of RWKV-7 (and earlier v5/v6), an RNN-style language model that trains in parallel like a GPT and decodes with constant-size state and no KV cache. The repo has PyTorch and CUDA training scripts for MiniPile and Pile, demo inference in GPT and RNN modes, and fine-tuning notes such as state-tuning. Weights, GUIs and servers live in linked separate projects.

Who it is for: Researchers and engineers training or studying attention-free RNN LLMs

Strengths

  • Constant-memory decoding with no KV cache; state is about 1.6M params at 24 layers, 1024 dim
  • Reference training code with CUDA kernels; default config needs one GPU with about 7 GB VRAM
  • Same model runs in parallel GPT mode or sequential RNN mode
  • Links to weights, GGUF builds, mobile runtime, Runner GUI and PEFT/RLHF forks

Weaknesses

  • No packaged RWKV-7 layer; init, weight decay and per-parameter LR must be copied from train_temp
  • README says the FLA RWKV-7 implementation is not aligned with the reference and performs worse
  • Research-style repo: no Docker, no API server, last tagged release is from 2023-12
  • README is a long list of links; RWKV-5/6 and RWKV-7 instructions are mixed together

What it needs

  • GPU required
  • Needs PyTorch 2.5+, CUDA 12.4+, DeepSpeed, pytorch-lightning 1.9.5, wandb, ninja
  • Models: RWKV-7, RWKV-6, RWKV-5, PyTorch .pth, GGUF (linked)

Also in Open models

See all 23
Also in Open models
RankProjectScore
1llmfitRust tool that checks which LLMs fit your RAM, CPU and GPU37.9k starsMIT86 out of 100
2layaSingle-pass multilingual classifier for typed choice, score and yes/no decisions Live demo ↗ (opens in a new tab)32.9k starsApache-2.083 out of 100
3timesfmPretrained time-series foundation model for zero-shot forecasting from Google Research34.5k starsApache-2.074 out of 100
#4unlimited-ocrOCR model that parses long documents and multi-page PDFs in one pass Live demo ↗ (opens in a new tab)27.3k starsMIT69 out of 100
#5speechPyTorch toolkit for training and deploying ASR, TTS and speech LLM models Live demo ↗ (opens in a new tab)18.6k starsApache-2.067 out of 100