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

add deberta v1 support #221

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,5 @@ dmypy.json
# include small test model for tests
!tests/assets/onnx/model.onnx

.vscode
.vscode
.idea
Comment on lines +137 to +138
Copy link
Contributor

Choose a reason for hiding this comment

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

As it is irrelevant to the PRs, I don't recommend adding .idea.

1 change: 1 addition & 0 deletions optimum/onnxruntime/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class ORTConfigManager:
"albert": ("num_attention_heads", "hidden_size", "bert"),
"camembert": ("num_attention_heads", "hidden_size", "bert"),
"distilbert": ("n_heads", "dim", "bert"),
"deberta": ("num_attention_heads", "hidden_size", "bert"),
"deberta-v2": ("num_attention_heads", "hidden_size", "bert"),
"electra": ("num_attention_heads", "hidden_size", "bert"),
"roberta": ("num_attention_heads", "hidden_size", "bert"),
Expand Down
1 change: 1 addition & 0 deletions tests/onnxruntime/test_onnxruntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def test_optimize(self):
"gpt2",
"roberta-base",
"google/electra-small-discriminator",
"microsoft/deberta-base",
"microsoft/deberta-v3-xsmall",
}
optimization_config = OptimizationConfig(optimization_level=99, optimize_with_onnxruntime_only=False)
Expand Down