Commit 25f40ca
authored
completion : simplify batch (embd) processing (ggml-org#19286)
* completion : simplify batch (embd) processing
This commit simplifies the processing of embd by removing the for loop
that currently exists which uses params.n_batch as its increment. This
commit also removes the clamping of n_eval as the size of embd is always
at most the size of params.n_batch.
The motivation is to clarify the code as it is currently a little
confusing when looking at this for loop in isolation and thinking that
it can process multiple batches.
* add an assert to verify n_eval is not greater than n_batch1 parent 015deb9 commit 25f40ca
1 file changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
| 677 | + | |
| 678 | + | |
683 | 679 | | |
684 | 680 | | |
685 | | - | |
| 681 | + | |
| 682 | + | |
686 | 683 | | |
687 | 684 | | |
688 | 685 | | |
| |||
743 | 740 | | |
744 | 741 | | |
745 | 742 | | |
746 | | - | |
| 743 | + | |
747 | 744 | | |
748 | 745 | | |
749 | 746 | | |
| |||
0 commit comments