← Back to Leaderboard
CBlinkDL

BlinkDL/ChatRWKV

Local chat and Python inference with the RWKV recurrent language model

View on GitHub ↗
Engineering Health (Methodology)
B · 56/100
Maintenance Activity
● Updated 4mo ago
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption18/25
Release Cadence6/20
License Clarity20/20
Local AICLIGPUAPI
Total Stars
★ 9,476
24h Growth
+0
7d Growth
+2
Forks
684

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

BlinkDL/ChatRWKV Star History (2023-01-12 - 2026-12-01) ALL-TIME STAR HISTORY (2023-01 – 2026-12) +9.5k in 1419d · avg +7/day 10k 5k 0 2023-01-12: ★ 12023-04-08: ★ 5,0362023-07-08: ★ 7,8322023-10-07: ★ 8,3542024-01-06: ★ 8,6092024-04-06: ★ 8,9052024-07-06: ★ 9,0252024-10-05: ★ 9,1172025-01-04: ★ 9,1962025-04-05: ★ 9,2622025-07-05: ★ 9,3072025-10-04: ★ 9,3502026-01-03: ★ 9,3762026-04-04: ★ 9,4082026-07-04: ★ 9,4362026-10-03: ★ 9,4622026-12-01: ★ 9,476 ★ 9.5k 2023-01 2024-12 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ChatRWKV is a Python local chat application and inference reference built around the RWKV recurrent language model. Its root chat.py uses src/model_run.py; v2/chat.py provides the strategy-oriented CLI path. Text is tokenized before inference, and generation advances token by token by updating recurrent state rather than appending a Transformer KV cache for every decoded token.

The runtime stack is Python and PyTorch. The supplied requirements.txt lists tokenizers>=0.13.2 and prompt_toolkit but does not pin a PyTorch build. API_DEMO.py, API_DEMO_CHAT.py, and API_DEMO_WORLD.py are Python integration examples, not a documented HTTP protocol or plugin system. Training and fine-tuning are handled in the separate RWKV-LM project.

Key Capabilities & Differentiators

The v2 runtime provides stream and split strategies and INT8 inference. v2/convert_model.py prepares a checkpoint for a selected strategy ahead of time to reduce loading work and CPU memory pressure. RWKV_CUDA_ON enables a locally built CUDA kernel, and RWKV_v6_demo_cuda_bf16.py gives a separate example of a v6 CUDA BF16 path. These are options to validate against the chosen checkpoint and machine, not guarantees that every configuration will fit.

API_DEMO_WORLD.py and v2/benchmark_more.py cover World and Raven Q&A respectively. Standalone v5 and v6 demos make the inference code easier to inspect; RWKV-7 code, preview weights, and GGUF builds are linked externally. A link to a weight format is not evidence that the bundled CLI can load it directly or that checkpoints and tokenizers are interchangeable.

Trade-offs & Limitations

Compared with hosted ChatGPT, ChatRWKV lets you run inference on hardware you control, choose the checkpoint, and modify generation code without a hosted model endpoint. In return, you own dependency setup, hardware sizing, and any service layer. Recurrent decoding avoids a growing KV cache, but weights and temporary buffers still need memory; concurrent sessions add state. Long-context answer quality and end-to-end latency should be measured on the intended workload, not inferred from the state representation.

Use the Python CLI when code visibility matters; evaluate a separate runtime such as rwkv.cpp when packaging or quantized CPU deployment is the stronger constraint. Apache-2.0 applies to the repository code. Review checkpoint terms independently, especially if you intend to bundle or redistribute the weights.

Hardware & Deployment Guide

For a local setup, choose a checkpoint and matching tokenizer, install the Python dependencies and a suitable PyTorch build, and start with v2/chat.py. The separately published rwkv package is another integration path. Once the dependencies and weights are in place, the local CLI does not need a hosted model endpoint. No container recipe or ready-to-run HTTP service is supplied here; use the Python demos as an integration starting point or evaluate the separate Vulkan server.

