-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
The convert-hf-to-gguf-update.py seems doesn't work. #7088
Comments
the update script takes as parameter the hf token. (and before that, you must add your own model to the script, unless it is = one of the already listed ones. you do this like this: after the line |
python convert-hf-to-gguf-update.py <hf-read-token>
python convert-hf-to-gguf.py /path/to/models/meta-llama/Meta-Llama-3-8B-Instruct-HF --outtype f16 Llama-3-8B is already included in the hash sums, so you shouldn't need to do it. If you run into issues with the conversion process, then you'll need to generate the vocabs, follow the instructions in the output, and copy over the retrieved vocabs to the models path. Then you should be able to convert. |
but from the screenshot op wants to work on a "merged" model, which might result in different hash? |
@CrispStrobe @teleprint-me Thank you for the answers from the two experts. I tried the following command |
You're almost there 🥲 Some things to note:
python convert.py /path/to/models/meta-llama/Meta-Llama-3-8B-Instruct-HF --vocab-type bpe --outtype f16 Even if the conversion process succeeds, I suspect you'll not get the expected output from the model due to the fact that the models weights were merged. I don't have enough insight to answer why this is the case. Note that this won't work with the |
convert.py is not yet adapted to the bpe fix, so if that is needed, use convert-hf-to-gguf.py instead you should check all the paths and contents involved. (edit:) The message about the tokenizer.model missing might be misleading in that you should not place this file there, but rather make sure that the update script fixes things so that the bpe tokenizer is recognized. This involves: the updated function in the convert script AND the copying of the new tokenizer files that the update script generates to the model directory. (if you are in another situation, you could of course download such a tokenizer.model file as e.g. per & of course, the placeholders ("/your/model/path", "repo/model") must be changed & not |
@teleprint-me Appreciate the time you took to address this problem. I wanted to express my gratitude for your thorough explanation. It helped me understand the problem much better. |
@CrispStrobe Thank you for your valuable insights on this issue. Your expertise has been incredibly helpful. Your help has been invaluable. |
did it work for you now? |
The tokenizers.json has changed, starting line 2332. Look at Meta's official repo and check your file. That bpe error goes away. |
Also the tokenizer_config.json, chat template and eos token changes. NousResearch was a bad choice to download from it appears. |
@CrispStrobe Thank you for your concern, I am still trying, and I will let you know when I have results! |
maybe you find this quickly hacked kaggle notebook useful for an illustration |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Ubuntu 20.04, cudatoolkit12.2
GPU: Nvidia A100 24G
RAM 10G(available)
When I use the 'convert-hf-to-gguf-update.py' in llama.cpp to convert ‘hf’ to 'gguf', neither does it report any error nor does it generate the 'gguf' file.
![error1](https://private-user-images.githubusercontent.com/18226861/328022329-3a78e506-a522-44de-8428-d38d1771caed.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMzE2ODQsIm5iZiI6MTcyMzIzMTM4NCwicGF0aCI6Ii8xODIyNjg2MS8zMjgwMjIzMjktM2E3OGU1MDYtYTUyMi00NGRlLTg0MjgtZDM4ZDE3NzFjYWVkLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDE5MjMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU1YjEyM2ZmYTEzOWIwZTA0YTc2MzIzZTRjOWIxOTFjMDRjNTUyYjkwZmMxZGY4MWQ4Mjk4ZWMzNDlmN2YxNjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vAWhD-MQZ-P6m4BuN08_nK_ND0Ebv2aJDEQWGuEMvnI)
When I use the 'convert-hf-to-gguf.py' in llama.cpp to convert ‘hf’ to 'gguf', the error occurred:
![error2](https://private-user-images.githubusercontent.com/18226861/328022342-5e9f18ad-32fa-4008-863f-2ee704478d5a.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMzE2ODQsIm5iZiI6MTcyMzIzMTM4NCwicGF0aCI6Ii8xODIyNjg2MS8zMjgwMjIzNDItNWU5ZjE4YWQtMzJmYS00MDA4LTg2M2YtMmVlNzA0NDc4ZDVhLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDE5MjMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyNWE2YmQ2ZmJmM2FiZTI0Nzk3MTI5MGIzYmMwYmYzZTFhNWJmYWE1ZGExMzc1YzZiYjQ0ZTU2MzE0OTZlODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GzsPCU7veyGuYOUd7bcP4xKT4E2Y_9P0OReOsnEyLMQ)
Has anyone faced this problem? Does anyone know how to fix this problem?
The text was updated successfully, but these errors were encountered: