Skip to content
Discussion options

You must be logged in to vote

I guess you're using JamePeng's fork since the ver is 0.3.23.
The interface of abetlen's main branch and the fork are incompatible, hence you need to modify some to let things work.

Anyway, the usage of mmproj is described in class Llava15ChatHandler in llama_cpp/llama_chat_format.py.
Basically, you can use mmproj by copy-n-pasting the core part of it or by defining a class inheriting it.

class Llava15ChatHander:
    # The constructor takes the path to the `mmproj.gguf` file.
    def __init__(self, clip_model_path, verbose):
        ...

    # The core logic communicating with libmtmd of C++ side is defined here.
    def __call__(self, ...):
        ...

The __call__ method does

  1. initializ…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@SwHaraday
Comment options

Answer selected by SwHaraday
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants