Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds initial support to LocalAI for https://github.com/BlinkDL/RWKV-LM with https://github.com/saharNooby/rwkv.cpp and https://github.com/donomii/go-rwkv.cpp. (acknowledgement goes to @BlinkDL, @saharNooby and @donomii for their respective projects ❤️ , and of course @ggerganov for ggml ) . RWKV's models are extremely fast on CPU!
The Makefile points to my fork just waiting for donomii/go-rwkv.cpp#1 to be merged.
It supports fully the endpoint already exposed, and also token stream. It also updates the README with relevant projects involved.
In a glance you can drop the ggml-quantized model in the
models
folder with a tokenizer file next to it:and start to use it with the API. It is strongly adviced to configure it with a yaml file, as models needs specific prompts.
Update: as noted by discord by @saharNooby, we could cache prompts to for faster inference (https://gist.github.com/saharNooby/5a3dd5a6b4caf9b9b110b66a8f2a63a7): https://discordapp.com/channels/992359628979568762/1097928558309036042/1103249830207303741 . That's a good follow up to improve performance even more!