Fix server crash when there is no DRY sampler (#588)
Co-authored-by: firecoperana <firecoperana>
This commit is contained in:
parent
2fddc45a02
commit
49d4d2630a
|
|
@ -23363,6 +23363,9 @@ struct llama_sampler_dry * llama_sampler_init_dry(const struct llama_vocab* voca
|
||||||
}
|
}
|
||||||
|
|
||||||
void llama_sampler_dry_reset(struct llama_sampler_dry* smpl) {
|
void llama_sampler_dry_reset(struct llama_sampler_dry* smpl) {
|
||||||
|
if (!smpl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
smpl->last_tokens.clear();
|
smpl->last_tokens.clear();
|
||||||
smpl->dry_repeat_count.clear();
|
smpl->dry_repeat_count.clear();
|
||||||
smpl->dry_max_token_repeat.clear();
|
smpl->dry_max_token_repeat.clear();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue