llama : minor sampling refactor (2) (#9386)

This commit is contained in:
slaren authored and GitHub committed 2024-09-09 17:10:46 +02:00
1 parent 38ca6f644b
commit 5fb5e24811
12 files changed
+115 -113

No files matched your search

-2
View File
@@ -118,8 +118,6 @@ int main(int argc, char ** argv) {
{
const llama_token new_token_id = llama_sampler_sample(smpl, ctx, batch.n_tokens - 1);
llama_sampler_accept(smpl, new_token_id);
// is it an end of generation?
if (llama_token_is_eog(model, new_token_id) || n_cur == n_predict) {
LOG_TEE("\n");