rusty-ggml
rusty-ggml copied to clipboard
Some examples on how to use this?
It would be nice to see a kind of hello world for this.
For example, do we start with the ggml_graph and add operations?
A fair point. Keep in mind this is super early in development and it's very likely I will make changes that break all existing code. So the project currently probably isn't suitable for use, unless you're willing to deal with that kind of thing (and also, I have a bad track record for losing interest in my projects).
There is a working example, but unfortunately it's definitely not at the simple hello world level. I need to update the README to point at the current version: https://github.com/KerfuffleV2/smolrsrwkv/tree/main/smolrwkv/src/ggml
The most useful files to look at are context.rs
, loader.rs
and model.rs
If you compile smolrwkv with PyTorch model support (the default I believe) you can just directly load and dynamically quantize .pth
models. For example: https://huggingface.co/BlinkDL/rwkv-4-raven/blob/main/RWKV-4-Raven-1B5-v12-Eng98%25-Other2%25-20230520-ctx4096.pth or https://huggingface.co/BlinkDL/rwkv-4-pile-430m/blob/main/RWKV-4-Pile-430M-20220808-8066.pth
If the project actually reaches a relatively stable point, I absolutely do plan to add more/better examples. For now, your best bet is probably to use smolrwkv as a base.