AttributeError: ‘NoneType’ object has no attribute ‘Llama’ #4098
Replies: 13 comments 7 replies
-
Ya I just had the same issue. Solved it on my machine (macos sonoma 14.0) by adding this line:
to the then enter Once it installs the new version of llama.cpp you should be good to go |
Beta Was this translation helpful? Give feedback.
-
Hello all, I get the same error, regardless of the model I use. I use Windows and had the chat running after installing with "start_windows.bat". Thank you! 2023-09-29 17:16:17 INFO:Loading llama-2-7b-chat.Q2_K.gguf... |
Beta Was this translation helpful? Give feedback.
-
To everyone replying that they have the same problem, you can fix it by repeating the steps I set out originally, but by replacing the .whl file with the one most appropriate for your environment -- in my case it was arm64 w/ most recent macos, if you have windows and inference is on cpu, then grab the correct url for your env: Here |
Beta Was this translation helpful? Give feedback.
-
Regarding this, I had the same issue, did the steps mentioned by @kaneda2004 (thanks!) and things finally worked for GGUF models. However, I digged a bit deeper and realised that apparently I did not have a good system regarding python for m1 and pytorch that allows cublas. This was what lead to requirements_apple_silicon.txt and some .sh scripts failure, and installing different metal wheels (.whl) file. If you're using a Mac with an M1 chip, it's recommended to use Miniforge instead of Miniconda. The reason is that Miniforge is a variant of Miniconda that is designed to support conda-forge, a community-led collection of recipes, build infrastructure, and distributions for the conda package manager. Conda-forge provides binary conda packages for a wide range of software, built to be highly compatible across platforms and systems. This includes support for the arm64 architecture used in Apple's M1 chips docs.conda.io. While it's possible to install Miniconda with brew and then add the conda-forge channel, Miniforge comes with conda-forge set up as the default channel, which makes it easier to install packages that are compatible with the M1 chip stackoverflow.com. So instead of miniconda from brew, I scrapped miniconda, scrapped python related stuff from brew (except 3.11 in my case that is used by a bunch of tools, running After that I did not reinstalled the webgui just pulled, so I was just checking what other stuff i needed to reinstall from the main README For the installation of Installation of llama-cpp-python is important, following the instructions for macos I pulled the latest changes I run Now there is gpu acceleration for my models, which improved the performance by 4x. Not an expert on these stuff, but this is what i did and i am happy with the outcome NOTE: |
Beta Was this translation helpful? Give feedback.
-
Hi, got the same error after i updated several model backends. After a while i realised i didnt update llama-cpp-python properly because it uses submodule link to original llama.cpp.
and then compile your gpu flavour :) I use the latest AMD ROCM 5.7.1 and PyTorch Nightly, (RDNA3 architecture), HIPBLAS.
After that everything works fine. |
Beta Was this translation helpful? Give feedback.
-
Running on M1 with Ventura 13.6 ggml_metal_graph_compute: command buffer 0 failed with status 5 |
Beta Was this translation helpful? Give feedback.
-
AttributeError: 'NoneType' object has no attribute 'Llama' |
Beta Was this translation helpful? Give feedback.
-
Me too.
I tried adding |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I too am having this issue after updating to the latest text-generation-webui If I had to guess, I suspect it's llama.cpp `` File "/data/text-generation-webui/modules/ui_model_menu.py", line 249, in load_model_wrapper shared.model, shared.tokenizer = load_model(selected_model, loader) output = load_func_maploader model, tokenizer = LlamaCppModel.from_pretrained(model_file) Llama = llama_cpp_lib().Llama
|
Beta Was this translation helpful? Give feedback.
-
likely compute < 8.0
then commented out all llama-* in the noavx2 requirements, then installed |
Beta Was this translation helpful? Give feedback.
-
I went to the repo mentioned by @kaneda2004 because the command that they mentioned didn't work well for me. You can try running Easiest way to run this in web ui's environment is to add this in any function present in
I added it in And it worked for me! |
Beta Was this translation helpful? Give feedback.
-
For MacOS users with Sequoia, the wheels linked above doesn't have a version for OS 15 yet. I was able to get it working with the wheels listed on llama.cpp's pypI page, which doesn't seem to be specific to a particular version. Here's what my requirements.txt looks like:
|
Beta Was this translation helpful? Give feedback.
-
I am currently executing text-generation-webui in a VM environment, using Anaconda, and have successfully GIT PULLED before initializing the server on http://127.0.0.1:7860/.
However, I am encountering an error when attempting to run codellama-13b-python.Q5_0.gguf or any similar variations with llama.cpp loader. Below is the traceback for your reference:
May I inquire if anyone has faced a similar issue and if there are any known solutions or workarounds for this problem?
Beta Was this translation helpful? Give feedback.
All reactions