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

How to generate config.json for HFForCausalLM? #6

Open
CHNtentes opened this issue Oct 14, 2024 · 4 comments
Open

How to generate config.json for HFForCausalLM? #6

CHNtentes opened this issue Oct 14, 2024 · 4 comments

Comments

@CHNtentes
Copy link

I checked https://huggingface.co/fwtan/llama-1.1b-mobilequant-w4a8-s1024-e60-sym-hf, and found the config.json in this repo contains a lot of attributes which are used in HFForCausalLM.
I tried running convert_ckpt.py but it did not generate a new config.json. What should I do?

@fwtan
Copy link
Collaborator

fwtan commented Oct 14, 2024

I checked https://huggingface.co/fwtan/llama-1.1b-mobilequant-w4a8-s1024-e60-sym-hf, and found the config.json in this repo contains a lot of attributes which are used in HFForCausalLM. I tried running convert_ckpt.py but it did not generate a new config.json. What should I do?

Hi, you don‘t need to convert https://huggingface.co/fwtan/llama-1.1b-mobilequant-w4a8-s1024-e60-sym-hf using convert_ckpt.py. convert_ckpt.py is only required when the model is not in HFForCausalLM.

@CHNtentes
Copy link
Author

I know that. I'm actually converting a model based on llama architecture (a little different), and convert_ckpt.py only generates a new model.safetensors. Won't it convert my llamaconfig to hfconfig? Or do I need to manually write a config.json based on your examples?

@CHNtentes
Copy link
Author

I also tried downloading TinyLlama-1.1B-Chat-v1.0 from HuggingFace, and convert_ckpt.py still does not give me a config.json for HFForCausalLM...

@fwtan
Copy link
Collaborator

fwtan commented Oct 14, 2024

I also tried downloading TinyLlama-1.1B-Chat-v1.0 from HuggingFace, and convert_ckpt.py still does not give me a config.json for HFForCausalLM...

I manually prepared all the config.json files. You can re-use them for the supported models, e.g. TinyLlama, Gemma-2B, StableLM2-1.6B. Unfortunately, there was no script to convert the config.json of any new huggingface model.

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