mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-09-30 11:36:38 +02:00
talk-llama : sync llama.cpp
This commit is contained in:
+17
-8
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user