-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📶 Make engine optional to simplify the default user config (#707)
## Describe your changes Make engine optional to simplify the default user config ## Checklist before requesting a review - [ ] Add unit tests for this change. - [ ] Make sure all tests can pass. - [ ] Update documents if necessary. - [ ] Lint and apply fixes to your code by running `lintrunner -a` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. ## (Optional) Issue link
- Loading branch information
Showing
6 changed files
with
115 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"input_model":{ | ||
"type": "PyTorchModel", | ||
"config": { | ||
"hf_config": { | ||
"model_name": "Intel/bert-base-uncased-mrpc", | ||
"task": "text-classification", | ||
"dataset": { | ||
"data_name":"glue", | ||
"subset": "mrpc", | ||
"split": "validation", | ||
"input_cols": ["sentence1", "sentence2"], | ||
"label_cols": ["label"], | ||
"batch_size": 1 | ||
} | ||
}, | ||
"io_config" : { | ||
"input_names": ["input_ids", "attention_mask", "token_type_ids"], | ||
"input_shapes": [[1, 128], [1, 128], [1, 128]], | ||
"input_types": ["int64", "int64", "int64"], | ||
"output_names": ["output"], | ||
"dynamic_axes": { | ||
"input_ids": {"0": "batch_size", "1": "seq_length"}, | ||
"attention_mask": {"0": "batch_size", "1": "seq_length"}, | ||
"token_type_ids": {"0": "batch_size", "1": "seq_length"} | ||
} | ||
} | ||
} | ||
}, | ||
"systems": { | ||
"local_system": {"type": "LocalSystem"} | ||
}, | ||
"passes": { | ||
"conversion": { | ||
"type": "OnnxConversion", | ||
"config": { | ||
"target_opset": 13 | ||
} | ||
}, | ||
"transformers_optimization": { | ||
"type": "OrtTransformersOptimization", | ||
"disable_search": true, | ||
"config": {"model_type": "bert"} | ||
}, | ||
"quantization": { | ||
"type": "OnnxQuantization", | ||
"config": { | ||
"data_config": "__input_model_data_config__" | ||
} | ||
}, | ||
"perf_tuning": { | ||
"type": "OrtPerfTuning", | ||
"config": { | ||
"input_names": ["input_ids", "attention_mask", "token_type_ids"], | ||
"input_shapes": [[1, 128], [1, 128], [1, 128]], | ||
"input_types": ["int64", "int64", "int64"] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters