Skip to content

Commit f9e416d

Browse files
committed
removed unused parameters in llama_sample_dry
1 parent 11487ed commit f9e416d

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

common/sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static llama_token_data_array llama_sampling_prepare_impl(
310310

311311
// DRY penalties (multiplier > 0 means enabled)
312312
if(dry_multiplier > 0.0f) {
313-
llama_sample_dry(ctx_main, &cur_p,
313+
llama_sample_dry(&cur_p,
314314
penalty_tokens.data() + penalty_tokens.size() - penalty_tokens_used_size,
315315
penalty_tokens_used_size, dry_base, dry_multiplier, dry_allowed_length,
316316
params.dry_sequence_breakers.data(), params.dry_sequence_breakers.size());

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13044,7 +13044,7 @@ void llama_sample_min_p(struct llama_context * ctx, llama_token_data_array * can
1304413044
}
1304513045
}
1304613046

13047-
void llama_sample_dry(struct llama_context * ctx, llama_token_data_array * candidates, const llama_token * last_tokens, size_t last_tokens_size, float dry_base, float dry_multiplier, int dry_allowed_length, const llama_token * seq_breakers, size_t seq_breakers_size) {
13047+
void llama_sample_dry(llama_token_data_array * candidates, const llama_token * last_tokens, size_t last_tokens_size, float dry_base, float dry_multiplier, int dry_allowed_length, const llama_token * seq_breakers, size_t seq_breakers_size) {
1304813048
// loop through each candidate
1304913049
for (size_t i = 0; i < candidates->size; ++i) {
1305013050

llama.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,6 @@ extern "C" {
924924

925925
/// @details DRY sampler as described in: https://github.com/oobabooga/text-generation-webui/pull/5677
926926
LLAMA_API void llama_sample_dry(
927-
struct llama_context * ctx,
928927
llama_token_data_array * candidates,
929928
const llama_token * last_tokens,
930929
size_t last_tokens_size,

0 commit comments

Comments
 (0)