gpt4all
gpt4all copied to clipboard
llmodel.llmodel_mpt_create() causes ntdll.dll crash
System Info
- Windows11
- Using the python bindings
- Followed the instructions, built all dependencies and I am trying to run the example program to get a simple prompt.
- Gpt4All desktop application works
- Python 3.9.0
Information
- [X] The official example notebooks/scripts
- [ ] My own modified scripts
Related Components
- [ ] backend
- [X] bindings
- [ ] python-bindings
- [ ] chat-ui
- [ ] models
- [ ] circleci
- [ ] docker
- [ ] api
Reproduction
When using the example script:
gptj = GPT4All("ggml-mpt-7b-chat")
messages = [{"role": "user", "content": "Name 3 colors"}]
print(gptj.chat_completion(messages))
The script starts, loads for a while and then just ends. After debugging, I find the problem to be in the pyllmodel.py script in the MPTModel class (and prolly in all the other model classes as well). Specificially line:
self.model = llmodel.llmodel_mpt_create()
causes the crash. The win event logs state:
_Name der fehlerhaften Anwendung: python.exe, Version: 3.9.150.1013, Zeitstempel: 0x5f7b3dcb Name des fehlerhaften Moduls: ntdll.dll, Version: 10.0.22000.1880, Zeitstempel: 0x40303075 Ausnahmecode: 0xc0000005 Fehleroffset: 0x000000000003599d ID des fehlerhaften Prozesses: 0x5e34 Startzeit der fehlerhaften Anwendung: 0x01d98bce297c3696 Pfad der fehlerhaften Anwendung: C:\Users\Nutzer\AppData\Local\Programs\Python\Python39\python.exe Pfad des fehlerhaften Moduls: C:\WINDOWS\SYSTEM32\ntdll.dll Berichtskennung: bb0b5d97-2daf-47ec-a377-952222fdf774 Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist: _
Expected behavior
Should print out the prompt.
Was the build made with MinGW or msvc?
With MinGW. I explicitly stated:
cmake -G "MinGW Makefiles" ..
since otherwise I wouldn't have even gotten this far.
same here, in windows 10, my crash happens when loading the model gptj = GPT4All("ggml-mpt-7b-chat") I built with MSYS2, 64 bit, 13
I was able to debug the code with gdb and the error, depending on the model selected (mpt or gptj) is at this line:
LLModelWrapper *wrapper = new LLModelWrapper
Thread 1 hit Breakpoint 2, llmodel_gptj_create () at E:\Experiments\server_VR\vocalMessages\gpt4all\gpt4all\gpt4all-backend\llmodel_c.cpp:14 14 LLModelWrapper *wrapper = new LLModelWrapper; (gdb) s
Thread 1 received signal SIGSEGV, Segmentation fault. 0x00000000000d41fc in ?? ()
Stale, please open a new, updated issue if this is still relevant to you. You're encouraged to open new issues or even PRs if there's anything you need!