Skip to content

Commit 436a991

Browse files
committed
Simplified algorithm since threshold_max is removed
1 parent dfef2c4 commit 436a991

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/llama-sampling.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,13 +1101,7 @@ static void llama_sample_xtc_apply(struct llama_sampler * smpl, llama_token_data
11011101
}
11021102

11031103
if (cur_p->size - pos_last >= ctx->min_keep && pos_last > 0) {
1104-
1105-
size_t last_idx = cur_p->size - pos_last;
1106-
1107-
for (size_t i = 0; i <= last_idx; ++i) {
1108-
cur_p->data[i] = cur_p->data[i + pos_last];
1109-
}
1110-
1104+
cur_p->data += pos_last;
11111105
cur_p->size = cur_p->size - pos_last;
11121106
}
11131107
}

0 commit comments

Comments
 (0)