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

Broken on Metal: why is ooba attempting to import llama_cpp_cuda ? #6222

Closed
1 task done
cm8t opened this issue Jul 10, 2024 · 1 comment
Closed
1 task done

Broken on Metal: why is ooba attempting to import llama_cpp_cuda ? #6222

cm8t opened this issue Jul 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cm8t
Copy link

cm8t commented Jul 10, 2024

Describe the bug

Exception: Cannot import 'llama_cpp_cuda' because 'llama_cpp' is already imported. See issue #1575 in llama-cpp-python. Please restart the server before attempting to use a different version of llama-cpp-python.

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

fresh install, start server, attempt to load model

Screenshot

No response

Logs

start_macos.sh
15:32:05-639275 INFO     Starting Text generation web UI                        

Running on local URL:  http://127.0.0.1:7860

15:32:14-027478 INFO     Loading "Codestral-22B-v0.1-Q5_K_M.gguf"               
15:32:14-057944 INFO     llama.cpp weights detected:                            
                         "models/Codestral-22B-v0.1-Q5_K_M.gguf"                
15:32:14-086935 ERROR    Failed to load the model.                              
Traceback (most recent call last):
  File "/Users/CM/Downloads/text-generation-webui-main-2/modules/ui_model_menu.py", line 246, in load_model_wrapper
    shared.model, shared.tokenizer = load_model(selected_model, loader)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/CM/Downloads/text-generation-webui-main-2/modules/models.py", line 94, in load_model
    output = load_func_map[loader](model_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/CM/Downloads/text-generation-webui-main-2/modules/models.py", line 275, in llamacpp_loader
    model, tokenizer = LlamaCppModel.from_pretrained(model_file)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/CM/Downloads/text-generation-webui-main-2/modules/llamacpp_model.py", line 39, in from_pretrained
    LlamaCache = llama_cpp_lib().LlamaCache
                 ^^^^^^^^^^^^^^^
  File "/Users/CM/Downloads/text-generation-webui-main-2/modules/llama_cpp_python_hijack.py", line 38, in llama_cpp_lib
    raise Exception(f"Cannot import 'llama_cpp_cuda' because '{imported_module}' is already imported. See issue #1575 in llama-cpp-python. Please restart the server before attempting to use a different version of llama-cpp-python.")
Exception: Cannot import 'llama_cpp_cuda' because 'llama_cpp' is already imported. See issue #1575 in llama-cpp-python. Please restart the server before attempting to use a different version of llama-cpp-python.

System Info

M1 Max 32GB  Sonoma 14.6
@cm8t cm8t added the bug Something isn't working label Jul 10, 2024
@OceanSurfer
Copy link

abetlen/llama-cpp-python#1575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants