talk-llama : sync llama.cpp

This commit is contained in:
Georgi Gerganov
2026-08-25 15:28:56 +03:00
parent 3680f66fa4
commit 978113305b
2 changed files with 19 additions and 10 deletions
+2 -2
View File
@@ -4,11 +4,11 @@ if (WHISPER_SDL2)
if (WHISPER_USE_SYSTEM_LLAMA)
message(STATUS "Using system-provided llama.cpp, skipping llama.cpp fetch")
find_package(llama 0.1.2 REQUIRED)
find_package(llama 0.3.0 REQUIRED)
else()
include(FetchContent)
set(LLAMA_TAG "v0.1.2")
set(LLAMA_TAG "v0.3.0")
set(LLAMA_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(LLAMA_BUILD_TESTS OFF CACHE BOOL "" FORCE)
+17 -8
View File
@@ -1,11 +1,20 @@
#!/bin/bash
# note: run from the whisper.cpp root directory
set -euo pipefail
cp -rpv ../llama.cpp/include/llama.h ./examples/talk-llama/llama.h
# read the current llama.cpp version from the neighboring repo
LLAMA_VERSION=$(sed -nE 's/^set\(LLAMA_VERSION_(MAJOR|MINOR|PATCH) ([0-9]+)\)$/\2/p' ../llama.cpp/CMakeLists.txt | paste -sd. -)
cp -rpv ../llama.cpp/src/llama*.cpp ./examples/talk-llama/
cp -rpv ../llama.cpp/src/llama*.h ./examples/talk-llama/
cp -rpv ../llama.cpp/src/models/* ./examples/talk-llama/models/
cp -rpv ../llama.cpp/src/unicode.h ./examples/talk-llama/unicode.h
cp -rpv ../llama.cpp/src/unicode.cpp ./examples/talk-llama/unicode.cpp
cp -rpv ../llama.cpp/src/unicode-data.h ./examples/talk-llama/unicode-data.h
cp -rpv ../llama.cpp/src/unicode-data.cpp ./examples/talk-llama/unicode-data.cpp
if [ -z "${LLAMA_VERSION}" ]; then
echo "error: could not read llama.cpp version from ../llama.cpp/CMakeLists.txt" >&2
exit 1
fi
# update the version number in examples/talk-llama/CMakeLists.txt
sed -i.bak \
-E -e "s/(find_package[(]llama )[0-9]+\.[0-9]+\.[0-9]+/\1${LLAMA_VERSION}/" \
-e "s/(set[(]LLAMA_TAG \"v)[0-9]+\.[0-9]+\.[0-9]+/\1${LLAMA_VERSION}/" \
examples/talk-llama/CMakeLists.txt
rm examples/talk-llama/CMakeLists.txt.bak
echo "synced llama.cpp version: ${LLAMA_VERSION}"