-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: improve error handling of sampling kernels (#456)
Add an option to check whether there are nan inputs. This PR also removes all `eps` arguments in renorm kernels: previously we pre-set a eps constant to determine when to stop the binary search, however, this might not be accuracy when vocabulary size grows (e.g. >= 1e6 in llama3 where our eps might be set to 1e-5). In this PR, we implement a loop variant which do not rely on any external eps, and it can help us address some of the issues such as vllm-project/vllm#7137 (comment) .
- Loading branch information
Showing
5 changed files
with
172 additions
and
63 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
Oops, something went wrong.