RWKV-Runner is a free, open source api development & testing project written in TypeScript and released under MIT. It has 6,479 GitHub stars, 601 forks and 178 open issues, and was last pushed 14 days ago. On this registry it ranks #35 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available.

What is RWKV-Runner?

What it is

RWKV-Runner is a management and startup tool for RWKV, an open-source large language model that is available for commercial use. It ships as a lightweight executable of only a few megabytes and automates the work of getting a model running, so that the user does not have to assemble the runtime, dependencies, and serving stack by hand. The project is written in TypeScript and built with Wails, and it is distributed under the MIT license from the josStorer repository. It lives in the RWKV ecosystem and in the broader local-inference tooling space, with a companion site at rwkv.com.

The concrete problem it solves is the friction between a user who wants to run a language model and the infrastructure that running one normally demands. RWKV-Runner handles dependency installation and model management automatically, and it exposes an interface compatible with the OpenAI API, so that existing ChatGPT clients can talk to a locally hosted RWKV model instead of a remote service. The README states the aim plainly: eliminate the barriers of using large language models by automating everything. For developers already building against the OpenAI API shape, that compatibility means an RWKV backend can be dropped in without rewriting client code.

Key capabilities

  • Manages RWKV models and starts them with one click.
  • Separates front end from back end, so the front-end service, the back-end inference service, or the back-end inference service with a WebUI can each be deployed on their own.
  • Provides an OpenAI API-compatible interface, which makes every ChatGPT client an RWKV client; API details are visible at http://127.0.0.1:8000/docs after the model starts.
  • Installs dependencies automatically, requiring only a lightweight executable program.
  • Enables custom CUDA kernel acceleration by default, which the README describes as faster and lower in VRAM use.
  • Supports adjusting API parameters for different tasks, such as Temperature 1 and Top_P 0.3 for translation work.
  • Accepts MIDI hardware input, as listed in the project's navigation.

Who uses it and how

  • Desktop users on Windows, macOS, and Linux who download a release build and run RWKV locally without a manual Python setup.
  • Developers who deploy backend-python on a server and run the program as a client only, pointing
project readme (upstream, from github) — read inline

RWKV Runner

This project aims to eliminate the barriers of using large language models by automating everything for you. All you need is a lightweight executable program of just a few megabytes. Additionally, this project provides an interface compatible with the OpenAI API, which means that every ChatGPT client is an RWKV client.

license release py-version

English | 简体中文 | 日本語

Install

Windows MacOS Linux

FAQs | Preview | Download | Simple Deploy Example | Server Deploy Examples | MIDI Hardware Input

Tips

  • You can deploy backend-python on a server and use this program as a client only. Fill in your server address in the Settings API URL.

  • If you are deploying and providing public services, please limit the request size through API gateway to prevent excessive resource usage caused by submitting overly long prompts. Additionally, please restrict the upper limit of requests' max_tokens based on your actual situation: https://github.com/josStorer/RWKV-Runner/blob/master/backend-python/utils/rwkv.py#L567, the default is set as le=102400, which may result in significant resource consumption for individual responses in extreme cases.

  • Default configs has enabled custom CUDA kernel acceleration, which is much faster and consumes much less VRAM. If you encounter possible compatibility issues (output garbled), go to the Configs page and turn off Use Custom CUDA kernel to Accelerate, or try to upgrade your gpu driver.

  • If Windows Defender claims this is a virus, you can try downloading v1.3.7_win.zip and letting it update automatically to the latest version, or add it to the trusted list (Windows Security -> Virus & threat protection -> Manage settings -> Exclusions -> Add or remove exclusions -> Add an exclusion -> Folder -> RWKV-Runner).

  • For different tasks, adjusting API parameters can achieve better results. For example, for translation tasks, you can try setting Temperature to 1 and Top_P to 0.3.

