Skip to content

Comments

Add simple patterns for llama#1601

Merged
xadupre merged 32 commits intomicrosoft:mainfrom
xadupre:patts
Jun 20, 2024
Merged

Add simple patterns for llama#1601
xadupre merged 32 commits intomicrosoft:mainfrom
xadupre:patts

Conversation

@xadupre
Copy link
Member

@xadupre xadupre commented Jun 11, 2024

No description provided.

Signed-off-by: Xavier Dupre <[email protected]>
@codecov
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 78.34101% with 47 lines in your changes missing coverage. Please review.

Project coverage is 75.84%. Comparing base (8f55f50) to head (79769cf).

Files Patch % Lines
onnxscript/rewriter/llama_rule_sets.py 65.60% 36 Missing and 7 partials ⚠️
onnxscript/rewriter/llama_rule_sets_test.py 95.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1601      +/-   ##
==========================================
- Coverage   76.41%   75.84%   -0.57%     
==========================================
  Files         240      240              
  Lines       25294    25500     +206     
  Branches     4482     4540      +58     
==========================================
+ Hits        19328    19341      +13     
- Misses       5097     5269     +172     
- Partials      869      890      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Xavier Dupre <[email protected]>
xadupre added 3 commits June 11, 2024 16:35
Signed-off-by: Xavier Dupre <[email protected]>
Signed-off-by: Xavier Dupre <[email protected]>
Signed-off-by: Xavier Dupre <[email protected]>
@xadupre xadupre marked this pull request as ready for review June 12, 2024 09:10
Signed-off-by: Xavier Dupre <[email protected]>
Signed-off-by: Xavier Dupre <[email protected]>
@justinchuby
Copy link
Collaborator

For all test models, I would use onnxscript to create them when possible to establish it as the high level api for builiding onnx models.

@xadupre
Copy link
Member Author

xadupre commented Jun 13, 2024

For all test models, I would use onnxscript to create them when possible to establish it as the high level api for builiding onnx models.

I know well the onnx api but not yet onnxscript. The documentation is missing very easy example I can copy paste and change.

Signed-off-by: Xavier Dupre <[email protected]>
Comment on lines 1188 to 1196
if generic:
import onnxscript.rewriter.generic_pattern as orpp

return RewriteRule(
rule_class.pattern,
rule_class.rewrite,
rule_class.check,
orpp.GenericPatternMatcher,
name=rule_class.__name__, # type: ignore[union-attr]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am concerned about breaking this into different paths again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@xadupre xadupre merged commit ae4c67d into microsoft:main Jun 20, 2024
@xadupre xadupre assigned xadupre and unassigned justinchuby Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants