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

model is not None #71

Closed
quanpinjie opened this issue Sep 21, 2023 · 8 comments
Closed

model is not None #71

quanpinjie opened this issue Sep 21, 2023 · 8 comments

Comments

@quanpinjie
Copy link

Running on backend llama.cpp.
Traceback (most recent call last):
File "/root/llama2-webui/app.py", line 325, in
main()
File "/root/llama2-webui/app.py", line 56, in main
llama2_wrapper = LLAMA2_WRAPPER(
^^^^^^^^^^^^^^^
File "/root/llama2-webui/llama2_wrapper/model.py", line 99, in init
self.init_model()
File "/root/llama2-webui/llama2_wrapper/model.py", line 103, in init_model
self.model = LLAMA2_WRAPPER.create_llama2_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/llama2-webui/llama2_wrapper/model.py", line 125, in create_llama2_model
model = Llama(
^^^^^^
File "/root/llama2-webui/new1/lib/python3.11/site-packages/llama_cpp/llama.py", line 323, in init
assert self.model is not None
^^^^^^^^^^^^^^^^^^^^^^
AssertionError

@jamartinh
Copy link

Same here !

@liltom-eth
Copy link
Owner

Thanks for the issue. Might be some issue from llama.cpp. Will have a look.

@talarari
Copy link

talarari commented Sep 28, 2023

https://stackoverflow.com/questions/76986412/assertionerror-when-using-llama-cpp-python-in-google-colab

need to use llama-cpp-python==0.1.78
the format changed

or better yet, use the gguf models

@HyperUpscale
Copy link

There so many issues in the code... but if this is you main struggle...

What worked for me as workaround,, before I stumble to the next issue is:
Replace in .env file , BACKEND_TYPE = "llama.cpp" with "gptq" it will download the model and continued to the next error ...

Then errors appears to be in: nn_modules\qlinear\qlinear_cuda_old.py
line 83, in init self.autogptq_cuda = autogptq_cuda_256
NameError: name 'autogptq_cuda_256' is not defined

And then I surrender :)

@jamartinh
Copy link

jamartinh commented Sep 28, 2023 via email

@liltom-eth
Copy link
Owner

liltom-eth commented Sep 28, 2023

@jamartinh @HyperUpscale Thanks for the feedback. I believe the issue is mainly due to the new GGUF format.
A quick solution is try install from requirements like

git clone https://github.com/liltom-eth/llama2-webui.git
cd llama2-webui
pip install -r requirements.txt

to stick the old version of llama-cpp-python== 0.1.77.

@liltom-eth
Copy link
Owner

@jamartinh @HyperUpscale hi now the new release llama2-wrapper=0.1.13 will lock on llama-cpp-python = "0.1.77" to support old ggml models.
New release will support gguf models.

@liltom-eth
Copy link
Owner

#73 now supporting gguf models.

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

5 participants