Skip to content

Commit

Permalink
added log library for ggml
Browse files Browse the repository at this point in the history
  • Loading branch information
l3utterfly committed Sep 15, 2024
1 parent ccbcce0 commit 7987841
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<llama_token> dry_seq_breakers;

std::vector<enum gpt_sampler_type> samplers = {
GPT_SAMPLER_TYPE_TOP_K,
GPT_SAMPLER_TYPE_TFS_Z,
Expand Down
7 changes: 7 additions & 0 deletions ggml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7987841

Please sign in to comment.