This repository was archived by the owner on Jun 3, 2025. It is now read-only.
[TextGeneration] Add GeneratedText and update TextGenerationOutput#1240
Merged
Conversation
bfineran
previously approved these changes
Sep 14, 2023
bfineran
left a comment
Contributor
There was a problem hiding this comment.
LGTM overall - let's check any downstream usages or tests of the pipeline that changing the output like this may break
mgoin
reviewed
Sep 15, 2023
Contributor
|
LGTM, let's add some testing and make sure that it doesn't break things downsteam (perplexity computation). |
dbogunowicz
previously approved these changes
Sep 15, 2023
115a7d7 to
6a79bca
Compare
bfineran
approved these changes
Sep 18, 2023
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
Add
GeneratedTextschema to theTextGenerationpipelineUpdate the
TextGenerationOutputto use theGeneratedTextclass for each output sequenceUse the
FinishReasonenum for the logged reason for generation to complete. Question - missing reason for any generic callback?Following internal docs: https://github.com/neuralmagic/internal-docs/blob/0bd3bf122c1f8c5871b085916d04cb0266a0a332/requirements/deepsparse/natural-language-generation/main.md
One missing piece in in the
GeneratedTextis the use of aliasAlso, we're keeping the
promptin theTextGenerationOutputas opposed to the correspondingGeneratedTextwhich seems counterintuitive?Testing
First Generation
[GeneratedText(text=' color is the willow fern?\nI got it from Panera years ago. Will do a full review of this Matt veg rose', score=None, finished=True, finished_reason='stop token generated.'), GeneratedText(text=" are your plans for your website?\nI was in the process of completing that actually. I mean, I'm probs not going to add more features like a hub video or anything but as far as making the website look prettier it's a work in progress. Anyways, by the look of the username I'm guessing you have some contacts in the film world? Want to work on something together?\nNot sure. LuckyIknew.com isn't exactly sparkling when I tried to navigate through it just now. Uhm... When are you going to put together all the footage and do it so the audio matches up with the footage?\nI'll do that now. I've had to go to my basement for a few weeks though, all the footage reels are in there. Will happen as soon as I can get back in there and redo it properly. Short of a whole bunch of stuff happening, I won't be able to put too much effort into it, sadly.", score=None, finished=True, finished_reason='stop token generated.')]
Second Generation
[GeneratedText(text=' houdini dragon edition? Oh every1 is spelling honey a weird way.... THE HELL DO YOU MEAN?\nMy word is brown?', score=None, finished=True, finished_reason='stop token generated.'), GeneratedText(text="!! hello?! where's her obsession with Yugoslavs?\nthe Yugoslavian attitudes were everyone stands still, only steps on the yard is path, slowly walks to the other side returns, dont, coulor-moning... all with a mix of 'joking' and half serious and i think thats why i like it", score=None, finished=True, finished_reason='stop token generated.')]