Skip to content

Commit bde3141

Browse files
committed
DRY: Addressed warnings from pedantic compile
1 parent 5169d1e commit bde3141

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

common/sampling.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ struct common_sampler * common_sampler_init(const struct llama_model * model, co
180180
params.penalize_nl,
181181
params.ignore_eos));
182182

183-
struct llama_sampler * dry_sampler = nullptr;
184-
185183
if (params.temp > 0.0f) {
186184
if (params.mirostat == 0) {
187185
for (const auto & cnstr : params.samplers) {

include/llama.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,4 +1252,4 @@ extern "C" {
12521252
}
12531253
#endif
12541254

1255-
#endif // LLAMA_H
1255+
#endif // LLAMA_H

src/llama-sampling.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,21 @@ struct llama_sampler * llama_sampler_init_grammar_impl(
2929

3030
struct llama_sampler * llama_sampler_init_infill_impl(
3131
const struct llama_vocab & vocab);
32+
33+
struct llama_sampler * llama_sampler_init_dry(
34+
const struct llama_model * model,
35+
int32_t context_size,
36+
float dry_multiplier,
37+
float dry_base,
38+
int32_t dry_allowed_length,
39+
int32_t dry_penalty_last_n,
40+
const std::vector<std::string>& seq_breakers);
41+
42+
struct llama_sampler * llama_sampler_init_dry(
43+
const struct llama_model * model,
44+
int32_t context_size,
45+
float dry_multiplier,
46+
float dry_base,
47+
int32_t dry_allowed_length,
48+
int32_t dry_penalty_last_n,
49+
const std::vector<std::vector<llama_token>>& seq_breakers);

0 commit comments

Comments
 (0)