-
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
Added ignored RoPE block #3049
Conversation
@openvinotoolkit/nncf-maintainers, can someone review this, please. Thank you. |
@@ -74,6 +74,7 @@ | |||
IGNORING_IGNORED_PATTERN_REASONS = { | |||
IgnoredPatternNames.FC_BN_HSWISH_ACTIVATION: "Not relevant for Torch.", | |||
IgnoredPatternNames.EQUAL_LOGICALNOT: "Not relevant for Torch.", | |||
IgnoredPatternNames.ROPE: "Not relevant for Torch.", |
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.
|
||
|
||
@ONNX_IGNORED_PATTERNS.register(IgnoredPatternNames.ROPE) | ||
def create_rope() -> GraphPattern: |
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.
@kshpv, please review this pattern.
|
||
|
||
@PT_IGNORED_PATTERNS.register(IgnoredPatternNames.ROPE) | ||
def create_rope() -> GraphPattern: |
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.
@AlexanderDokuchaev, please review this 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.
LGTM
On top of #3049 ### Changes - As stated in the title. - Added Sin and Cos ONNX/PT operations. ### Reason for changes - Accuracy improvement for models with ModelType.TRANSFORMERS type. ### Related tickets - 155511 ### Tests - Added graph test for ONNX/PT.
On top of #3049 ### Changes - Added FP8 example. ### Reason for changes - Examples coverage. ### Related tickets - 155923 ### Tests - ubuntu test_examples 627 - passed - windows test-examples 288 - passed - GA Test examples 135 - passed --------- Co-authored-by: Alexander Kozlov <[email protected]>
On top of openvinotoolkit#3049 ### Changes - Added FP8 example. ### Reason for changes - Examples coverage. ### Related tickets - 155923 ### Tests - ubuntu test_examples 627 - passed - windows test-examples 288 - passed - GA Test examples 135 - passed --------- Co-authored-by: Alexander Kozlov <[email protected]>
On top of openvinotoolkit#3049 ### Changes - Added FP8 example. ### Reason for changes - Examples coverage. ### Related tickets - 155923 ### Tests - ubuntu test_examples 627 - passed - windows test-examples 288 - passed - GA Test examples 135 - passed --------- Co-authored-by: Alexander Kozlov <[email protected]>
On top of openvinotoolkit#3049 ### Changes - As stated in the title. - Added Sin and Cos ONNX/PT operations. ### Reason for changes - Accuracy improvement for models with ModelType.TRANSFORMERS type. ### Related tickets - 155511 ### Tests - Added graph test for ONNX/PT.
Changes
Sin
andCos
OV operations.Reason for changes
ModelType.TRANSFORMERS
type.Related tickets
Tests