2023-03-25 19:26:40 +01:00
|
|
|
# dependencies
|
|
|
|
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
|
|
|
# third-party
|
|
|
|
|
|
|
|
# ...
|
|
|
|
|
2024-11-26 13:18:08 +01:00
|
|
|
# flags
|
|
|
|
|
|
|
|
llama_add_compile_flags()
|
|
|
|
|
2023-03-25 19:26:40 +01:00
|
|
|
# examples
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
if (EMSCRIPTEN)
|
|
|
|
else()
|
2023-10-20 20:07:23 +02:00
|
|
|
add_subdirectory(batched-bench)
|
2024-06-13 01:41:52 +02:00
|
|
|
add_subdirectory(batched)
|
2023-10-20 20:07:23 +02:00
|
|
|
add_subdirectory(embedding)
|
2024-04-11 14:51:07 +02:00
|
|
|
add_subdirectory(eval-callback)
|
2024-12-12 19:02:49 +01:00
|
|
|
|
|
|
|
if (NOT WIN32)
|
|
|
|
# disabled on Windows because it uses internal functions not exported with LLAMA_API
|
|
|
|
add_subdirectory(gbnf-validator)
|
|
|
|
endif()
|
|
|
|
|
2024-07-07 14:58:43 +02:00
|
|
|
add_subdirectory(gguf-hash)
|
2024-03-19 12:05:44 +01:00
|
|
|
add_subdirectory(gguf-split)
|
2024-06-13 01:41:52 +02:00
|
|
|
add_subdirectory(gguf)
|
|
|
|
add_subdirectory(gritlm)
|
|
|
|
add_subdirectory(imatrix)
|
2023-10-20 20:07:23 +02:00
|
|
|
add_subdirectory(infill)
|
|
|
|
add_subdirectory(llama-bench)
|
2024-06-13 01:41:52 +02:00
|
|
|
add_subdirectory(lookahead)
|
|
|
|
add_subdirectory(lookup)
|
2023-03-25 19:26:40 +01:00
|
|
|
add_subdirectory(main)
|
2023-10-20 20:07:23 +02:00
|
|
|
add_subdirectory(parallel)
|
2024-06-13 01:41:52 +02:00
|
|
|
add_subdirectory(passkey)
|
2023-10-20 20:07:23 +02:00
|
|
|
add_subdirectory(perplexity)
|
2024-06-13 01:41:52 +02:00
|
|
|
add_subdirectory(quantize)
|
2024-03-25 08:38:22 +01:00
|
|
|
add_subdirectory(retrieval)
|
2024-06-13 01:41:52 +02:00
|
|
|
if (LLAMA_BUILD_SERVER)
|
2024-11-25 15:13:39 +01:00
|
|
|
add_subdirectory(server)
|
2024-06-13 01:41:52 +02:00
|
|
|
endif()
|
2023-04-24 18:23:31 +02:00
|
|
|
add_subdirectory(save-load-state)
|
2024-11-25 22:56:24 +01:00
|
|
|
add_subdirectory(run)
|
2023-06-17 18:30:22 +02:00
|
|
|
add_subdirectory(simple)
|
2024-11-01 23:50:59 +01:00
|
|
|
add_subdirectory(simple-chat)
|
2023-09-03 14:12:08 +02:00
|
|
|
add_subdirectory(speculative)
|
2024-11-25 08:58:41 +01:00
|
|
|
add_subdirectory(speculative-simple)
|
2024-06-13 01:41:52 +02:00
|
|
|
add_subdirectory(tokenize)
|
2024-12-18 18:27:21 +01:00
|
|
|
add_subdirectory(tts)
|
2024-12-12 22:53:05 +01:00
|
|
|
add_subdirectory(gen-docs)
|
2024-11-25 15:13:39 +01:00
|
|
|
if (NOT GGML_BACKEND_DL)
|
|
|
|
# these examples use the backends directly and cannot be built with dynamic loading
|
|
|
|
add_subdirectory(convert-llama2c-to-ggml)
|
|
|
|
add_subdirectory(cvector-generator)
|
|
|
|
add_subdirectory(export-lora)
|
2024-12-12 19:02:49 +01:00
|
|
|
if (NOT WIN32)
|
|
|
|
# disabled on Windows because it uses internal functions not exported with LLAMA_API
|
|
|
|
add_subdirectory(quantize-stats)
|
|
|
|
endif()
|
2024-11-25 15:13:39 +01:00
|
|
|
add_subdirectory(llava)
|
|
|
|
if (GGML_RPC)
|
|
|
|
add_subdirectory(rpc)
|
|
|
|
endif()
|
|
|
|
if (GGML_SYCL)
|
|
|
|
add_subdirectory(sycl)
|
|
|
|
endif()
|
|
|
|
endif()
|
2023-03-25 19:26:40 +01:00
|
|
|
endif()
|