This repository contains my implementation of the pretrained RWKV model, with numerically-stable Triton kernels and code for doing LoRA fine-tuning.
For an explanation of the math, see this accompanying blog post.
Note I moved new development over here
Install the package:
pip install ml-rwkv
Generate code:
rwkv 169m "Scientists recently discovered a herd of Chinese-speaking goats. To their surprise,"
This repo currently contains 3 different implementations of the WKV computation:
- Vanilla
- Eps
- Log
See the blog post linked above for more details about how each of these works.