Web-RWKV

crates.io docs.rs

This is an implementation of the language model of RWKV in pure WebGPU.

Compile and Run

  1. Install Rust.
  2. Run cargo run --release --example gen to generate 100 tokens and test the time cost.

Convert Models

You may download the official RWKV World series models from HuggingFace, and convert them via the provided convert_safetensors.py.

An already-converted 0.4B model can be found under assets/models.

Credits