-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
“'token_embd.weight' has wrong shape” when loading deepseek-coder-1.3b-base.Q8_0.gguf #5910
Comments
I am still struggling with the same error, Does any one have same or similar issue? |
i have a similar issue with a fine-tuned of Llama2-7b
been on this for weeks too:( |
any updates? Having similar issue with merged model (via mergekit-moe, codellama and sambalingo). [1710765483] llama_model_load: error loading model: create_tensor: tensor 'token_embd.weight' has wrong shape; expected 4096, 32004, got 4096, 32000, 1, 1 Also changed vocab_size manually before converting (from 32000 to 32004) |
deleted added_token.json file and manually changed vocab_size in config.json, so it can work without --pad-vocab (before converting), worked for me, seems like that additional parameters were counted cuz of that |
@dozzky Codellama works without any changes on my side but the problem with the model |
@ashiqguntupalli Can you make a screenshot of a model folder before converting it to gguf? Also your token_embd.weight expects 32256 (not 31999 that you previously changed to 32022), it's so strange seeing extra 200+. In my case added_token.json file had 4 lines (exactly the number that i needed to remove before converting). |
@dozzky i have below configuration json files I have changed the vocab_size from 32256 to 32022 in config.json but still error persists. |
I have the same issue |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
OS: ubuntu 22.04.1
GPU: Nvidia 3060
llama.cpp version: 2350
I have dowloaded the deepseek-coder-1.3b-base from huggingface and converted from huggingface to gguf format by using
convert.py
script. Initially while converting i had a problem related to vocab sizeVocab size mismatch (model has 31999, but deepseekai_deepseekcoder_1p3_hf has 32022)
. After debugging i came to know there are some additional vocab and they are not considered in vocab size later by changing the vocab size from 31999 to 32022 in the config.jsonconverty.py
worked as expected.After the conversion, Loaded the model by using the command
./main -m deepseekcoder_1p3_q8_0.gguf -n 128
and that generated errorllama_model_load: error loading model: create_tensor: tensor 'token_embd.weight' has wrong shape; expected 2048, 32022, got 2048, 32256, 1, 1
. For more information please have a look in the below logI guess in my case conversion might have broke the model. I have seen a similar issue in #2894 but with the script
convert-hf-to-gguf.py
. So is this issue already known or is it only happening to me?FYI, I have tested my llama.cpp build with the GGUF model from the bloke and that worked like a charm.
The text was updated successfully, but these errors were encountered: