From c29a4b53de20d24211363c81b743350ccfbe0659 Mon Sep 17 00:00:00 2001 From: Plamen Minev Date: Wed, 18 Dec 2024 12:40:53 +0200 Subject: [PATCH] refactor: update llama, ref #26 -- Penalty sampler API initalization was changed --- code/ac/llama/Sampler.cpp | 7 +------ code/ac/llama/Sampler.hpp | 3 --- llama.cpp | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/code/ac/llama/Sampler.cpp b/code/ac/llama/Sampler.cpp index 146acc6..77a4094 100644 --- a/code/ac/llama/Sampler.cpp +++ b/code/ac/llama/Sampler.cpp @@ -37,15 +37,10 @@ Sampler::Sampler(Model& model, const Params& params) llama_sampler_chain_add(chain, llama_sampler_init_penalties( - llama_n_vocab(lmodel), - llama_token_eos(lmodel), - llama_token_nl(lmodel), params.repetitionPenalty.numTokens, params.repetitionPenalty.repeat, params.repetitionPenalty.freq, - params.repetitionPenalty.present, - params.penalizeNewline, - params.ignoreEos + params.repetitionPenalty.present ) ); diff --git a/code/ac/llama/Sampler.hpp b/code/ac/llama/Sampler.hpp index 2b34b83..b869239 100644 --- a/code/ac/llama/Sampler.hpp +++ b/code/ac/llama/Sampler.hpp @@ -62,9 +62,6 @@ class AC_LLAMA_EXPORT Sampler { float threshold = 0.10f; // > 0.5 disables XTC } xtc; - bool penalizeNewline = false; // consider newlines as a repeatable token - bool ignoreEos = false; - std::vector samplerSequence = { SamplingType::Top_K, SamplingType::Typical_P, diff --git a/llama.cpp b/llama.cpp index fbc979b..0e70ba6 160000 --- a/llama.cpp +++ b/llama.cpp @@ -1 +1 @@ -Subproject commit fbc979bf6e986a7b07f61b1a4bf8d0ac70e1bbdd +Subproject commit 0e70ba686e6c717a0aa41d88284e2a392c2bd0cd