This repository was archived by the owner on Jun 3, 2025. It is now read-only.
[TextGeneration] Add Streaming Functionality#1246
Merged
Merged
Conversation
115a7d7 to
6a79bca
Compare
b610646 to
a69abf9
Compare
627b849 to
ce85c4b
Compare
bfineran
reviewed
Sep 19, 2023
mgoin
reviewed
Sep 20, 2023
dbogunowicz
previously approved these changes
Sep 21, 2023
Contributor
|
Something maybe parallel to @mgoin mentions, one thing that I find a bit problematic is this: created=datetime.datetime(2023, 9, 18, 15, 32, 9, 279348) prompts=['hello?', 'cool'] generations=[GeneratedText(text="'ll", score=None, finished=False, finished_reason=None)] session_id=None
created=datetime.datetime(2023, 9, 18, 15, 32, 9, 423291) prompts=['hello?', 'cool'] generations=[GeneratedText(text=' be', score=None, finished=False, finished_reason=None)] session_id=NoneThe "lll" and "be" tokens, we do not know whether they came from "hello?" or "cool" prompt. For now, the user does not know the relationship between the generated token and the original prompt (which egg was hatched by which chicken in plain english :)). Clearly, it's not straightforward to resolve if there is no unique identifier like session_ids to convey this information... |
bfineran
previously approved these changes
Sep 21, 2023
bfineran
left a comment
Contributor
There was a problem hiding this comment.
LGTM - let's check in some tests for this as well
Satrat
previously approved these changes
Sep 21, 2023
1dc2bd1 to
3a18e5f
Compare
Satrat
previously approved these changes
Sep 21, 2023
rahul-tuli
reviewed
Sep 21, 2023
mgoin
reviewed
Sep 21, 2023
Co-authored-by: Rahul Tuli <[email protected]>
Co-authored-by: Rahul Tuli <[email protected]>
bfineran
approved these changes
Sep 21, 2023
Merged
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
streamingas a boolean flag as an input which then toggles the classstreamingflagGeneratedTextwhich also includes whether or not the stream is complete with thefinishflagTesting:
Locally Testing the following pipeline runs, with and without streaming:
Without streaming:
Output:
With streaming:
Output: