Skip to content

Commit f43cf97

Browse files
committed
docs: update memory usage documentation
1 parent f217246 commit f43cf97

1 file changed

Lines changed: 98 additions & 19 deletions

File tree

docs/docs/02-benchmarks/memory-usage.md

Lines changed: 98 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,91 @@
22
title: Memory Usage
33
---
44

5+
## Classification
6+
57
:::info
6-
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12 (Android).
8+
Memory usage values represent the peak memory increase observed while the model was
9+
loaded and actively running inference, relative to the baseline app memory
10+
before model initialization.
711
:::
812

9-
## Classification
10-
11-
| Model | Android (XNNPACK) [MB] | iOS (Core ML) [MB] |
12-
| ----------------- | :--------------------: | :----------------: |
13-
| EFFICIENTNET_V2_S | 230 | 87 |
13+
| Model / Device | iPhone 17 Pro [MB] | Google Pixel 10 [MB] |
14+
| -------------------------------- | :----------------: | :------------------: |
15+
| EFFICIENTNET_V2_S (XNNPACK FP32) | 101 | 122 |
16+
| EFFICIENTNET_V2_S (XNNPACK INT8) | 62 | 78 |
17+
| EFFICIENTNET_V2_S (Core ML FP32) | 101 | - |
18+
| EFFICIENTNET_V2_S (Core ML FP16) | 87 | - |
1419

1520
## Object Detection
1621

17-
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
18-
| ------------------------------ | :--------------------: | :----------------: |
19-
| SSDLITE_320_MOBILENET_V3_LARGE | 164 | 132 |
22+
:::info
23+
Memory usage values represent the peak memory increase observed while the model was
24+
loaded and actively running inference, relative to the baseline app memory
25+
before model initialization.
26+
:::
27+
28+
| Model / Device | iPhone 17 Pro [MB] | Google Pixel 10 [MB] |
29+
| --------------------------------------------- | :----------------: | :------------------: |
30+
| SSDLITE_320_MOBILENET_V3_LARGE (XNNPACK FP32) | 94 | 104 |
31+
| SSDLITE_320_MOBILENET_V3_LARGE (Core ML FP32) | 83 | - |
32+
| SSDLITE_320_MOBILENET_V3_LARGE (Core ML FP16) | 62 | - |
2033

2134
## Style Transfer
2235

23-
| Model | Android (XNNPACK) [MB] | iOS (Core ML) [MB] |
24-
| ---------------------------- | :--------------------: | :----------------: |
25-
| STYLE_TRANSFER_CANDY | 1200 | 380 |
26-
| STYLE_TRANSFER_MOSAIC | 1200 | 380 |
27-
| STYLE_TRANSFER_UDNIE | 1200 | 380 |
28-
| STYLE_TRANSFER_RAIN_PRINCESS | 1200 | 380 |
36+
:::info
37+
Memory usage values represent the peak memory increase observed while the model was
38+
loaded and actively running inference, relative to the baseline app memory
39+
before model initialization.
40+
:::
41+
42+
| Model / Device | iPhone 17 Pro [MB] | Google Pixel 10 [MB] |
43+
| ------------------------------------------- | :----------------: | :------------------: |
44+
| STYLE_TRANSFER_CANDY (XNNPACK FP32) | 1200 | 1200 |
45+
| STYLE_TRANSFER_CANDY (XNNPACK INT8) | 800 | 800 |
46+
| STYLE_TRANSFER_CANDY (Core ML FP32) | 400 | - |
47+
| STYLE_TRANSFER_CANDY (Core ML FP16) | 380 | - |
48+
| STYLE_TRANSFER_MOSAIC (XNNPACK FP32) | 1200 | 1200 |
49+
| STYLE_TRANSFER_MOSAIC (XNNPACK INT8) | 800 | 800 |
50+
| STYLE_TRANSFER_MOSAIC (Core ML FP32) | 400 | - |
51+
| STYLE_TRANSFER_MOSAIC (Core ML FP16) | 380 | - |
52+
| STYLE_TRANSFER_UDNIE (XNNPACK FP32) | 1200 | 1200 |
53+
| STYLE_TRANSFER_UDNIE (XNNPACK INT8) | 800 | 800 |
54+
| STYLE_TRANSFER_UDNIE (Core ML FP32) | 400 | - |
55+
| STYLE_TRANSFER_UDNIE (Core ML FP16) | 380 | - |
56+
| STYLE_TRANSFER_RAIN_PRINCESS (XNNPACK FP32) | 1200 | 1200 |
57+
| STYLE_TRANSFER_RAIN_PRINCESS (XNNPACK INT8) | 800 | 800 |
58+
| STYLE_TRANSFER_RAIN_PRINCESS (Core ML FP32) | 400 | - |
59+
| STYLE_TRANSFER_RAIN_PRINCESS (Core ML FP16) | 380 | - |
2960

3061
## OCR
3162

63+
:::info
64+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
65+
(Android).
66+
:::
67+
3268
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
3369
| ------------------------------------ | :--------------------: | :----------------: |
3470
| Detector (CRAFT) + Recognizer (CRNN) | 1400 | 1320 |
3571

3672
## Vertical OCR
3773

74+
:::info
75+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
76+
(Android).
77+
:::
78+
3879
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
3980
| ------------------------------------ | :--------------------: | :----------------: |
4081
| Detector (CRAFT) + Recognizer (CRNN) | 1000-1600 | 1000-1500 |
4182

4283
## LLMs
4384

85+
:::info
86+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
87+
(Android).
88+
:::
89+
4490
| Model | Android (XNNPACK) [GB] | iOS (XNNPACK) [GB] |
4591
| --------------------- | :--------------------: | :----------------: |
4692
| LLAMA3_2_1B | 3.3 | 3.1 |
@@ -52,12 +98,22 @@ All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12 (A
5298

5399
## Speech to text
54100

101+
:::info
102+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
103+
(Android).
104+
:::
105+
55106
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
56107
| ------------ | :--------------------: | :----------------: |
57108
| WHISPER_TINY | 410 | 375 |
58109

59110
## Text to speech
60111

112+
:::info
113+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
114+
(Android).
115+
:::
116+
61117
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
62118
| ------------- | :--------------------: | :----------------: |
63119
| KOKORO_SMALL | 820 | 820 |
@@ -69,6 +125,11 @@ The reported memory usage values include the memory footprint of the Phonemis pa
69125

70126
## Text Embeddings
71127

128+
:::info
129+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
130+
(Android).
131+
:::
132+
72133
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
73134
| -------------------------- | :--------------------: | :----------------: |
74135
| ALL_MINILM_L6_V2 | 95 | 110 |
@@ -79,14 +140,27 @@ The reported memory usage values include the memory footprint of the Phonemis pa
79140

80141
## Image Embeddings
81142

82-
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
83-
| --------------------------- | :--------------------: | :----------------: |
84-
| CLIP_VIT_BASE_PATCH32_IMAGE | 345 | 340 |
143+
:::info
144+
Memory usage values represent the peak memory increase observed while the model was
145+
loaded and actively running inference, relative to the baseline app memory
146+
before model initialization.
147+
:::
148+
149+
| Model / Device | iPhone 17 Pro [MB] | Google Pixel 10 [MB] |
150+
| ------------------------------------------ | :----------------: | :------------------: |
151+
| CLIP_VIT_BASE_PATCH32_IMAGE (XNNPACK FP32) | 340 | 345 |
85152

86153
## Semantic Segmentation
87154

155+
:::info
156+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
157+
(Android).
158+
:::
159+
88160
:::warning
89-
Data presented in the following sections is based on inference with non-resized output. When resize is enabled, expect higher memory usage and inference time with higher resolutions.
161+
Data presented in the following sections is based on inference with non-resized
162+
output. When resize is enabled, expect higher memory usage and inference time
163+
with higher resolutions.
90164
:::
91165

92166
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
@@ -95,6 +169,11 @@ Data presented in the following sections is based on inference with non-resized
95169

96170
## Text to image
97171

172+
:::info
173+
All the below benchmarks were performed on iPhone 17 Pro (iOS) and OnePlus 12
174+
(Android).
175+
:::
176+
98177
| Model | Android (XNNPACK) [MB] | iOS (XNNPACK) [MB] |
99178
| --------------------- | ---------------------- | ------------------ |
100179
| BK_SDM_TINY_VPRED_256 | 2400 | 2400 |

0 commit comments

Comments
 (0)