• Stars
    star
    4,856
  • Rank 8,657 (Top 0.2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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 fully open source and available for commercial use.

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

English | 简体中文 | 日本語

Install

Windows MacOS Linux

FAQs | Preview | Download | Server-Deploy-Examples

Default configs has enabled custom CUDA kernel acceleration, which is much faster and consumes much less VRAM. If you encounter possible compatibility issues, go to the Configs page and turn off Use Custom CUDA kernel to Accelerate.

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
  • Fully 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
  • Configs with 2G to 32G VRAM are included, works well on almost all computers
  • User-friendly chat and completion interaction interface included
  • Easy-to-understand and operate parameter configuration
  • Built-in model conversion tool
  • Built-in download management and remote model inspection
  • Built-in one-click LoRA Finetune
  • Can also be used as an OpenAI ChatGPT and GPT-Playground client
  • Multilingual localization
  • Theme switching
  • Automatic updates

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]}")

Related Repositories:

Preview

Homepage

image

Chat

image

Completion

image

Configuration

image

Model Management

image

Download Management

image

LoRA Finetune

image

Settings

image

More Repositories

1

chatGPTBox

Integrating ChatGPT into your browser deeply, everything you need is here
JavaScript
9,765
star
2

chatGPT-search-engine-extension

A browser extension to display ChatGPT response alongside Search Engine results
JavaScript
632
star
3

selfhostedAI

A collection of one-click self-hosted AI
Python
366
star
4

mix-chatgpt-and-ai-painting

a bot application running on Tencent QQ that integrates GPT chatbot capabilities with AI painting. 一个运行于腾讯qq上的, 将gpt聊天能力与ai绘画集成的机器人应用.
Python
158
star
5

llama.cpp-unicode-windows

llama.cpp with unicode (windows) support
C
52
star
6

get-current-time

This action sets the current ISO8601 time to the time output and also provides readableTime, formattedTime, and many more digital outputs like year, day, second, etc. Useful for setting build times in subsequent steps, renaming your artifact, or keeping the same recorded time for the entire workflow.
JavaScript
37
star
7

UMGExporter

This is an Unreal Engine plugin that automatically generates C++ code bindings for UMG blueprint widgets and animations. 这是一个虚幻引擎插件, 用于为UMG蓝图的控件和动画自动生成c++代码绑定.
C++
21
star
8

nn_example

This repository is related to a video about principles of neural networks, which demonstrates how to write a simple neural network in 100 lines of code and implement handwritten digit recognition without using a framework. 这是一个与神经网络原理讲解视频, 相配套的项目, 演示在不使用框架的情况下, 用约100行代码编写简易的神经网络, 并借此实现手写数字识别.
Python
12
star
9

sgm_plus

7
star
10

after-effects-track-motion-script-for-labelImg

This script uses track motion of After Effects to create XML files quickly for labelImg
JavaScript
2
star
11

web-rwkv-converter

a fork of https://github.com/cryscan/web-rwkv/tree/main/crates/web-rwkv-converter
Rust
1
star
12

LibreHardwareMonitor.Console

C#
1
star