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

Converting to huggingface #113

Closed
lambdaofgod opened this issue May 14, 2023 · 4 comments
Closed

Converting to huggingface #113

lambdaofgod opened this issue May 14, 2023 · 4 comments

Comments

@lambdaofgod
Copy link

sgugger made huggingface class for RWKV.

Do you know by any chance how he converted the model?

I've asked him how he did it, I think it'd be great to document here how RWKV can be used in transformers.
A script to convert to PyTorch like this format would make it straightforward to port your new models :)

@apolinario
Copy link

Here is a guide: https://huggingface.co/blog/rwkv#weights-conversion

@3outeille
Copy link

@Galaxy-Ding
Copy link

sgugger made huggingface class for RWKV.

Do you know by any chance how he converted the model?

I've asked him how he did it, I think it'd be great to document here how RWKV can be used in transformers. A script to convert to PyTorch like this format would make it straightforward to port your new models :)

Hi, I'm new to this huggingface transformation.
I now have:

  • rwkv.pth
  • convert_rwkv_checkpoint_to_hf.py

I want to convert it into a huggingface model like yours repo [https://huggingface.co/RWKV]

  • config.json
  • generation_config.json
  • pytorch_model-00001-of-00017.bin
  • pytorch_model-00002-of-00017.bin
  • pytorch_model-00003-of-00017.bin
  • pytorch_model-00004-of-00017.bin
  • pytorch_model-00005-of-00017.bin
  • pytorch_model-00006-of-00017.bin
  • pytorch_model-00007-of-00017.bin
  • pytorch_model-00008-of-00017.bin
  • pytorch_model-00009-of-00017.bin
  • pytorch_model-00010-of-00017.bin
  • pytorch_model-00011-of-00017.bin
  • pytorch_model-00012-of-00017.bin
  • pytorch_model-00013-of-00017.bin
  • pytorch_model-00014-of-00017.bin
  • pytorch_model-00015-of-00017.bin
  • pytorch_model-00016-of-00017.bin
  • pytorch_model-00017-of-00017.bin
  • pytorch_model.bin.index.json
  • special_tokens_map.json
  • tokenizer.json
  • tokenizer_config.json]

What should I do to become a warehouse like yours? Can you be more detailed?

@Galaxy-Ding
Copy link

@lambdaofgod https://huggingface.co/RWKV

Hi, I'm new to this huggingface transformation.
I now have:

  • rwkv.pth
  • convert_rwkv_checkpoint_to_hf.py

I want to convert it into a huggingface model like yours repo [https://huggingface.co/RWKV]

  • config.json
  • generation_config.json
  • pytorch_model-00001-of-00017.bin
  • pytorch_model-00002-of-00017.bin
  • pytorch_model-00003-of-00017.bin
  • pytorch_model-00004-of-00017.bin
  • pytorch_model-00005-of-00017.bin
  • pytorch_model-00006-of-00017.bin
  • pytorch_model-00007-of-00017.bin
  • pytorch_model-00008-of-00017.bin
  • pytorch_model-00009-of-00017.bin
  • pytorch_model-00010-of-00017.bin
  • pytorch_model-00011-of-00017.bin
  • pytorch_model-00012-of-00017.bin
  • pytorch_model-00013-of-00017.bin
  • pytorch_model-00014-of-00017.bin
  • pytorch_model-00015-of-00017.bin
  • pytorch_model-00016-of-00017.bin
  • pytorch_model-00017-of-00017.bin
  • pytorch_model.bin.index.json
  • special_tokens_map.json
  • tokenizer.json
  • tokenizer_config.json]

What should I do to become a warehouse like yours? Can you be more detailed?

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

4 participants