fxmarty/20220911-h15m48s16_
By fxmarty · ↓ 0 · ♥ 0 · Updated 2022-09-11
What's in this repo
This page lists the files in fxmarty/20220911-h15m48s16_, including model.onnx, quantized_model.onnx and more.
- 9 ONNX models (.onnx files)
- 29 files, including 11 .json, 9 .onnx, 1 .md, 1 .1, 1 .2, 1 .3
- Last updated 2022-09-11
ONNX files
| File | Size | Download |
|---|---|---|
| 20220911-h15m49s08_0/model.onnx | — | Download |
| 20220911-h15m49s08_0/quantized_model.onnx | — | Download |
| 20220911-h15m49s45_1/model.onnx | — | Download |
| 20220911-h15m49s45_1/quantized_model.onnx | — | Download |
| 20220911-h15m50s20_2/model.onnx | — | Download |
| 20220911-h15m50s20_2/quantized_model.onnx | — | Download |
| 20220911-h15m50s55_3/model.onnx | — | Download |
| 20220911-h15m50s55_3/quantized_model.onnx | — | Download |
| 20220911-h15m51s28_4/model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
task: text-classification
Backend: sagemaker-training
Backend args: {'instance_type': 'ml.m5.2xlarge', 'supported_instructions': 'avx512'}
Number of evaluation samples: All dataset
Fixed parameters:
- dataset: [{'path': 'glue', 'eval_split': 'validation', 'data_keys': {'primary': 'sentence'}, 'ref_keys': ['label'], 'name': 'sst2', 'calibration_split': None}]
- name_or_path:
distilbert-base-uncased-finetuned-sst-2-english - from_transformers:
True - quantization_approach:
dynamic - node_exclusion:
[]
Benchmarked parameters:
- framework:
onnxruntime,pytorch - operators_to_quantize:
['Add', 'MatMul'],['Add'] - per_channel:
False,True - framework_args:
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4},{} - apply_quantization:
True,False
Evaluation
Non-time metrics
| framework | operators_to_quantize | per_channel | framework_args | apply_quantization | accuracy | |
|---|---|---|---|---|---|---|
onnxruntime |
None |
None |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
False |
| | 0.911 |
onnxruntime |
['Add', 'MatMul'] |
False |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 0.898 |
onnxruntime |
['Add', 'MatMul'] |
True |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 0.490 |
onnxruntime |
['Add'] |
False |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 0.911 |
onnxruntime |
['Add'] |
True |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 0.911 |
pytorch |
None |
None |
{} |
None |
| | 0.911 |
Time metrics
Time benchmarks were run for 15 seconds per config.
Below, time metrics for batch size = 1, input length = 224.
| framework | operators_to_quantize | per_channel | framework_args | apply_quantization | latency_mean (ms) | throughput (/s) | ||
|---|---|---|---|---|---|---|---|---|
onnxruntime |
None |
None |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
False |
| | 83.23 | | | 12.07 |
onnxruntime |
['Add', 'MatMul'] |
False |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 64.31 | | | 15.60 |
onnxruntime |
['Add', 'MatMul'] |
True |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 64.78 | | | 15.47 |
onnxruntime |
['Add'] |
False |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 82.63 | | | 12.13 |
onnxruntime |
['Add'] |
True |
{'opset': 13, 'optimization_level': 1, 'intra_op_num_threads': 4} |
True |
| | 83.82 | | | 11.93 |
pytorch |
None |
None |
{} |
None |
| | 84.34 | | | 11.87 |
Model info
Created: 2022-09-11
Updated: 2022-09-11
View on Hugging Face