Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
/ rwkv-flask Public archive

simple stateless HTTP server for rwkv.cpp

License

Notifications You must be signed in to change notification settings

iacore/rwkv-flask

Repository files navigation

rwkv-flask

Stateless HTTP server for rwkv.cpp. Tokenizer not included. Request cache not included.

## build librwkv.so
git submodule init
git submodule update --depth 1 --recursive
pushd rwkv.cpp
git submodule init
git submodule update --depth 1 --recursive
rm -r build/ ; cmake -B build BUILD_SHARED_LIBS=ON && cmake --build build
cp build/librwkv.so ./
popd


## Python

# install deps
pdm install -d

# run server
pdm run python server.py ../models/RWKV-4-Raven-3B-v9-Eng99\%-Other1\%-20230411-ctx4096-q41.bin

# run client
pdm run python example_client.py

If you don't want to use pdm, install the dependencies in pyproject.toml with pip.

Note please use a msgpack impl. that has support for raw bytes.

For Python: https://pypi.org/project/u-msgpack-python/
For Javascript (Deno/Node): https://esm.sh/@msgpack/msgpack@2.8.0

About

simple stateless HTTP server for rwkv.cpp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages