This is an implementation of the language model of RWKV in pure WebGPU.
cargo run --release --example gen
to generate 100 tokens and test the time cost.cargo run --release --example chat
to chat with the model.cargo run --release --example chat -- --model /path/to/model
.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
.