Skip to content

Commit fa344db

Browse files
committed
Implement mtmd_cpp.py, base on tools/mtmd/mtmd.h #MTMD_API
llava_cpp.py will be removed after llama_chat_format.py is adjusted. It cannot connect to llava.dll (it is now mtmd.dll)
1 parent dd6cf53 commit fa344db

File tree

3 files changed

+774
-2
lines changed

3 files changed

+774
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
## [0.3.9]
1111

1212
- feat: Update llama.cpp to ggerganov/llama.cpp@8733e0cf6eefc7c7752297cc22d0836706f4222c
13+
- Make building mtmd optional by setting `CMAKE_ARGS="-DMTMD_BUILD=OFF"` and using `MTMD_CPP_LIB` to specify alternative path to shared library
1314

1415
## [0.3.8]
1516

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.21)
33
project(llama_cpp)
44

55
option(LLAMA_BUILD "Build llama.cpp shared library and install alongside python package" ON)
6-
option(LLAVA_BUILD "Build llava shared library and install alongside python package" ON)
6+
option(MTMD_BUILD "Build mtmd shared library and install alongside python package" ON)
77

88
function(llama_cpp_python_install_target target)
99
if(NOT TARGET ${target})
@@ -62,6 +62,9 @@ if (LLAMA_BUILD)
6262
# Enable building of the common library
6363
set(LLAMA_BUILD_COMMON ON CACHE BOOL "Build llama.cpp common library" FORCE)
6464

65+
# Disable building curl support
66+
set(LLAMA_CURL OFF CACHE BOOL "llama.cpp: enable curl" FORCE)
67+
6568
# Architecture detection and settings for Apple platforms
6669
if (APPLE)
6770
# Get the target architecture
@@ -133,7 +136,7 @@ if (LLAMA_BUILD)
133136
)
134137
endif()
135138

136-
if (LLAVA_BUILD)
139+
if (MTMD_BUILD)
137140
if (LLAMA_CUBLAS OR LLAMA_CUDA)
138141
add_compile_definitions(GGML_USE_CUBLAS)
139142
add_compile_definitions(GGML_USE_CUDA)

0 commit comments

Comments
 (0)