Skip to content

add rwkv world tokenizer#3254

Closed
LoganDark wants to merge 1 commit intooobabooga:mainfrom
LoganDark:rwkv-world
Closed

add rwkv world tokenizer#3254
LoganDark wants to merge 1 commit intooobabooga:mainfrom
LoganDark:rwkv-world

Conversation

@LoganDark
Copy link

I had written multiple screens of text here but gpg-agent was unresponsive so .git deleted all my hard work when I tried to re-commit.

Gist is:

  • Support world models with --rwkv-world flag.
  • Load tokenizer before model to avoid wasting work if tokenizer fails to load. Rwkv python package is slow.

Tokenizer implementation used is my own, BlinkDL/ChatRWKV#137. It outperforms everything else, but hasn't been accepted upstream, so I just pasted it. It'll be fine.

Notes:

  • Rwkv package not installed by windows auto installer, had to manually enter conda env and use pip.
  • Can't load pth files by web interface due to UI can no longer load RWKV .pth models #2314, falsely closed by retarded stale bot, which is useless and counterproductive. But I digress. When it's possible to load from the web interface again, there should be a way to specify whether to use the world tokenizer there, so you can switch between raven and world models freely.
  • Could autodetect the type of model perfectly by checking size of emb tensor, which represents vocab size, raven is 50277 and world is 65536, but can't do that without loading the whole thing into memory because pytorch is the world's worst library and can't read a single tensor from a pth file. Very bad idea as rwkv already loads the entire file due to pytorch's brain death, loading it a second time would be insane.

Sorry, I wrote 3-4x more than this last time, but I am not doing that again, because git overwrote it permanently, because it is a stupid piece of garbage. Hope this is an apt description.

Please enter the commit message for your changes. Lines starting

with '#' will be ignored, and an empty message aborts the commit.

On branch rwkv-world

Changes to be committed:

modified: README.md

modified: modules/RWKV.py

modified: modules/models.py

modified: modules/shared.py

… essays because of git's stupidity, this commit isn't signed either. But that's fine. Everything is fine. Just let me die already.
@LoganDark LoganDark changed the title Gpg no longer works for some stupid reason so not only did I lose two… add rwkv world tokenizer Jul 22, 2023
@oobabooga
Copy link
Owner

RWKV can now be run through the transformers library. The RWKV code here is kept for legacy purposes and is no longer maintained.

@oobabooga oobabooga closed this Aug 3, 2023
@LoganDark
Copy link
Author

The RWKV code here is kept for legacy purposes

ty. I use this code in projects that do not support transformers anyway, so this is reasonable.

@LoganDark LoganDark deleted the rwkv-world branch August 3, 2023 21:06
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