-
Notifications
You must be signed in to change notification settings - Fork 569
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
can't run:invalid model file #27
Comments
I solved it! |
@ukhack - how did you solve it? I have the same error. |
@CaptainChemist You have to apply migrate-ggml-2023-03-30-pr613.py from llama.cpp to the faulty model file. Takes just a few seconds. |
I'll talk to nomic-ai so that they deploy other models. |
# In the same repo as your gpt4all-ui
git clone https://github.com/ggerganov/llama.cpp.git
# Transform the model
python3 llama.cpp/migrate-ggml-2023-03-30-pr613.py models/gpt4all-lora-quantized-ggml.bin models/gpt4all-lora-quantized-ggml_converted.bin
# And now change the names to allow proper usage
mv models/gpt4all-lora-quantized-ggml.bin models/gpt4all-lora-quantized-ggml.bin.orig
mv models/gpt4all-lora-quantized-ggml_converted.bin models/gpt4all-lora-quantized-ggml.bin |
Thank you, this did it! A note for anyone else stumbling across this- I had to call python3.11 specifically when executing this migration script, using the standard 3.9 did not work for me. |
I'm adding all this to the install.bat |
As NJannasch mentioned, the model won't work unless the model gets changed by llama.cpp\migrate-ggml-2023-03-30-pr613.py. This batch works as follows 1) Activates the virtual environment and Runs the Python app. 2) If the model gives an error, it asks you [Y/N] if you want to fix the model, N exits the batch, Y fixes it. 3) It renames the model so it conserves the original, and then applies the fix as a new model. After that it tells that the model has been fixed. Press any key to restart. 4) Pressing a key makes the batch go to the start and the UI launches successfully.
As NJannasch mentioned, the model won't work unless the model gets changed by llama.cpp\migrate-ggml-2023-03-30-pr613.py. This batch works as follows Activates the virtual environment and Runs the Python app. If the model gives an error, it asks you [Y/N] if you want to fix the model, N exits the batch, Y fixes it. It renames the model so it conserves the original, and then applies the fix as a new model. After that it tells that the model has been fixed. Press any key to restart. Pressing a key makes the batch go to the start and the UI launches successfully. Added a remark
This should be fixed on the |
You are right. I'll do it as soon as i can. |
Why not just upload the correct format file instead of having to do all this. I just downloaded the file and got the same issue. Even the latest file is not converted. |
I'm waiting for the nomic-ai teams to release the next batch of models and they probably will be in the right format out of the box. |
I got it working by conversion with the standard model, but the same process fails trying to use gpt4all-lora-unfiltered-quantized.bin -- how can I get this one working with the UI?? (or is there a better uncensored one to use with it?) |
Ok, I'll try to convert the unfiltered version and post it to the hugging face. |
Got Error
llama_model_load: loading model from './models/gpt4all-lora-quantized-ggml.bin' - please wait ...
./models/gpt4all-lora-quantized-ggml.bin: invalid model file (bad magic [got 0x67676d66 want 0x67676a74])
you most likely need to regenerate your ggml files
the benefit is you'll get 10-100x faster load times
see ggml-org/llama.cpp#91
use convert-pth-to-ggml.py to regenerate from original pth
use migrate-ggml-2023-03-30-pr613.py if you deleted originals
llama_init_from_file: failed to load model
Enviroment
M1 Pro Mac
model file md5 is 387eeb7cba52aaa278ebc2fe386649b1 equal md5 file on website
But I can run original gpt4all clone from github.just clone,download model file in chat folder and run.
The text was updated successfully, but these errors were encountered: