Skip to content

Conversation

@MollySophia
Copy link
Collaborator

@MollySophia MollySophia commented Jan 9, 2025

Changes:

  • Update chat roles of QA mode in python chat example
  • Sync latest ggml upstream
  • Use the WKV kernel in upstream ggml for v5/v6
  • Refactor & simplify v4/v5/v6 functions, offload more possible tensors to gpu (better performance when using gpu)
  • Get rid of _inplace operations (ggml scheduler will handle these and use inplace variant automatically when possible)
  • RWKV v7 support with initial cpu wkv op (with multithreading)
  • q4_k/q5_k quants support

Currently tests done:

  • Inference of v7 0.1B & 0.4B with or w/o offloading with CUDA, with or w/o quantization. The outputs aligns with ChatRWKV
  • A quick lm_eval of lambada_openai on v7 0.1B gives 12.407, which matches the data from Bo

TODO:

  • Add tiny-rwkv-v7 for unit test Done
  • Update README.md (Added some info about rwkv v7. quality/perf test data haven't been added yet)
  • Fix ROCm build Still cannot get working ROCm build. Maybe fix it next time?
  • Do more tests

Tested:

  • ArchLinux with CPU backend ✅
  • ArchLinux with CUDA 12.6 ✅
  • Windows with CPU backend ✅
  • Windows with CUDA 12.2 ✅
  • macOS, m2 with CPU backend ✅
  • macOS, m2 with metal backend ✅

Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
@MollySophia MollySophia force-pushed the v7-new branch 4 times, most recently from d913acc to 7c795b7 Compare January 10, 2025 02:29
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
@MollySophia MollySophia force-pushed the v7-new branch 2 times, most recently from edf83ef to 8d54187 Compare January 12, 2025 10:25
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
@harrisonvanderbyl harrisonvanderbyl merged commit be863c6 into RWKV:master Jan 23, 2025
1 check passed
@harrisonvanderbyl
Copy link
Collaborator

Merged, can have rocm and and tests in separate PR

@MollySophia
Copy link
Collaborator Author

Merged, can have rocm and and tests in separate PR

Unit tests for v7 are already there too. There's only ROCm left

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants