From 7987841e15bf7b80582f585b3267bada9aff6acf Mon Sep 17 00:00:00 2001 From: l3utterfly Date: Sun, 15 Sep 2024 22:32:22 +0900 Subject: [PATCH] added log library for ggml --- common/common.h | 7 +++++++ ggml/CMakeLists.txt | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/common/common.h b/common/common.h index e8025aeef57fa..c2f5d690a2c24 100644 --- a/common/common.h +++ b/common/common.h @@ -126,6 +126,13 @@ struct gpt_sampler_params { bool ignore_eos = false; bool no_perf = false; // disable performance metrics + // dry sampler params + float dry_multiplier = 0.0f; // 0.0f = disabled, recommended value: 0.8f + float dry_base = 1.75f; + uint32_t dry_allowed_length = 2; + uint32_t dry_penalty_last_n = -1; // DRY last n tokens to penalize (0 = disable penalty, -1 = context size) + std::vector dry_seq_breakers; + std::vector samplers = { GPT_SAMPLER_TYPE_TOP_K, GPT_SAMPLER_TYPE_TFS_Z, diff --git a/ggml/CMakeLists.txt b/ggml/CMakeLists.txt index 532534bcb97e3..28fed39ec7105 100644 --- a/ggml/CMakeLists.txt +++ b/ggml/CMakeLists.txt @@ -218,6 +218,13 @@ set(GGML_PUBLIC_HEADERS include/ggml-vulkan.h) set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}") + +# link android log library +if(ANDROID) + find_library(log-lib log) + target_link_libraries(ggml PRIVATE ${log-lib}) +endif() + #if (GGML_METAL) # set_target_properties(ggml PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/ggml-metal.metal") #endif()