Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elide logits if the logits pointer parameter is NULL (#107)
* Completely skip calculation of logits if nobody cares This speeds up sequence mode evaluations by up to 20% if you ingest a large prompt and then only retrieve the logits at the very end. Note that you must pass a NULL pointer to the logits parameter in order to take advantage of this optimization. * logits_out=NULL documentation
- Loading branch information
Showing
2 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters