Skip to content

Commit f853c3e

Browse files
committed
Revert back reset function
1 parent 9ef8cb5 commit f853c3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/llama-sampling.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,11 +1127,16 @@ static void llama_sampler_k_shift_free(struct llama_sampler * smpl) {
11271127
delete (llama_sampler_k_shift *) smpl->ctx;
11281128
}
11291129

1130+
static void llama_sampler_k_shift_reset(struct llama_sampler * smpl) {
1131+
auto * ctx = (llama_sampler_k_shift *) smpl->ctx;
1132+
ctx->k_set = false;
1133+
}
1134+
11301135
static struct llama_sampler_i llama_sampler_k_shift_i = {
11311136
/* .name = */ llama_sampler_k_shift_name,
11321137
/* .accept = */ nullptr,
11331138
/* .apply = */ llama_sampler_k_shift_apply,
1134-
/* .reset = */ nullptr,
1139+
/* .reset = */ llama_sampler_k_shift_reset,
11351140
/* .clone = */ llama_sampler_k_shift_clone,
11361141
/* .free = */ llama_sampler_k_shift_free,
11371142
};

0 commit comments

Comments
 (0)