Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some examples on how to use this? #1

Open
9876691 opened this issue Jun 19, 2023 · 1 comment
Open

Some examples on how to use this? #1

9876691 opened this issue Jun 19, 2023 · 1 comment

Comments

@9876691
Copy link

9876691 commented Jun 19, 2023

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?

@KerfuffleV2
Copy link
Owner

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.

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

No branches or pull requests

2 participants