-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Enable Sentence Transformer Inference with Intel Gaudi2 GPU Supported ( 'hpu' ) - Follow up for #2557 #2630
Merged
tomaarsen
merged 15 commits into
UKPLab:master
from
ZhengHongming888:intel_gaudi_inference_revision
May 13, 2024
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ebd7ec8
revision for padding argument and truncate dim test
ZhengHongming888 33685e8
Merge branch 'UKPLab:master' into intel_gaudi_inference_revision
ZhengHongming888 d741ccb
Merge branch 'UKPLab:master' into intel_gaudi_inference_revision
ZhengHongming888 b2ea7f0
Merge branch 'UKPLab:master' into intel_gaudi_inference_revision
ZhengHongming888 8cfeb5e
add new padding for hpu graph mode
ZhengHongming888 e3df830
ruff format
ZhengHongming888 7c83ad7
Return dict encoding rather than BatchEncoding for CLIPModel
tomaarsen 1734dd6
Remove unused import
tomaarsen 5e250d8
Merge branch 'UKPLab:master' into intel_gaudi_inference_revision
ZhengHongming888 bb6260b
remove padding argument
ZhengHongming888 ed9df11
modify the graph enable position
ZhengHongming888 e7b1ecf
ruff format
ZhengHongming888 a33363b
add check for optimum install
ZhengHongming888 02d4382
ruff format
ZhengHongming888 cc8b7e9
Simplify tokenization
tomaarsen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
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.
I would prefer this, could you verify if that works? Admittedly, I'm not sure why you have to copy these.
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.
In order to support the PR (test_encode_truncate() under tests/test_sentence_transformer) #2573, we need the code here. The reason is in original implementation of out_features = self.forward(features) the variables of features/out_features are using one single memory and out_features just adding additional key ("sentence_embedding"). When later on done with Dim_truncate there will be some error in hpu's graph mode because graph mode will take the original output as one reference.
I think what you changed here is good for simplicity.