Skip to content

Commit 047c436

Browse files
style edits
1 parent e2805c9 commit 047c436

8 files changed

Lines changed: 27 additions & 27 deletions

File tree

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/1-what-is-model-explorer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Model Explorer uses adapters and data providers to load formats beyond the built
1616

1717
## What you will do
1818

19-
This Learning Path is about model artifacts, not model training or export. You'll start from small pre-generated files and use each to gain an understanding of when you'd use Model Explorer, and what insights you can gain.
19+
This Learning Path is about model artifacts, not model training or export. You'll start from small pre-generated files and use each to understand when you'd use Model Explorer, and what insights you can gain.
2020

2121
You'll use the following artifacts:
2222

@@ -28,7 +28,7 @@ You'll use the following artifacts:
2828
| `.etrecord` | ETRecord adapter in the ExecuTorch extension | Export-time profiling context | Graph structure, debug handles, operator names, and delegate metadata used to map runtime events back to graph nodes |
2929
| `.etdp` | ETDump data provider in the ExecuTorch extension | Runtime trace overlay | Timing data from a specific execution |
3030

31-
You'll focuses on Arm adapters and extensions for Model Explorer, but the artifacts repository also includes `.tflite` and `.pt2` files. You can optionally try these files because Model Explorer supports them without an additional adapter.
31+
You'll focus on Arm adapters and extensions for Model Explorer, but the artifacts repository also includes `.tflite` and `.pt2` files. You can optionally try these files because Model Explorer supports them without an additional adapter.
3232

3333
{{% notice Note %}}
3434
Model Explorer visualizes the specific artifact you generated or received. Small differences in the target the model has been delegated to can result in a very different model graph. For example, delegating the same model to an Ethos-U55, might produce a very different model graph from delegating to an Ethos-U85.
@@ -101,7 +101,7 @@ The following is a glossary of different terms used in this Learning Path:
101101
| Compiler | A tool that transforms an intermediate representation into a lower-level target representation, such as Vela compiling TOSA for Ethos-U. |
102102
| Lower | To transform a model or graph from a higher-level representation into a lower-level representation closer to a target backend. |
103103
| Convert | To change one artifact format into another, such as TOSA to VGF. |
104-
| Intermediate representation | A representation between the original model and the final target artifact. TOSA is the main intermediate representation in this learning path. |
104+
| Intermediate representation | A representation between the original model and the final target artifact. TOSA is the main intermediate representation in this Learning Path. |
105105
| Delegate | A backend-specific execution path that handles supported parts of a graph. Unsupported parts can remain outside the delegate, and can run on a CPU path only when the deployed runtime includes compatible kernels. |
106106
| Kernel | The code that executes a model operator for a specific runtime or backend, such as a portable ExecuTorch kernel or a CMSIS-NN kernel. |
107107
| Flatbuffer | A compact binary serialization format. TOSA flatbuffers store TOSA graphs; `.pte` files use a FlatBuffer-based ExecuTorch program format. |

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/2-install-and-open-pte.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ model-explorer
103103
{{< /tab >}}
104104
{{< /tabpane >}}
105105

106-
Use `CTRL + C` to stop Model Explorer.
106+
Press `Ctrl+C` to stop Model Explorer.
107107

108108
{{% notice Note %}}
109109
If you're interested in a specific model format or a particular target, skip to the appropriate section.
@@ -121,19 +121,19 @@ CMSIS-NN exists to make common ML operations such as convolutions, fully connect
121121
The Cortex-M backend is a work-in-progress proof of concept. It's not intended for production use, and APIs might change without notice. However, the `.pte` is pre-generated for you in the provided repository. To learn more about the Cortex-M backend, see the [Cortex-M Backend Documentation](https://docs.pytorch.org/executorch/1.2/backends/arm-cortex-m/arm-cortex-m-overview.html), which also links to a Jupyter Notebook.
122122
{{% /notice %}}
123123

124-
In the Model Explorer UI, open `ml-model-artifacts/pte/mv2_cortex_m.pte`.
124+
In Model Explorer, open `ml-model-artifacts/pte/mv2_cortex_m.pte`.
125125

126126
Your view in the browser should appear as follows:
127127

128128
![Screenshot of Model Explorer with Arm Adapters and a loaded Cortex-M PTE.#center](model_explorer.png "Model Explorer with Arm Adapters")
129129

130-
Select `View selected models`, and your view should appear as follows:
130+
Select **View selected models**, and your view should appear as follows:
131131

132132
![Screenshot of top-level view in Model Explorer of a loaded Cortex-M PTE.#center](cortex_m_top.png "Typical top-level graph view in Model Explorer")
133133

134-
A right-hand bar tells you the graph info, including the `op node count` and the `layer count`. The `op node count` is the number of operator nodes in the graph. The `layer count` is the number of hierarchical graph components represented in the current view, not necessarily the number of neural network layers in the original model.
134+
The graph information panel shows the **op node count** and **layer count**. The **op node count** is the number of operator nodes in the graph. The **layer count** is the number of hierarchical graph components represented in the current view, not necessarily the number of neural network layers in the original model.
135135

136-
Double click the `forward` layer to see the various operators comprising the layer. Click a specific operator — for example, `cortex_m::quantize_per_tensor`to see various attributes, as well as inputs and outputs, in the right-hand bar.
136+
Expand the `forward` layer to view its operators. Select an operator, such as `cortex_m::quantize_per_tensor`, to see its attributes, inputs, and outputs in the node information panel.
137137

138138
![Screenshot of examining a specific Cortex-M operator in Model Explorer.#center](cortex_m_inspect.png "Inspecting specific operators with Model Explorer")
139139

@@ -156,7 +156,7 @@ You might also see lower-level `.pte` execution fields in the node attributes. T
156156

157157
You don't need to memorize these internal fields. Use the fields as clues when you want to connect a visible graph node to the underlying ExecuTorch program structure.
158158

159-
Select the `eye symbol` in the top left bar to select data to view on nodes and edges. Choose the data you want to see - for example, `op node id` and `op node attributes`to include more data within the graph itself.
159+
Select the eye icon in the toolbar to open the **View on nodes** panel. Select the data you want to display, such as **Op node id** and **Op node attributes**, to show more information in the graph.
160160

161161
## What you've accomplished and what's next
162162

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/3-compare-portable-xnnpack-pte.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Compare portable and XNNPACK PTE files on Model Explorer
2+
title: Compare portable and XNNPACK PTE files with Model Explorer
33
description: Compare portable-kernel and XNNPACK PTE files in Model Explorer to identify delegated regions and work that remains on the default Cortex-A CPU path.
44

55
weight: 4
@@ -20,7 +20,7 @@ Portable kernels aren't usually the fastest CPU path. The kernels prioritize bro
2020

2121
On Arm CPUs, XNNPACK can use Arm KleidiAI micro-kernels. [KleidiAI](https://developer.arm.com/dev2/ai/kleidi-libraries) is Arm's open-source library of optimized low-level AI routines for Arm CPUs. It provides architecture-tuned compute kernels for operations such as matrix multiplication, using Arm features such as Neon, SVE2, and SME2 where supported. You do not call KleidiAI directly in this workflow; ExecuTorch delegates to XNNPACK, and XNNPACK can use KleidiAI-optimized kernels internally when the operator, data type, and hardware are supported.
2222

23-
If you are interested in understanding how SME2 can accelerate performance of ExecuTorch models, take a look at [Profile ExecuTorch models with SME2 on Arm](https://learn.arm.com/learning-paths/cross-platform/sme-executorch-profiling/).
23+
If you are interested in understanding how SME2 can accelerate performance of ExecuTorch models, see the [Profile ExecuTorch models with SME2 on Arm](https://learn.arm.com/learning-paths/cross-platform/sme-executorch-profiling/) Learning Path.
2424

2525
To summarize the different CPU paths:
2626

@@ -32,7 +32,7 @@ To summarize the different CPU paths:
3232

3333
## Compare CPU deployment artifacts
3434

35-
You'll compare two `.pte` files generated from the same Open Pre-trained Transformer (OPT)model: [`facebook/opt-125m`](https://huggingface.co/facebook/opt-125m).
35+
You'll compare two `.pte` files generated from the same Open Pre-trained Transformer (OPT) model: [`facebook/opt-125m`](https://huggingface.co/facebook/opt-125m).
3636

3737
OPT-125M is a 125-million-parameter, decoder-only transformer language model from Meta. The model is a small member of the OPT family, which makes it useful for demonstrations. OPT-125M is large enough to contain transformer operations such as embeddings, attention, linear layers, matrix multiplication, reshapes, and masking, but small enough to inspect and run on edge-class Arm systems.
3838

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/4-inspect-ethosu-pte.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Inspect Ethos-U PTE delegation on Model Explorer
2+
title: Inspect Ethos-U PTE delegation with Model Explorer
33
description: Inspect FP32 and INT8 Ethos-U PTE files in Model Explorer to identify clean, missing, and fragmented NPU delegation.
44

55
weight: 5
@@ -16,12 +16,12 @@ Model Explorer is useful because the final `.pte` shows whether the ExecuTorch p
1616

1717
Ethos-U execution is heterogeneous: supported subgraphs are delegated to the NPU, while unsupported operators remain outside the NPU delegate. Whether that remaining work can execute on the CPU depends on the kernels included in the deployed ExecuTorch runtime.
1818

19-
The PyTorch blog [Efficient Edge AI on Arm CPUs and NPUs](https://pytorch.org/blog/efficient-edge-ai-on-arm-cpus-and-npus/) describes this flow as the following:
19+
The PyTorch blog [Efficient Edge AI on Arm CPUs and NPUs](https://pytorch.org/blog/efficient-edge-ai-on-arm-cpus-and-npus/) describes the following steps:
2020

2121
- Quantizing the model
2222
- Lowering supported regions to Tensor Operator Set Architecture (TOSA)
2323
- Running Vela to produce an optimized Ethos-U command stream
24-
- Packaging the result into the final `.pte`.
24+
- Packaging the result into the final `.pte`
2525

2626
You'll inspect three MobileNetV2 artifacts in order: FP32 with no NPU delegation, INT8 with clean delegation, and INT8 with fragmented delegation.
2727

@@ -56,7 +56,7 @@ Now you'll use the same MobileNetV2 model, but quantized with the `EthosUQuantiz
5656

5757
Open `ml-model-artifacts/pte/mv2_int8_ethos_u85.pte`.
5858

59-
Inspect the graph and look for the followiing:
59+
Inspect the graph and look for the following:
6060

6161
- Whether there's an Ethos-U delegate region
6262
- Whether the NPU region is one large block or several smaller blocks
@@ -117,7 +117,7 @@ For example, an Ethos-U85 artifact doesn't provide full insight into Ethos-U55 b
117117
## (Optional) Visualize TFLite and PT2 files
118118

119119
<details>
120-
<summary>Click to reveal</summary>
120+
<summary>Show optional artifacts</summary>
121121

122122
The artifacts repository also includes MobileNetV2 `.pt2` and `.tflite` files:
123123
```output

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/6-inspect-tosa.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Inspect TOSA artifacts using Model Explorer
2+
title: Inspect TOSA artifacts with Model Explorer
33
description: Inspect TOSA graphs in Model Explorer to compare operators, tensor metadata, quantization, and graph fragmentation before backend compilation or conversion.
44

55
weight: 6
@@ -12,7 +12,7 @@ layout: "learningpathall"
1212

1313
Tensor Operator Set Architecture (TOSA) is a stable operator-level intermediate representation (IR) used between model export and backend-specific compilation or conversion.
1414

15-
Ethos-U `.pte` files files show the final ExecuTorch program after supported regions have been delegated or left outside the NPU delegate. With TOSA, you can inspect an earlier stage: the graph representation that backend tools such as Vela or the Arm ML SDK Model Converter can consume.
15+
Ethos-U `.pte` files show the final ExecuTorch program after supported regions have been delegated or left outside the NPU delegate. With TOSA, you can inspect an earlier stage: the graph representation that backend tools such as Vela or the Arm ML SDK Model Converter can consume.
1616

1717
You don't need separate TOSA artifacts for the Cortex-A portable, Cortex-A XNNPACK, or Cortex-M examples. Those routes don't need a TOSA intermediate representation: portable kernels stay in the ExecuTorch operator path, XNNPACK uses an ExecuTorch delegate for Cortex-A CPU acceleration, and Cortex-M uses its own Cortex-M/CMSIS-NN-oriented lowering path. TOSA becomes relevant for the backend routes that consume TOSA, such as Ethos-U and VGF.
1818

@@ -35,7 +35,7 @@ Open the FP32 TOSA artifact `ml-model-artifacts/tosa/mv2_fp32.tosa`.
3535
Inspect the graph and look for the following:
3636

3737
- Whether the input is in the right shape `[1, 3, 224, 224]`
38-
- Whether the output shape is `[1, 1000]`?
38+
- Whether the output shape is `[1, 1000]`
3939
- Whether the tensor types are FP32
4040
- What convolution, add, clamp, and pooling patterns are visible
4141

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/7-inspect-vgf.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Inspect VGF artifacts using Model Explorer
2+
title: Inspect VGF artifacts with Model Explorer
33
description: Compare VGF-backend PTE and standalone VGF artifacts in Model Explorer to understand ExecuTorch packaging and Vulkan backend graph structure.
44

55
weight: 7
@@ -12,7 +12,7 @@ layout: "learningpathall"
1212

1313
VGF is the artifact used by Arm ML SDK for Vulkan workflows. It's useful in workflows using the ML extensions for Vulkan, and in neural graphics applications where you need to inspect the graph consumed by the Vulkan runtime.
1414

15-
In the previous section, you inspected the TOSA artifacts for a small neural upscaling model, obtained from the [Quantize neural upscaling models with ExecuTorch](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/quantize-neural-upscaling-models/) learning path. You'll now inspect the VGF and PTE artifacts produced from that flow.
15+
In the previous section, you inspected the TOSA artifacts for a small neural upscaling model, obtained from the [Quantize neural upscaling models with ExecuTorch](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/quantize-neural-upscaling-models/) Learning Path. You'll now inspect the VGF and PTE artifacts produced from that flow.
1616

1717
Although that flow uses ExecuTorch and generates `.pte` files as well, VGF isn't ExecuTorch-specific. If you have a `.tosa` file obtained from another flow, you can convert it to `.vgf` using the Arm ML SDK Model Converter.
1818

@@ -35,7 +35,7 @@ Inspect the graph and look for the following:
3535

3636
- Whether there's a `VgfBackend` delegate node
3737
- The work that happens before and after the backend call
38-
- Whether the top-level graph show the internal upscaler operators
38+
- Whether the top-level graph shows the internal upscaler operators
3939
- What this view tells you about the ExecuTorch runtime path
4040

4141
![Screenshot of examining a VGF-backed PTE in Model Explorer.#center](ptq_vgf_pte.png "Inspecting a VGF-backed PTE with Model Explorer")
@@ -50,7 +50,7 @@ Expand the `VgfBackend` delegate graph:
5050

5151
Now, open the matched standalone VGF artifact `ml-model-artifacts/vgf/small_upscaler_ptq.vgf`.
5252

53-
You'll see they show the same view.
53+
The VGF artifact shows the same view as the `VgfBackend` delegate graph.
5454

5555
Inspect the graph and look for the following:
5656

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/8-etrecord-etdump-overlays.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Inspect ETRecord and ETDump overlays using Model Explorer
2+
title: Inspect ETRecord and ETDump overlays with Model Explorer
33
description: Overlay ETRecord and ETDump profiling data in Model Explorer to connect ExecuTorch graph nodes and delegate regions with runtime timing.
44

55
weight: 8
@@ -10,7 +10,7 @@ layout: "learningpathall"
1010

1111
## View ExecuTorch runtime profiling data
1212

13-
You've inspected static artifacts. PTE, TOSA, and VGF views to learn what was exported, lowered, compiled, converted, or packaged.
13+
PTE, TOSA, and VGF views help you learn what was exported, lowered, compiled, converted, or packaged.
1414

1515
Runtime profiling answers a different set of questions. With runtime profiling, you can learn what happened when the artifact ran on a specific runtime, runner, target hardware, and tracing configuration.
1616

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Visualize ExecuTorch, TOSA, and VGF artifacts with Google Model Explorer and Arm Extensions
2+
title: Visualize ExecuTorch, TOSA, and VGF artifacts with Google Model Explorer and Arm extensions
33

44
description: Inspect ExecuTorch PTE, TOSA, VGF, ETRecord, and ETDump model artifacts with Google Model Explorer and Arm extensions.
55

0 commit comments

Comments
 (0)