llama : minor sampling refactor (2) (#9386)
This commit is contained in:
parent
38ca6f644b
commit
5fb5e24811
12 changed files with 115 additions and 113 deletions
|
@ -172,8 +172,6 @@ int main(int argc, char ** argv) {
|
|||
|
||||
const llama_token new_token_id = llama_sampler_sample(smpl, ctx, i_batch[i]);
|
||||
|
||||
llama_sampler_accept(smpl, new_token_id);
|
||||
|
||||
// is it an end of generation? -> mark the stream as finished
|
||||
if (llama_token_is_eog(model, new_token_id) || n_cur == n_predict) {
|
||||
i_batch[i] = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue