2023-03-25 20:26:40 +02:00
|
|
|
# dependencies
|
|
|
|
|
|
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
|
|
|
|
|
# third-party
|
|
|
|
|
|
|
|
|
|
# ...
|
|
|
|
|
|
|
|
|
|
# common
|
|
|
|
|
|
|
|
|
|
set(TARGET common)
|
|
|
|
|
|
|
|
|
|
add_library(${TARGET} OBJECT
|
|
|
|
|
common.h
|
|
|
|
|
common.cpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
|
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
target_include_directories(${TARGET} PUBLIC .)
|
|
|
|
|
target_compile_features(${TARGET} PUBLIC cxx_std_11)
|
|
|
|
|
target_link_libraries(${TARGET} PRIVATE llama)
|
|
|
|
|
|
|
|
|
|
# examples
|
|
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
|
|
if (EMSCRIPTEN)
|
|
|
|
|
else()
|
|
|
|
|
add_subdirectory(main)
|
|
|
|
|
add_subdirectory(quantize)
|
2023-04-08 00:09:18 +02:00
|
|
|
add_subdirectory(quantize-stats)
|
2023-03-25 20:26:40 +02:00
|
|
|
add_subdirectory(perplexity)
|
|
|
|
|
add_subdirectory(embedding)
|
2023-04-24 18:23:31 +02:00
|
|
|
add_subdirectory(save-load-state)
|
2023-04-30 12:32:37 +00:00
|
|
|
add_subdirectory(benchmark)
|
2023-05-13 14:56:40 +02:00
|
|
|
add_subdirectory(baby-llama)
|
2023-06-13 21:04:40 +02:00
|
|
|
add_subdirectory(train-text-from-scratch)
|
2023-06-17 19:30:22 +03:00
|
|
|
add_subdirectory(simple)
|
2023-06-28 23:53:37 +08:00
|
|
|
add_subdirectory(embd-input)
|
2023-06-04 23:34:30 +03:00
|
|
|
if (LLAMA_METAL)
|
|
|
|
|
add_subdirectory(metal)
|
|
|
|
|
endif()
|
|
|
|
|
if (LLAMA_BUILD_SERVER)
|
2023-05-21 11:51:18 -06:00
|
|
|
add_subdirectory(server)
|
|
|
|
|
endif()
|
2023-03-25 20:26:40 +02:00
|
|
|
endif()
|