Skip to content

Commit

Permalink
refactor: update llama, ref #26
Browse files Browse the repository at this point in the history
-- Penalty sampler API initalization was changed
  • Loading branch information
pminev committed Dec 18, 2024
1 parent 4b493ff commit c29a4b5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
7 changes: 1 addition & 6 deletions code/ac/llama/Sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
);

Expand Down
3 changes: 0 additions & 3 deletions code/ac/llama/Sampler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SamplingType> samplerSequence = {
SamplingType::Top_K,
SamplingType::Typical_P,
Expand Down
2 changes: 1 addition & 1 deletion llama.cpp
Submodule llama.cpp updated 196 files

0 comments on commit c29a4b5

Please sign in to comment.