2023-03-25 20:26:40 +02:00
|
|
|
# dependencies
|
|
|
|
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
|
|
|
# third-party
|
|
|
|
|
|
|
|
# ...
|
|
|
|
|
2024-11-26 14:18:08 +02:00
|
|
|
# flags
|
|
|
|
|
|
|
|
llama_add_compile_flags()
|
|
|
|
|
2023-03-25 20:26:40 +02:00
|
|
|
# examples
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
if (EMSCRIPTEN)
|
|
|
|
else()
|
2023-10-20 21:07:23 +03:00
|
|
|
add_subdirectory(batched-bench)
|
2024-06-13 00:41:52 +01:00
|
|
|
add_subdirectory(batched)
|
2023-10-20 21:07:23 +03: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 22:58:43 +10:00
|
|
|
add_subdirectory(gguf-hash)
|
2024-03-19 12:05:44 +01:00
|
|
|
add_subdirectory(gguf-split)
|
2024-06-13 00:41:52 +01:00
|
|
|
add_subdirectory(gguf)
|
|
|
|
add_subdirectory(gritlm)
|
|
|
|
add_subdirectory(imatrix)
|
2023-10-20 21:07:23 +03:00
|
|
|
add_subdirectory(infill)
|
|
|
|
add_subdirectory(llama-bench)
|
2024-06-13 00:41:52 +01:00
|
|
|
add_subdirectory(lookahead)
|
|
|
|
add_subdirectory(lookup)
|
2023-03-25 20:26:40 +02:00
|
|
|
add_subdirectory(main)
|
2023-10-20 21:07:23 +03:00
|
|
|
add_subdirectory(parallel)
|
2024-06-13 00:41:52 +01:00
|
|
|
add_subdirectory(passkey)
|
2023-10-20 21:07:23 +03:00
|
|
|
add_subdirectory(perplexity)
|
2024-06-13 00:41:52 +01:00
|
|
|
add_subdirectory(quantize)
|
2024-03-25 16:38:22 +09:00
|
|
|
add_subdirectory(retrieval)
|
2024-06-13 00:41:52 +01:00
|
|
|
if (LLAMA_BUILD_SERVER)
|
2024-11-25 15:13:39 +01:00
|
|
|
add_subdirectory(server)
|
2024-06-13 00:41:52 +01:00
|
|
|
endif()
|
2023-04-24 18:23:31 +02:00
|
|
|
add_subdirectory(save-load-state)
|
2024-11-25 16:56:24 -05:00
|
|
|
add_subdirectory(run)
|
2023-06-17 19:30:22 +03:00
|
|
|
add_subdirectory(simple)
|
2024-11-01 23:50:59 +01:00
|
|
|
add_subdirectory(simple-chat)
|
2023-09-03 15:12:08 +03:00
|
|
|
add_subdirectory(speculative)
|
2024-11-25 09:58:41 +02:00
|
|
|
add_subdirectory(speculative-simple)
|
2024-06-13 00:41:52 +01:00
|
|
|
add_subdirectory(tokenize)
|
2024-12-18 19:27:21 +02: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 20:26:40 +02:00
|
|
|
endif()
|