-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add a function to convert sampling_params to kwargs #1170
Conversation
I also mentioned this circuitous transfrom from |
def to_srt_kwargs(self): | ||
return { | ||
"max_new_tokens": self.max_new_tokens, | ||
"stop": self.stop_strs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does stop_strs
need to be processed as a list, in the case of multiple stop str scenarios?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stop is either str or list of str, both type can be handled by json.dumps. the token_ids is a set which need to be converted to list.
Motivation
Modifications
add a function to convert params to a dict to adapt different arg names.
Checklist