Commit
22ef881
·
verified ·
1 Parent(s): 013c20b

Sync model repo (text/metadata)

Browse files
README.md ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: bsd-3-clause
3
+ pipeline_tag: image-classification
4
+ library_name: executorch
5
+ base_model: timm/efficientnet_b4.ra2_in1k
6
+ base_model_relation: quantized
7
+ tags:
8
+ - arm
9
+ - edge-linux
10
+ - executorch
11
+ - xnnpack
12
+ - int8
13
+ - imagenet-1k
14
+ ---
15
+
16
+ # efficientnet_b4.ra2_in1k optimized for Arm-based Edge Linux
17
+
18
+ efficientnet_b4.ra2_in1k image classification model, optimized with W8A8 dynamic post-training quantization and exported as an ExecuTorch program for the XNNPACK CPU backend on Arm-based platforms.
19
+
20
+ This model was optimized using [Arm AI Model Optimizer](https://developer.arm.com/dev-docs/ai-model-optimizer/).
21
+
22
+ ## Summary
23
+
24
+ This repository contains an optimized version of timm/efficientnet_b4.ra2_in1k for image classification. The model is provided as an ExecuTorch `.pte` file using the XNNPACK with KleidiAI delegate, targeting Edge Linux systems. Precision: INT8 symmetric per-channel weights, INT8 dynamic activations.
25
+
26
+ **Key results**
27
+
28
+ | Area | Result |
29
+ |---|---|
30
+ | Model format | ExecuTorch (.pte) |
31
+ | Target device class | Edge Linux |
32
+ | Reference device | Raspberry Pi 5 (16GB) (Cortex-A76, 4 cores) |
33
+ | Primary performance result | 1.09x lower p50 latency (467.94 ms to 431.22 ms) |
34
+ | Accuracy result | Top-1 accuracy 82.74% (-0.32 pp vs. baseline) |
35
+ | Size / memory result | 3.66x smaller model (79.61 MB to 21.77 MB), 132.91 MB peak memory |
36
+
37
+ ## Original model
38
+
39
+ | Field | Value |
40
+ |---|---|
41
+ | Original model | timm/efficientnet_b4.ra2_in1k |
42
+ | Original source | Hugging Face |
43
+ | Original developer | timm |
44
+ | Original model card | [timm/efficientnet_b4.ra2_in1k](https://huggingface.co/timm/efficientnet_b4.ra2_in1k) |
45
+ | Original license | [BSD-3-Clause](https://opensource.org/license/bsd-3-clause) |
46
+
47
+ ## Model files
48
+
49
+ | File | Description |
50
+ |---|---|
51
+ | `model.pte` | Optimized INT8 ExecuTorch program for deployment |
52
+ | `metadata.yaml` | Optimized model metadata |
53
+ | `benchmarks/` | Baseline and optimized benchmark records |
54
+
55
+ ## Performance
56
+
57
+ Performance was measured on the reference configuration below. Results do not guarantee identical performance on every Arm-based system.
58
+
59
+ **Reference configuration**
60
+
61
+ | Field | Value |
62
+ |---|---|
63
+ | Device / platform | Raspberry Pi 5 (16GB) |
64
+ | CPU / accelerator | Cortex-A76, 4 cores, 2.4 GHz |
65
+ | OS | Raspberry Pi OS Bookworm |
66
+ | Runtime | ExecuTorch 1.1.0 |
67
+ | Backend / delegate | XNNPACK with KleidiAI, 4 threads |
68
+ | Batch size | 1 |
69
+ | Input resolution | 384x384 |
70
+ | Precision | INT8 symmetric per-channel weights, INT8 dynamic activations |
71
+ | Runs | 10 measured |
72
+
73
+ **Performance results**
74
+
75
+ | Metric | Original / baseline | Optimized | Improvement |
76
+ |---|---:|---:|---:|
77
+ | p50 end-to-end latency | 467.94 ms | 431.22 ms | 1.09x |
78
+ | Throughput | - | 2.32 frames/sec | - |
79
+ | Peak memory | 188.92 MB | 132.91 MB | 1.42x less |
80
+ | Model size | 79.61 MB | 21.77 MB | 3.66x smaller |
81
+
82
+ ## Accuracy
83
+
84
+ **Evaluation setup**
85
+
86
+ | Field | Value |
87
+ |---|---|
88
+ | Dataset | ImageNet-1k |
89
+ | Split | val |
90
+ | Number of samples | 5,000 |
91
+ | Evaluation runtime | ExecuTorch |
92
+
93
+ **Accuracy results**
94
+
95
+ | Metric | Original / baseline | Optimized | Change |
96
+ |---|---:|---:|---:|
97
+ | Top-1 accuracy | 83.06% | 82.74% | -0.32 pp |
98
+ | Top-5 accuracy | - | 96.72% | - |
99
+
100
+ Users should re-evaluate the model on their own data before production use.
101
+
102
+ ## Optimization approach
103
+
104
+ | Optimization area | Applied? | Notes |
105
+ |---|---|---|
106
+ | Model conversion | Yes | PyTorch model exported to ExecuTorch (.pte) |
107
+ | Quantization | Yes | INT8 symmetric per-channel weights, INT8 dynamic activations. Calibrated on 1,000 random samples (imagenet1k_calib_seed42_n1000) |
108
+ | Runtime/backend selection | Yes | XNNPACK with KleidiAI, 4 threads |
109
+ | Accuracy validation | Yes | ImageNet-1k, 5000 samples |
110
+ | Performance validation | Yes | Measured on Raspberry Pi 5 (16GB) |
111
+
112
+ ## Intended use
113
+
114
+ This model is intended for developers evaluating image classification workloads on Arm-based Edge Linux platforms. It is suitable as a reference implementation for benchmarking, prototyping, and integration exploration.
115
+
116
+ ## Limitations
117
+
118
+ - Performance depends on the target device, runtime version, backend support, memory configuration, and system load.
119
+ - Accuracy was measured on a 5,000-image subset of the ImageNet-1k validation set, not the full 50,000 images.
120
+ - This repository is not a replacement for the original model documentation.
121
+
122
+ ## About this version
123
+
124
+ Original Model:
125
+ timm/efficientnet_b4.ra2_in1k by timm - [Repository](https://huggingface.co/timm/efficientnet_b4.ra2_in1k)
126
+
127
+ Optimization/conversion:
128
+ W8A8 dynamic post-training quantization and ExecuTorch `.pte` export with XNNPACK + KleidiAI backend support for execution on Arm-based platforms.
129
+
130
+ Converted/optimized by:
131
+ Nota AI, using Arm AI Model Optimizer
132
+
133
+ License:
134
+ The Original Model and the Optimized Model are subject to [BSD-3-Clause](https://opensource.org/license/bsd-3-clause).
135
+
136
+ This repository contains a converted or optimized version of the Original Model (the "Optimized Model"). The Original Model has been converted or optimized as described above for execution on Arm-based platforms.
137
+
138
+ No retraining or fine-tuning of the Original Model was performed as part of the conversion or optimization. The conversion or optimization was not intended to change the Original Model's behavior or intended use.
139
+
140
+ ### Original Model and Documentation
141
+
142
+ For information about the Original Model, including its development, training data, intended uses, limitations and other relevant information, please refer to the [Original Model repository](https://huggingface.co/timm/efficientnet_b4.ra2_in1k). Information in that repository was provided by the original developer or other third parties and, unless expressly stated otherwise, has not been independently verified by Arm.
143
+
144
+ ### Licenses and Third-Party Terms
145
+
146
+ Use of the Original Model and the Optimized Model is subject to the applicable licenses, usage restrictions and other terms identified above and in the relevant repositories. Publication of the Optimized Model does not grant any rights beyond those provided under the applicable license terms.
147
+
148
+ You are responsible for reviewing those terms and ensuring that your use of the Original Model and the Optimized Model is permitted.
149
+
150
+ ### Purpose of this Release
151
+
152
+ The Optimized Model is provided as a reference implementation to demonstrate and evaluate execution and performance on Arm-based systems. It is not a production-ready or supported solution.
153
+
154
+ Arm's publication of the Optimized Model does not constitute an endorsement or certification of the Original Model or a representation that the Optimized Model is suitable for production use or any particular purpose.
155
+
156
+ To the fullest extent permitted by applicable law (i) the Optimized Model is provided "as is." Arm makes no representations or warranties that the Original Model, the Optimized Model or their outputs are accurate, safe, secure, non-infringing, legally compliant, suitable for production use or fit for any particular purpose; and (ii) Arm will not be liable for any loss or damage arising from or in connection with the Optimized Model, its use or its outputs.
157
+
158
+ You are responsible for independently evaluating the Optimized Model, its outputs and its suitability for your intended use, including compliance with applicable legal, regulatory, safety and security requirements.
159
+
160
+ Arm does not commit to provide ongoing support, maintenance or updates for the Optimized Model. Any use of or reliance on the Optimized Model or its outputs is at your own risk.
benchmarks/efficientnet-b4-raspberrypi5-fp32.yaml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: 1.0.0
2
+ report_type: vision-classification
3
+ profile: Baseline
4
+ created_at: '2026-06-21T16:02:16.993793Z'
5
+ context:
6
+ target_ref: raspberry-pi-5
7
+ runtime:
8
+ name: executorch
9
+ execution_backend: cpu
10
+ version: 1.1.0
11
+ config:
12
+ n_threads: 4
13
+ optimisations:
14
+ - XNNPACK
15
+ - KleidiAI
16
+ dataset:
17
+ name: ImageNet-1k
18
+ sample_count: 5000
19
+ slice: val
20
+ reference_url: https://www.image-net.org/
21
+ benchmark:
22
+ batch_size: 1
23
+ num_runs: 10
24
+ input_resolution: 384x384
25
+ performance:
26
+ end_to_end_latency_ms:
27
+ p50: 467.94
28
+ peak_memory_mb: 188.92
29
+ accuracy:
30
+ top_1_accuracy_pct: 83.06
benchmarks/efficientnet-b4-raspberrypi5-int8.yaml CHANGED
@@ -1,27 +1,8 @@
1
  version: 1.0.0
2
  report_type: vision-classification
3
- created_at: '2026-06-21T16:02:16.993793Z'
4
  profile: Arm-Optimized
 
5
  context:
6
- model:
7
- id: arm/efficientnet-b4-arm-optimized
8
- base_model_id: TBD/efficientnet-b4
9
- filename: model.pte
10
- profile: Arm-Optimized
11
- weight_dtype: int8
12
- model_size_mb: 24.29
13
- format: pte
14
- quantization:
15
- method: PTQ-dynamic
16
- weight_bits: 8
17
- activation_bits: 8
18
- symmetric: true
19
- mode: dynamic
20
- weight_granularity: per-channel
21
- calibration:
22
- dataset_name: imagenet1k_calib_seed42_n1000
23
- sample_count: 1000
24
- selection: random
25
  target_ref: raspberry-pi-5
26
  runtime:
27
  name: executorch
 
1
  version: 1.0.0
2
  report_type: vision-classification
 
3
  profile: Arm-Optimized
4
+ created_at: '2026-06-21T16:02:16.993793Z'
5
  context:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  target_ref: raspberry-pi-5
7
  runtime:
8
  name: executorch
metadata.yaml CHANGED
@@ -4,10 +4,10 @@ id: Arm/efficientnet-b4-int8-xnnpack-executorch-raspberrypi5
4
  task_type: image-classification
5
  title: EfficientNet-B4 INT8
6
  filename: model.pte
7
- base_model_id: TBD/efficientnet-b4
8
  weight_dtype: int8
9
  profile: Arm-Optimized
10
- model_size_mb: 24.29
11
  format: pte
12
  quantization:
13
  method: PTQ-dynamic
 
4
  task_type: image-classification
5
  title: EfficientNet-B4 INT8
6
  filename: model.pte
7
+ base_model_id: timm/efficientnet_b4.ra2_in1k
8
  weight_dtype: int8
9
  profile: Arm-Optimized
10
+ model_size_mb: 21.77
11
  format: pte
12
  quantization:
13
  method: PTQ-dynamic
np_recipe/calibration.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "datasets": [
3
- {
4
- "ref_id": "595edc1f-9919-4027-b23d-1436459990fa",
5
- "dataset_name": "imagenet1k_calib_seed42_n1000",
6
- "split": "CALIBRATION",
7
- "num_samples": 1000,
8
- "original_dataset_alias": "imagenet1k"
9
- }
10
- ]
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
np_recipe/evaluation.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "datasets": [
3
- {
4
- "ref_id": "384e7ec8-2e03-4f88-9c7f-f7a248ae8403",
5
- "dataset_name": "imagenet1k_eval_seed42_n5000",
6
- "split": "EVALUATION",
7
- "num_samples": 5000,
8
- "original_dataset_alias": "imagenet1k"
9
- }
10
- ]
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
np_recipe/project.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "project_id": "8c53bd22-3f4b-4b83-b9c3-2063e78c2c29",
3
- "name": "np_hpo_97c660c913",
4
- "target": {
5
- "device": "raspberry_pi_5_16gb",
6
- "runtime": "executorch",
7
- "backend": "xnnpack"
8
- },
9
- "gpu_device": "cuda:1",
10
- "base_model": {
11
- "model_id": "f1f45b7b-c443-4b94-86c2-f3e5f0bbd7aa",
12
- "alias": "efficientnet_b4_pt2_pytorch_static_fp32",
13
- "modality": "CV",
14
- "task": "CLASSIFICATION"
15
- },
16
- "calibration": {
17
- "dataset_id": "595edc1f-9919-4027-b23d-1436459990fa",
18
- "dataset_name": "imagenet1k_calib_seed42_n1000"
19
- },
20
- "evaluation": {
21
- "dataset_id": "384e7ec8-2e03-4f88-9c7f-f7a248ae8403",
22
- "dataset_name": "imagenet1k_eval_seed42_n5000"
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
np_recipe/run.detail.yaml DELETED
@@ -1,95 +0,0 @@
1
- detail:
2
- batch_size: 1
3
- gpu_device: cuda:1
4
- graph_optimize[0]:
5
- pattern_handlers:
6
- - PatternHandlerAdjustAdd
7
- - PatternHandlerAdjustNonContiguousConstantMathInput
8
- - PatternHandlerCanonicalizeConvolutionDefault
9
- - PatternHandlerCombineAddRelu
10
- - PatternHandlerCombineConvBN
11
- - PatternHandlerCombineConvBNRelu
12
- - PatternHandlerCombineConvRelu
13
- - PatternHandlerCombineConvTransposeBN
14
- - PatternHandlerCombineConvTransposeBNRelu
15
- - PatternHandlerCombineConvTransposeRelu
16
- - PatternHandlerCombineLinearRelu
17
- - PatternHandlerCombineMulRelu
18
- - PatternHandlerCommuteBNBeforeJoinOp
19
- - PatternHandlerCommuteBNBeforeLinearOp
20
- - PatternHandlerComposeErfFormulaIntoGelu
21
- - PatternHandlerComposeTanhFormulaIntoGelu
22
- - PatternHandlerDecomposeMaxDimKeepdimFalse
23
- - PatternHandlerDecomposePReluToReluMath
24
- - PatternHandlerFuseAffineInputToLinear
25
- - PatternHandlerFuseBNToConv
26
- - PatternHandlerFuseConsecutiveBatchNorm
27
- - PatternHandlerFuseConsecutiveCast
28
- - PatternHandlerFuseConsecutiveConcat
29
- - PatternHandlerFuseConsecutiveIdempotent
30
- - PatternHandlerFuseConsecutiveLogSoftmax
31
- - PatternHandlerFuseConsecutiveReshapeTranspose
32
- - PatternHandlerFuseConsecutiveSlice
33
- - PatternHandlerFuseConsecutiveUnsqueeze
34
- - PatternHandlerFuseConstantPath
35
- - PatternHandlerFuseInputScaleToConv
36
- - PatternHandlerFuseMathToConv
37
- - PatternHandlerFuseMathToLinear
38
- - PatternHandlerFusePadToConv
39
- - PatternHandlerFusePadToPool
40
- - PatternHandlerFuseReluPostfixToClamp
41
- - PatternHandlerFuseReluPrefixToClamp
42
- - PatternHandlerFuseMultiBranchReshapeTranspose
43
- - PatternHandlerFuseQKV
44
- - PatternHandlerFuseSplitConvConcat
45
- - PatternHandlerFuseUnsqueezeToReduce
46
- - PatternHandlerNormalizeSpatialMeanKeepdimFalse
47
- - PatternHandlerRemoveGraphAssertsPass
48
- - PatternHandlerRemoveBatchNormTracking
49
- - PatternHandlerRemoveCommonSubexpression
50
- - PatternHandlerRemoveDeadend
51
- - PatternHandlerRemoveDisabledAutocastWrapper
52
- - PatternHandlerRemoveDropout
53
- - PatternHandlerRemoveMonotoneBeforeRanking
54
- - PatternHandlerRemoveNoOpCast
55
- - PatternHandlerRemoveNoOpConcat
56
- - PatternHandlerRemoveNoOpExpand
57
- - PatternHandlerRemoveNoOpFlatten
58
- - PatternHandlerRemoveNoOpMath
59
- - PatternHandlerRemoveNoOpPad
60
- - PatternHandlerRemoveNoOpReshape
61
- - PatternHandlerRemoveNoOpSlice
62
- - PatternHandlerRemoveNoOpSplit
63
- - PatternHandlerRemoveNoOpSqueeze
64
- - PatternHandlerRemoveNoOpTranspose
65
- - PatternHandlerRemovePositive
66
- - PatternHandlerReplaceBatchNormWithConv
67
- - PatternHandlerReplaceBitwiseRightShiftWithDiv
68
- - PatternHandlerReplaceEinsumWithMatmul
69
- - PatternHandlerReplaceGatherWithConv
70
- - PatternHandlerReplaceGatherWithSliceReshape
71
- - PatternHandlerReplaceInplaceAdd
72
- - PatternHandlerReplaceInplaceHardswish
73
- - PatternHandlerReplaceInplaceIndexPut
74
- - PatternHandlerReplaceInplaceLeakyRelu
75
- - PatternHandlerReplaceInplaceMul
76
- - PatternHandlerReplaceInplaceRelu
77
- - PatternHandlerReplaceInplaceSilu
78
- - PatternHandlerReplaceMatmul2dWithLinear
79
- - PatternHandlerReplaceMatmul3dWithLinear
80
- - PatternHandlerReplaceMatmulWithLinear
81
- graph_quantize[0]:
82
- weight:
83
- granularity: CHANNEL
84
- calibration_method: MINMAX
85
- activation:
86
- granularity: TENSOR
87
- calibration_method: MINMAX
88
- calibration:
89
- num_samples: 128
90
- profile[0]:
91
- num_executions: 10
92
- timeout: 1800
93
- evaluate[0]:
94
- metrics:
95
- ACCURACY: {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
np_recipe/run.yaml DELETED
@@ -1,12 +0,0 @@
1
- version: '1.0'
2
- steps:
3
- - graph_optimize: null
4
- - graph_quantize:
5
- - scheme: W8-A8_dynamic
6
- automatic_mixed_precision: null
7
- profile:
8
- - OUTPUT_MODEL
9
- evaluate:
10
- - model: OUTPUT_MODEL
11
- metric:
12
- - ACCURACY