You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update mtmd chat handler import paths in README
- Update import statements for multi-modal chat handlers from llama_cpp.llama_chat_format to llama_cpp.llama_multimodal in the documentation examples.
Signed-off-by: JamePeng <jame_peng@sina.com>
Then you'll need to use a custom chat handler to load the clip model and process the chat messages and images.
1056
+
Then you'll need to use a custom chat handler to load the mmproj model and process the chat messages and images.
1057
+
1058
+
Note: Starting from 0.3.41-preview, in order to extend MTMD capabilities, multimodal-related logic has been separated from `llama_chat_format` into `llama_multimodal`.
1059
+
New implementations are recommended to use the updated multimodal interfaces in `llama_multimodal`
1060
+
For backward compatibility, the legacy `llama_chat_format` path is still retained and continues to support existing integrations, but may be deprecated in future versions.
1061
+
Additionally, the parameter `clip_model_path` has been renamed to `mmproj_path` to better reflect its purpose and align with the underlying multimodal projection model naming convention.
1062
+
The old parameter name `clip_model_path` is kept as a compatibility alias in some interfaces, but new code should use `mmproj_path` exclusively.
1057
1063
1058
1064
```python
1059
1065
from llama_cpp import Llama
1060
-
from llama_cpp.llama_chat_format import Llava15ChatHandler
1066
+
# from llama_cpp.llama_chat_format import Llava15ChatHandler
1067
+
from llama_cpp.llama_multimodal import Llava15ChatHandler
1061
1068
1062
1069
model_path="path/to/llava/ggml-model-f16.gguf"
1063
1070
mmproj_path="path/to/llava/mmproj-model-f16.gguf"
@@ -1086,7 +1093,8 @@ You can also pull the model from the Hugging Face Hub using the `from_pretrained
1086
1093
1087
1094
```python
1088
1095
from llama_cpp import Llama
1089
-
from llama_cpp.llama_chat_format import MoondreamChatHandler
1096
+
# from llama_cpp.llama_chat_format import MoondreamChatHandler
1097
+
from llama_cpp.llama_multimodal import MoondreamChatHandler
0 commit comments