# RWKV/rwkv.cpp

INT4/INT5/INT8 and FP16 inference on CPU for RWKV language model

Repository: https://github.com/RWKV/rwkv.cpp
Canonical: https://ross.abutalabs.com/products/rwkvcpp
Language: C++
License: MIT
License Family: permissive
Topics: deep-learning, language-model, llm, machine-learning, quantization, rwkv, ggml
Last push: 2025-03-23T05:04:42+00:00

## Health v2 (maintenance only)
Score: 37/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 12, release rhythm 40, longevity 89
- inputs: {"age_days": 1252, "days_push": 528, "days_rel": 528, "gap_med": 27, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1579, forks 129 (observed 2026-08-28T04:05:06.723704+00:00)

## What it is
A C++ port of the RWKV language model to the ggml tensor library, providing FP32, FP16, and quantized INT4/INT5/INT8 inference focused on CPU with optional cuBLAS GPU support. It ships a C library (rwkv.h) and a Python wrapper, supporting RWKV v4 through v7 architectures and LoRA checkpoint merging.

## Use cases
- run RWKV language models locally on CPU
- run quantized INT4 or INT8 LLM inference on a laptop
- generate text with RWKV models from Python
- measure perplexity and latency of quantized model formats
- merge LoRA adapters into a quantized RWKV model
- run an LLM without a GPU
- embed RWKV inference into a C or C++ application

## When to choose
- you want CPU-friendly LLM inference with low memory footprint via quantization
- you specifically want to run RWKV v4-v7 models
- you need a C API or Python wrapper for embedding RWKV inference
- you want to benchmark quantization trade-offs (perplexity vs latency vs size)

## When to avoid
- you need to run Transformer-based models like LLaMA or GPT
- you need heavy GPU-accelerated training or fine-tuning
- you want a high-level chat application with a UI out of the box

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, machine-learning, deep-learning, sdk
- domain: large-language-models, deep-learning, machine-learning, developer-tools
- platform: cpp, python, windows, cli
- tags: rwkv, ggml, quantization, cpu-inference, int4, int8, fp16, lora, linux, macos, gpu

## Member repositories
- RWKV/rwkv.cpp (main) score 37

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:06.723704+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-30T03:56:39.470224+00:00, confidence not recorded.
  - readme: https://github.com/RWKV/rwkv.cpp (fetched 2026-08-28T04:05:06.723704+00:00, sha 627f5d389261)
- Data as of 2026-08-30T08:39:29.467469+00:00.