For the optional CUDA kernel, install Ninja. The Linux setup exposes the CUDA bin and lib64 directories through PATH and LD_LIBRARY_PATH. The Windows recipe uses VS2022 Desktop C++ build tools, CUDA 11.7 with VC++ extensions, and the x64 native tools prompt; treat it as a specific build recipe, not a general compatibility matrix. There is no listed GitHub release, and RWKV-7 preview artifacts are linked separately rather than shipped as a ChatRWKV release.

Architecture: RWKV generation carries recurrent state forward rather than extending a Transformer KV cache at each decoding step.
Code paths: chat.py calls src/model_run.py; v2/chat.py and API_DEMO_CHAT.py provide separate CLI and Python starting points.
Memory controls: v2 exposes stream, split, and INT8 options; v2/convert_model.py prepares weights for a selected strategy.
GPU path: RWKV_CUDA_ON triggers a local CUDA kernel build with Ninja; RWKV_v6_demo_cuda_bf16.py is a separate CUDA BF16 example.
Model ecosystem: World and Raven have dedicated examples; RWKV-7 preview weights and code are linked externally.
Service boundary: The Python API demos are in-tree; the linked Vulkan inference server, Gradio demos, and mobile app are separate projects.
Best For

Running RWKV chat locally, inspecting recurrent inference, or prototyping Python integrations with control over weights and device placement.

Skip If

You need a turnkey hosted chat product, a ready-to-operate HTTP service, or a deployment path that avoids managing checkpoints and runtime compatibility.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodologyReport inaccuracy

Quick Start & Installation

Local AICLIGPUAPI
os.environ["RWKV_JIT_ON"] = '1'
os.environ["RWKV_CUDA_ON"] = '0' # if '1' then use CUDA kernel for seq mode (much faster)
from rwkv.model import RWKV                         # pip install rwkv
model = RWKV(model='/fsx/BlinkDL/HF-MODEL/rwkv-4-pile-1b5/RWKV-4-Pile-1B5-20220903-8040', strategy='cuda fp16')

out, state = model.forward([187, 510, 1563, 310, 247], None)   # use 20B_tokenizer.json
print(out.detach().cpu().numpy())                   # get logits
out, state = model.forward([187, 510], None)
out, state = model.forward([1563], state)           # RNN has state (use deepcopy if you want to clone it)
out, state = model.forward([310, 247], state)
print(out.detach().cpu().numpy())                   # same result as above

Comparison vs. Top Chat UI & AI Apps Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
ChatRWKV ★9.5k+2PythonApache-2.0Local chat and Python inference with the RWKV recurrent language model
chatbox42.6k+74TypeScriptGPL-3.0Electron chat client for switching between cloud APIs and local Ollama models
LibreChat47.7k+222TypeScriptMITA self-hosted AI chat workspace for multiple model providers and MCP tools
jan46.3k+226Rust—Tauri desktop chat with local LLM inference and an OpenAI-compatible API

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/BlinkDL/ChatRWKV.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

BlinkDL/ChatRWKV Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about ChatRWKV

How do I embed ChatRWKV in an application, and does it ship an HTTP API?

Start with API_DEMO_CHAT.py for a Python chat integration. For a lower-level reference, chat.py uses src/model_run.py. These are code entry points, not documented HTTP endpoints. If you need a network service, wrap the Python integration or evaluate the separately linked ai00_rwkv_server.

How much RAM or VRAM do I need, and is CUDA mandatory?

No single VRAM figure applies. Size against the selected checkpoint, precision, device placement, and concurrent sessions. INT8 and the v2 split or stream strategies give you options when weights do not fit comfortably. Measure peak system RAM and VRAM during both loading and generation; if you enable RWKV_CUDA_ON, budget for a local CUDA build as well.

Can I self-host ChatRWKV for commercial use?

The repository code is Apache-2.0 and can be used commercially subject to that license. Check the terms of each downloaded checkpoint separately; the code license does not establish weight redistribution or usage rights. Self-hosting also leaves your team responsible for access restrictions, logging, and retention.

When is ChatRWKV a better fit than hosted ChatGPT?

Choose ChatRWKV when local execution, checkpoint control, or access to the inference code matters. Choose hosted ChatGPT when you want a managed chat product and do not want to operate checkpoints or GPU runtimes. Test task quality and latency on your own workload rather than assuming equivalence.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining BlinkDL/ChatRWKV? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature BlinkDL/ChatRWKV on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare