This repository was archived by the owner on Jun 3, 2025. It is now read-only.
[Text Generation][KVCacheStorage] TextGenerationPipeline refactor#1254
Merged
Conversation
…ralmagic/deepsparse into feature/damian/chat_pipeline
dbogunowicz
commented
Sep 20, 2023
| streamer.end() | ||
|
|
||
| if self._debug: | ||
| self._debug = dict(kv_cache=session) |
Contributor
Author
There was a problem hiding this comment.
purely for testing purposes
Contributor
There was a problem hiding this comment.
even for debug we won't want to update state at runtime, we should attach this to the returned output schema if possible (does not need to be part of the schema)
TextGenerationPipeline refactor
rahul-tuli
reviewed
Sep 20, 2023
rahul-tuli
left a comment
Member
There was a problem hiding this comment.
The refactor looks much nicer than original code! GG!
bfineran
reviewed
Sep 20, 2023
| streamer.end() | ||
|
|
||
| if self._debug: | ||
| self._debug = dict(kv_cache=session) |
Contributor
There was a problem hiding this comment.
even for debug we won't want to update state at runtime, we should attach this to the returned output schema if possible (does not need to be part of the schema)
Satrat
reviewed
Sep 21, 2023
rahul-tuli
approved these changes
Sep 21, 2023
Satrat
approved these changes
Sep 21, 2023
Contributor
|
failures look unrelated - merging |
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.
As agreed with the team, the old design for
KVCacheSessionStoragewas ugly, given the series of recent refactors.The goal of this PR is to decouple the
DecoderKVCachefrom theNLDecoderEngine. This will allow us to implement the upcomingChatPipeline(TextGenerationPipeline)much more cleanly.This is roughly the design envisioned:
Testing:
test_text_generation.py