Skip to content
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

[ORT] Improve dummy mask & add tips for attention fusion in the doc #1640

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

JingyaHuang
Copy link
Contributor

@JingyaHuang JingyaHuang commented Jan 10, 2024

What does this PR do?

  • Improve the creation of dummy mask tensors (to avoid accuracy off issue)
  • Add tips for ORT attention fusion

More context here: microsoft/onnxruntime#18945

@JingyaHuang JingyaHuang requested a review from fxmarty January 10, 2024 16:50
Copy link
Contributor

@fxmarty fxmarty left a comment

Choose a reason for hiding this comment

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

LGTM

framework: str = "pt",
int_dtype: str = "int64",
float_dtype: str = "fp32",
padding_side: str = "right",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather have this padding_side in the init in order to keep the same signature for all the generate methods, but it does not matter too much

@JingyaHuang JingyaHuang merged commit 7a8c563 into huggingface:main Jan 11, 2024
45 of 46 checks passed
@JingyaHuang JingyaHuang deleted the ort-opt-attn-fusion branch January 11, 2024 09:31
echarlaix pushed a commit that referenced this pull request Jan 19, 2024
…1640)

* improve dummy mask

* apply suggestion and fix

---------

Co-authored-by: JingyaHuang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants