Skip to content

ImportError: cannot import name 'LlamaCpp' from 'keymaker.models' #14

@michael-newsrx

Description

@michael-newsrx

I installed llama-cpp-python and headjack-keymaker[llamacpp] but attempting to import LlamaCpp results in the import not being found? (Ubuntu, Conda, Python 3.11)

CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install -U llama-cpp-python --no-cache-dir
pip install -U headjack-keymaker[llamacpp]

In a jupyter notebook:

from keymaker.models import LlamaCpp
llm = load_mixtral_8x7b(verbose=False) # load GGUF model with preset parameters and n_ctx
km_llm = LlamaCpp(llm)

Results in the import immediately failing with:

ImportError: cannot import name 'LlamaCpp' from 'keymaker.models' (.../miniconda3/envs/ai_newsletters/lib/python3.11/site-packages/keymaker/models/__init__.py)

I can actually "control-click" the class name in my IDE (pycharm) and the class file opens and displays?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions