-
Notifications
You must be signed in to change notification settings - Fork 240
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
Added ignored RoPE block #3049
Merged
alexsu52
merged 6 commits into
openvinotoolkit:develop
from
KodiaqQ:nm/ignored_rope_block
Nov 6, 2024
Merged
Added ignored RoPE block #3049
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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
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
31 changes: 31 additions & 0 deletions
31
tests/openvino/native/data/2024.4/reference_graphs/quantized/RoPEModel.dot
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
strict digraph { | ||
"0 position_ids" [id=0, type=Parameter]; | ||
"1 Unsqueeze_3697" [id=1, type=Unsqueeze]; | ||
"2 convert" [id=2, type=Convert]; | ||
"3 MatMul" [id=3, type=MatMul]; | ||
"4 transpose" [id=4, type=Transpose]; | ||
"5 concat" [id=5, type=Concat]; | ||
"6 cos" [id=6, type=Cos]; | ||
"7 sin" [id=7, type=Sin]; | ||
"8 cos_result" [id=8, type=Result]; | ||
"9 sin_result" [id=9, type=Result]; | ||
"10 transpose/Constant_3703" [id=10, type=Constant]; | ||
"11 unsqueeze/Constant_3696" [id=11, type=Constant]; | ||
"12 broadcast" [id=12, type=Broadcast]; | ||
"13 broadcast/Constant_3700" [id=13, type=Constant]; | ||
"14 broadcast/Constant_3699" [id=14, type=Constant]; | ||
"0 position_ids" -> "1 Unsqueeze_3697" [label="[1, 10]", style=solid]; | ||
"1 Unsqueeze_3697" -> "2 convert" [label="[1, 1, 10]", style=solid]; | ||
"2 convert" -> "3 MatMul" [label="[1, 1, 10]", style=solid]; | ||
"3 MatMul" -> "4 transpose" [label="[1, 5, 10]", style=solid]; | ||
"4 transpose" -> "5 concat" [label="[1, 10, 5]", style=solid]; | ||
"5 concat" -> "6 cos" [label="[1, 10, 5]", style=solid]; | ||
"5 concat" -> "7 sin" [label="[1, 10, 5]", style=solid]; | ||
"6 cos" -> "8 cos_result" [label="[1, 10, 5]", style=solid]; | ||
"7 sin" -> "9 sin_result" [label="[1, 10, 5]", style=solid]; | ||
"10 transpose/Constant_3703" -> "4 transpose" [label="[3]", style=dashed]; | ||
"11 unsqueeze/Constant_3696" -> "1 Unsqueeze_3697" [label="[]", style=dashed]; | ||
"12 broadcast" -> "3 MatMul" [label="[1, 5, 1]", style=solid]; | ||
"13 broadcast/Constant_3700" -> "12 broadcast" [label="[3]", style=dashed]; | ||
"14 broadcast/Constant_3699" -> "12 broadcast" [label="[1, 5, 1]", style=solid]; | ||
} |
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.
Could you explain why this pattern is not relevant for other backends?
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.
There are no examples of this pattern in other backends. I can not add this for ONNX/PT since I have no models with this structure from these frameworks.
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.
What models did you use for testing the RoPE pattern for OV backend? If source models are PyTorch models you can reuse them to specify RoPE pattern for ONNX/PT backends.
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 don't know who would need this, but OK.
I've set PR to draft until other backends are covered.
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.
Added patterns with the corresponding tests as you asked. Need to properly review it, since I've had to create it without strong ONNX/PT research due to lack of time.
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.
On which models have you tested the pattern?
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.
For OV backend: phi-3, llama2-3.