char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Adrien Gallouëttests : download models only when running ctest (#18843)ec997b4f2

char/aliceai-t5-moe
505 B21 linesraw
1get_filename_component(DEST_DIR "${DEST}" DIRECTORY)
2file(MAKE_DIRECTORY "${DEST_DIR}")
3
4if(NOT EXISTS "${DEST}")
5    message(STATUS "Downloading ${NAME} from ggml-org/models...")
6endif()
7
8file(DOWNLOAD
9    "https://huggingface.co/ggml-org/models/resolve/main/${NAME}?download=true"
10    "${DEST}"
11    TLS_VERIFY ON
12    EXPECTED_HASH ${HASH}
13    STATUS status
14)
15
16list(GET status 0 code)
17
18if(NOT code EQUAL 0)
19    list(GET status 1 msg)
20    message(FATAL_ERROR "Failed to download ${NAME}: ${msg}")
21endif()