Fixed trailing backspaces

This commit is contained in:
MaggotHATE 2024-10-04 21:42:54 +05:00 committed by GitHub
parent d9c9203a0b
commit f2a2a618a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1075,12 +1075,12 @@ static const char * llama_sampler_xtc_name(const struct llama_sampler * /*smpl*/
static void llama_sample_xtc_apply(struct llama_sampler * smpl, llama_token_data_array * cur_p) {
const auto * ctx = (llama_sampler_xtc *) smpl->ctx;
if (ctx->probability <= 0.0f
|| ctx->threshold <= 0.0f
|| ctx->threshold >= 1.0f
|| ctx->threshold_max <= 0.0f
|| ctx->threshold_max <= ctx->threshold
|| cur_p->size <= 2
if (ctx->probability <= 0.0f
|| ctx->threshold <= 0.0f
|| ctx->threshold >= 1.0f
|| ctx->threshold_max <= 0.0f
|| ctx->threshold_max <= ctx->threshold
|| cur_p->size <= 2
|| ctx->min_keep <= 2) {
return;
}