Skip to content

Commit

Permalink
Add SDPA to scope overrides (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-savelyevv authored Nov 4, 2024
1 parent 74d2161 commit a46ec67
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
"activations": {
"{re}.*matmul_0": {
"mode": "symmetric"
},
"{re}.*scaled_dot_product_attention_0": {
"mode": "symmetric"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"activations": {
"{re}.*matmul_0": {
"mode": "symmetric"
},
"{re}.*scaled_dot_product_attention_0": {
"mode": "symmetric"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@
"num_bn_adaptation_samples": 200
}
},
"scope_overrides": {"activations": {"{re}.*matmul_0": {"mode": "symmetric"}}},
"scope_overrides": {
"activations": {
"{re}.*matmul_0": {
"mode": "symmetric"
},
"{re}.*scaled_dot_product_attention_0": {
"mode": "symmetric"
}
}
},
"ignored_scopes": [
"{re}.*__add___[0-1]",
"{re}.*layer_norm_0",
Expand Down
7 changes: 6 additions & 1 deletion optimum/intel/openvino/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@
"range": {"num_init_samples": 300, "type": "mean_min_max"},
"batchnorm_adaptation": {"num_bn_adaptation_samples": 0},
},
"scope_overrides": {"activations": {"{re}.*matmul_0": {"mode": "symmetric"}}},
"scope_overrides": {
"activations": {
"{re}.*matmul_0": {"mode": "symmetric"},
"{re}.*scaled_dot_product_attention_0": {"mode": "symmetric"},
}
},
"ignored_scopes": [
"{re}.*Embedding.*",
"{re}.*add___.*",
Expand Down

0 comments on commit a46ec67

Please sign in to comment.