-
Notifications
You must be signed in to change notification settings - Fork 140
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
[KV Cache Injection] Causal Mask for CodeGen #1676
Merged
dbogunowicz
merged 5 commits into
feature/damian/refactor_injection
from
feature/damian/causal_mask_codegen
Jul 25, 2023
Merged
[KV Cache Injection] Causal Mask for CodeGen #1676
dbogunowicz
merged 5 commits into
feature/damian/refactor_injection
from
feature/damian/causal_mask_codegen
Jul 25, 2023
Conversation
This file contains 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
dbogunowicz
changed the title
[WiP] [CodeGen][Causal Mask]
[KV Cache Injection] Causal Mask for CodeGen
Jul 20, 2023
dbogunowicz
changed the base branch from
main
to
feature/damian/refactor_injection
July 20, 2023 06:41
…causal_mask_codegen
dbogunowicz
changed the base branch from
feature/damian/refactor_injection
to
main
July 20, 2023 06:48
dbogunowicz
changed the base branch from
main
to
feature/damian/refactor_injection
July 20, 2023 06:48
dbogunowicz
changed the base branch from
feature/damian/refactor_injection
to
main
July 20, 2023 07:49
dbogunowicz
changed the base branch from
main
to
feature/damian/refactor_injection
July 20, 2023 07:50
bfineran
reviewed
Jul 25, 2023
@@ -1174,3 +1177,41 @@ def detach(x: Union[torch.Tensor, List, Tuple]): | |||
return tuple([detach(e) for e in x]) | |||
else: | |||
raise ValueError("Unexpected type to detach") | |||
|
|||
|
|||
def adjust_quantization_for_onnx_export(module: torch.nn.Module) -> torch.nn.Module: |
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.
this needs rebase
bfineran
approved these changes
Jul 25, 2023
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 pending rebase
bfineran
pushed a commit
that referenced
this pull request
Jul 27, 2023
…1677) * initial commit * [KV Cache Injection] Causal Mask for CodeGen (#1676) * initial implementation; testing now * fix a small blunder * cleanup --------- Co-authored-by: bogunowicz@arrival.com <bogunowicz@arrival.com> * [KV Cache Injection] Causal Mask for OPT (#1688) * initial implementation; testing now * fix a small blunder * cleanup * initial implementation * on to testing with deepsparse --------- Co-authored-by: bogunowicz@arrival.com <bogunowicz@arrival.com> * replace boolean causal mask for int64 causal mask * better logging info * allow transformations to be also a list --------- Co-authored-by: bogunowicz@arrival.com <bogunowicz@arrival.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR:
AdditionalTransforms
objects, so that theAdditionalTransformsBase
is to share more and more helper methods that can be shared across its children classes and reduce boilerplate code. This process will be continued with the incoming causal mask injections for other LLMsFor testing please refer to: neuralmagic/deepsparse#1127