-
Notifications
You must be signed in to change notification settings - Fork 213
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
StreamerBase: add write tokens vector #1769
base: master
Are you sure you want to change the base?
StreamerBase: add write tokens vector #1769
Conversation
""" | ||
Write is called every time new token is decoded. Returns a StreamingStatus flag to indicate whether generation should be stopped or cancelled | ||
Put is called every time new token or vector of tokens is decoded. Returns a bool flag to indicate whether generation should be stopped, if return true generation stops |
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.
Why it's return bool ?
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.
It was copypasted, thanks, fixed
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.
LGTM
public: | ||
StreamingStatus write(int64_t token) override; | ||
StreamingStatus write(const std::vector<int64_t>& tokens) override; |
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.
FYI @mzegla
as you requested such method
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.
Yes, that should remove the need for our WA for streaming the prompt back. Thanks.
StreamingStatus write(const std::vector<int64_t>& tokens)
forStreamerBase
StreamingStatus write(const std::vector<int64_t>& tokens)
forTextStreamer
StreamerBase
interface & deprecatesChunkStreamerBase
interface