Features

  • RWKV model management and one-click startup.
  • Front-end and back-end separation, if you don't want to use the client, also allows for separately deploying the front-end service, or the back-end inference service, or the back-end inference service with a WebUI. Simple Deploy Example | Server Deploy Examples
  • Compatible with the OpenAI API, making every ChatGPT client an RWKV client. After starting the model, open http://127.0.0.1:8000/docs to view more details.
  • Automatic dependency installation, requiring only a lightweight executable program.
  • Pre-set multi-level VRAM configs, works well on almost all computers. In Configs page, switch Strategy to WebGPU, it can also run on AMD, Intel, and other graphics cards.
  • User-friendly chat, completion, and composition interaction interface included. Also supports chat presets, attachment uploads, MIDI hardware input, and track editing. Preview | MIDI Hardware Input
  • Built-in WebUI option, one-click start of Web service, sharing your hardware resources.
  • Easy-to-understand and operate parameter configuration, along with various operation guidance prompts.
  • Built-in model conversion tool.
  • Built-in download management and remote model inspection.
  • Built-in one-click LoRA Finetune. (Windows Only)
  • Can also be used as an OpenAI ChatGPT, GPT-Playground, Ollama, llmman and more clients. (Fill in the API URL and API Key in Settings page)
  • Multilingual localization.
  • Theme switching.
  • Automatic updates.

Simple Deploy Example

git clone https://github.com/josStorer/RWKV-Runner

# Then
cd RWKV-Runner
python ./backend-python/main.py #The backend inference service has been started, request /switch-model API to load the model, refer to the API documentation: http://127.0.0.1:8000/docs

# Or
cd RWKV-Runner/frontend
npm ci
npm run build #Compile the frontend
cd ..
python ./backend-python/webui_server.py #Start the frontend service separately
# Or
python ./backend-python/main.py --webui #Start the frontend and backend service at the same time

# Help Info
python ./backend-python/main.py -h

API Concurrency Stress Testing

ab -p body.json -T application/json -c 20 -n 100 -l http://127.0.0.1:8000/chat/completions

body.json:

{
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}

Embeddings API Example

Note: v1.4.0 has improved the quality of embeddings API. The generated results are not compatible with previous versions. If you are using embeddings API to generate knowledge bases or similar, please regenerate.

If you are using langchain, just use OpenAIEmbeddings(openai_api_base="http://127.0.0.1:8000", openai_api_key="sk-")

import numpy as np
import requests


def cosine_similarity(a, b):
    return np.dot(a, b) / (np.linalg.norm(a) * np.linalg.norm(b))


values = [
    "I am a girl",
    "我是个女孩",
    "私は女の子です",
    "广东人爱吃福建人",
    "我是个人类",
    "I am a human",
    "that dog is so cute",
    "私はねこむすめです、にゃん♪",
    "宇宙级特大事件!号外号外!"
]

embeddings = []
for v in values:
    r = requests.post("http://127.0.0.1:8000/embeddings", json={"input": v})
    embedding = r.json()["data"][0]["embedding"]
    embeddings.append(embedding)

compared_embedding = embeddings[0]

embeddings_cos_sim = [cosine_similarity(compared_embedding, e) for e in embeddings]

for i in np.argsort(embeddings_cos_sim)[::-1]:
    print(f"{embeddings_cos_sim[i]:.10f} - {values[i]}")

MIDI Input

Tip: You can download https://github.com/josStorer/sgm_plus and unzip it to the program's assets/sound-font directory to use it as an offline sound source. Please note that if you are compiling the program from source code, do not place it in the source code directory.

If you don't have a MIDI keyboard, you can use virtual MIDI input software like Virtual Midi Controller 3 LE, along with loopMIDI, to use a regular computer keyboard as MIDI input.

USB MIDI Connection

  • USB MIDI devices are plug-and-play, and you can select your input device in the Composition page
  • image

Mac MIDI Bluetooth Connection

  • For Mac users who want to use Bluetooth input, please install Bluetooth MIDI Connect, then click the tray icon to connect after launching, afterwards, you can select your input device in the Composition page.
  • image

Windows MIDI Bluetooth Connection

  • Windows seems to have implemented Bluetooth MIDI support only for UWP (Universal Windows Platform) apps. Therefore, it requires multiple steps to establish a connection. We need to create a local virtual MIDI device and then launch a UWP application. Through this UWP application, we will redirect Bluetooth MIDI input to the virtual MIDI device, and the

readme truncated — read the full docs on github

Frequently asked questions

Is RWKV-Runner free to use?

RWKV-Runner is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does RWKV-Runner do?

A RWKV management and startup tool, full automation, only 8MB. And provides an interface compatible with the OpenAI API. RWKV is a large language model that is

What is RWKV-Runner written in?

RWKV-Runner is primarily written in TypeScript. Its source is publicly available at https://github.com/josStorer/RWKV-Runner, and it has 6,479 GitHub stars.