Simplified algorithm since threshold_max is removed
This commit is contained in:
parent
dfef2c4c37
commit
436a9919e3
1 changed files with 1 additions and 7 deletions
|
@ -1101,13 +1101,7 @@ static void llama_sample_xtc_apply(struct llama_sampler * smpl, llama_token_data
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cur_p->size - pos_last >= ctx->min_keep && pos_last > 0) {
|
if (cur_p->size - pos_last >= ctx->min_keep && pos_last > 0) {
|
||||||
|
cur_p->data += pos_last;
|
||||||
size_t last_idx = cur_p->size - pos_last;
|
|
||||||
|
|
||||||
for (size_t i = 0; i <= last_idx; ++i) {
|
|
||||||
cur_p->data[i] = cur_p->data[i + pos_last];
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_p->size = cur_p->size - pos_last;
|
cur_p->size = cur_p->size - pos_last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue