1f0aa2a696
* llama : support DeepSeek V3.2 model family (with DSA lightning indexer) * convert : handle DeepseekV32ForCausalLM architecture * ggml : support for f16 GGML_OP_FILL * memory : separate hparams argument in llama_kv_cache constructor * memory : add llama_kv_cache_dsa memory (KV cache + lightning indexer cache) * llama : support for LLM_ARCH_DEEPSEEK32 * model : llama_model_deepseek32 implementation * model : merge two scale operations into one in DSA lightning indexer implementation * chore : remove unused code * model : support NVFP4 in DeepSeek V3.2 Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com> * memory : refactoring TODO Co-authored-by: ggerganov <ggerganov@users.noreply.github.com> --------- Co-authored-by: Stanisław Szymczyk <sszymczy@gmail.com> Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com> Co-authored-by: ggerganov <ggerganov@users.noreply.github.com>
62 lines
1.6 KiB
CMake
62 lines
1.6 KiB
CMake
llama_add_compile_flags()
|
|
|
|
#
|
|
# libraries
|
|
#
|
|
|
|
# llama
|
|
|
|
file(GLOB LLAMA_MODELS_SOURCES "models/*.cpp")
|
|
|
|
add_library(llama
|
|
../include/llama.h
|
|
llama.cpp
|
|
llama-adapter.cpp
|
|
llama-arch.cpp
|
|
llama-batch.cpp
|
|
llama-chat.cpp
|
|
llama-context.cpp
|
|
llama-cparams.cpp
|
|
llama-grammar.cpp
|
|
llama-graph.cpp
|
|
llama-hparams.cpp
|
|
llama-impl.cpp
|
|
llama-io.cpp
|
|
llama-kv-cache.cpp
|
|
llama-kv-cache-iswa.cpp
|
|
llama-kv-cache-dsa.cpp
|
|
llama-memory.cpp
|
|
llama-memory-hybrid.cpp
|
|
llama-memory-hybrid-iswa.cpp
|
|
llama-memory-recurrent.cpp
|
|
llama-mmap.cpp
|
|
llama-model-loader.cpp
|
|
llama-model-saver.cpp
|
|
llama-model.cpp
|
|
llama-quant.cpp
|
|
llama-sampler.cpp
|
|
llama-vocab.cpp
|
|
unicode-data.cpp
|
|
unicode.cpp
|
|
unicode.h
|
|
${LLAMA_MODELS_SOURCES}
|
|
)
|
|
|
|
set_target_properties(llama PROPERTIES
|
|
VERSION ${LLAMA_INSTALL_VERSION}
|
|
SOVERSION 0
|
|
MACHO_CURRENT_VERSION 0 # keep macOS linker from seeing oversized version number
|
|
)
|
|
|
|
target_include_directories(llama PRIVATE .)
|
|
target_include_directories(llama PUBLIC ../include)
|
|
target_compile_features (llama PRIVATE cxx_std_17) # don't bump
|
|
|
|
target_link_libraries(llama PUBLIC ggml)
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
set_target_properties(llama PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
target_compile_definitions(llama PRIVATE LLAMA_BUILD)
|
|
target_compile_definitions(llama PUBLIC LLAMA_SHARED)
|
|
endif()
|