Skip to content

Fuse Attention For One Input bert-base-dynamic Model#3850

Merged
liuziyue merged 4 commits intomasterfrom
ziyl/attention
May 7, 2020
Merged

Fuse Attention For One Input bert-base-dynamic Model#3850
liuziyue merged 4 commits intomasterfrom
ziyl/attention

Conversation

@liuziyue
Copy link
Contributor

@liuziyue liuziyue commented May 6, 2020

Description:
Fuse attention node for one input bert models.

  • Remove mask input data type check and cast mask input when it's not int32
  • Match new mask node pattern

Motivation and Context

  • Why is this change required? What problem does it solve?

This change will help fuse attention node for better bert optimization.

@liuziyue liuziyue requested a review from a team as a code owner May 6, 2020 21:35
@liuziyue liuziyue requested a review from tianleiwu May 6, 2020 21:49
@tianleiwu
Copy link
Contributor

Please add test cases

@tianleiwu tianleiwu added the model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc. label May 7, 2020
@liuziyue liuziyue merged commit 914aaaa into master May 7, 2020
@liuziyue liuziyue deleted the ziyl/attention branch May 7, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants