File tree 4 files changed +14
-10
lines changed
4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ This will invoke CMake to build the bindings and copy the resulting shared libra
43
43
44
44
Optionally, environment variables can be set for certain architectures when building (ex. CUDA):
45
45
- ` MAX_JOBS ` : Number of parallel jobs (defaults to the number of CPU cores)
46
+ - ` LLAMACPP_REPO ` : Point to a custom repository for llama.cpp (Here be dragons!)
47
+ - ` LLAMACPP_TAG ` : Set a specific tag for llama.cpp (Here be dragons!)
46
48
- ` GGML_CUDA=1 ` : Enables CUDA support
47
49
- ` CMAKE_CUDA_ARCHITECTURES ` : Specifies CUDA compute capabilities (defaults to ` native ` if using CMake > 3.24)
48
50
- ` GGML_VULKAN=1 ` : Enables Vulkan Support
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ elseif (UNIX)
13
13
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE )
14
14
endif ()
15
15
16
- # Stable llama.cpp commit for bindings
17
- set (LLAMACPP_COMMIT "84d547554123a62e9ac77107cb20e4f6cc503af4" )
16
+ if (DEFINED LLAMACPP_REPO OR DEFINED LLAMACPP_COMMIT)
17
+ message (STATUS "Using a custom commit or repo for llama.cpp. Build might not work as expected. Here be dragons!" )
18
+ endif ()
18
19
19
20
set (LLAMACPP_REPO "https://github.com/ggerganov/llama.cpp.git" CACHE STRING "llama.cpp repository URL" )
20
21
message (STATUS "Using llama.cpp repo ${LLAMACPP_REPO} " )
21
22
22
- set (LLAMACPP_TAG ${LLAMACPP_COMMIT} CACHE STRING "llama.cpp repository tag" )
23
+ # Stable llama.cpp commit for bindings
24
+ set (LLAMACPP_COMMIT "84d547554123a62e9ac77107cb20e4f6cc503af4" CACHE STRING "llama.cpp repository commit" )
23
25
message (STATUS "Using llama.cpp tag ${LLAMACPP_COMMIT} " )
24
26
25
27
# Fetch llama.cpp latest
@@ -28,7 +30,7 @@ include(FetchContent)
28
30
FetchContent_Declare(
29
31
llama
30
32
GIT_REPOSITORY ${LLAMACPP_REPO}
31
- GIT_TAG ${LLAMACPP_TAG }
33
+ GIT_TAG ${LLAMACPP_COMMIT }
32
34
)
33
35
34
36
# Required for proper builds
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ if ($env:LLAMACPP_REPO) {
19
19
Write-Host " Using custom llama.cpp repo: $env: LLAMACPP_REPO "
20
20
}
21
21
22
- if ($env: LLAMACPP_TAG ) {
23
- $extraCmakeArgs += " -DLLAMACPP_REPO =$env: LLAMACPP_TAG "
24
- Write-Host " Using custom llama.cpp tag : $env: LLAMACPP_TAG "
22
+ if ($env: LLAMACPP_COMMIT ) {
23
+ $extraCmakeArgs += " -DLLAMACPP_COMMIT =$env: LLAMACPP_COMMIT "
24
+ Write-Host " Using custom llama.cpp commit : $env: LLAMACPP_COMMIT "
25
25
}
26
26
27
27
if ($env: GGML_CUDA -eq 1 ) {
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ if [ -n "$LLAMACPP_REPO" ]; then
20
20
echo " Using custom llama.cpp repo: ${LLAMACPP_REPO} "
21
21
fi
22
22
23
- if [ -n " $LLAMACPP_TAG " ]; then
24
- EXTRA_CMAKE_ARGS+=(" -DLLAMACPP_TAG= $LLAMACPP_TAG " )
25
- echo " Using custom llama.cpp tag : ${LLAMACPP_TAG } "
23
+ if [ -n " $LLAMACPP_COMMIT " ]; then
24
+ EXTRA_CMAKE_ARGS+=(" -DLLAMACPP_COMMIT= $LLAMACPP_COMMIT " )
25
+ echo " Using custom llama.cpp commit : ${LLAMACPP_COMMIT } "
26
26
fi
27
27
28
28
if [ " $GGML_CUDA " = " 1" ]; then
You can’t perform that action at this time.
0 commit comments