A axum
web backend for web-rwkv
, built on websocket
.
Supports BNF-constrained grammar, CFG sampling, etc., all streamed over network.
Still under heavy development, PRs and suggestions are welcome.
- Run by
RUSTFLAGS="--cfg tokio_unstable" cargo run --release ./config.toml
. Wait forModel is loaded!
to popup. - Run the
/tests/curl_ws.py "{any prompt input}"
in thetests
folder. - Or, with now-implemented (but not published yet) Python API:
- Build and install the package by running
python setup.py build && python setup.py install
inwra-py
- Run the
tests/test_pipeline.py
and check the code.
- Build and install the package by running
Since it's built based on websocket
, and supports highly varied pipeline customizations including complex logits transformations and sampling methods, web-rwkv-axum
is built on a new protocol.
For specification, please refer to the docs
folder.