Skip to content

Commit b509c92

Browse files
Gasoonjiafacebook-github-bot
authored andcommitted
update typos (#3300)
Summary: This diff solves part of Ali's comments in our tracer sheet (https://docs.google.com/spreadsheets/d/1PoJt7P9qMkFSaMmS9f9j8dVcTFhOmNHotQYpwBySydI/edit#gid=0). Specifically speaking: "NanoGPT" -> "nanoGPT" "CoreML" -> "Core ML" "ExecuTorch Codebase" -> "ExecuTorch codebase" "Android Phone" -> "Android phone" "How to build Mobile Apps" -> "How to Build Mobile Apps" also shorten the following two column names for avoid overlapping. "occurrences_in_delegated_graphs" -> "# in_delegated_graphs" "occurrences_in_non_delegated_graphs" -> # in_non_delegated_graphs Differential Revision: D56513601
1 parent 2dac5f3 commit b509c92

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/source/llm/getting-started.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For more information, see [Setting Up ExecuTorch](https://pytorch.org/executorch
8282

8383
## Running a Large Language Model Locally
8484

85-
This example uses Karpathy’s [NanoGPT](https://github.com/karpathy/nanoGPT), which is a minimal implementation of
85+
This example uses Karpathy’s [nanoGPT](https://github.com/karpathy/nanoGPT), which is a minimal implementation of
8686
GPT-2 124M. This guide is applicable to other language models, as ExecuTorch is model-invariant.
8787

8888
There are two steps to running a model with ExecuTorch:
@@ -100,7 +100,7 @@ ExecuTorch runtime.
100100

101101
Exporting takes a PyTorch model and converts it into a format that can run efficiently on consumer devices.
102102

103-
For this example, you will need the NanoGPT model and the corresponding tokenizer vocabulary.
103+
For this example, you will need the nanoGPT model and the corresponding tokenizer vocabulary.
104104

105105
::::{tab-set}
106106
:::{tab-item} curl
@@ -377,12 +377,12 @@ specific hardware (delegation), and because it is doing all of the calculations
377377
While ExecuTorch provides a portable, cross-platform implementation for all
378378
operators, it also provides specialized backends for a number of different
379379
targets. These include, but are not limited to, x86 and ARM CPU acceleration via
380-
the XNNPACK backend, Apple acceleration via the CoreML backend and Metal
380+
the XNNPACK backend, Apple acceleration via the Core ML backend and Metal
381381
Performance Shader (MPS) backend, and GPU acceleration via the Vulkan backend.
382382

383383
Because optimizations are specific to a given backend, each pte file is specific
384384
to the backend(s) targeted at export. To support multiple devices, such as
385-
XNNPACK acceleration for Android and CoreML for iOS, export a separate PTE file
385+
XNNPACK acceleration for Android and Core ML for iOS, export a separate PTE file
386386
for each backend.
387387

388388
To delegate to a backend at export time, ExecuTorch provides the `to_backend()`
@@ -394,11 +394,11 @@ acceleration and optimization. Any portions of the computation graph not
394394
delegated will be executed by the ExecuTorch operator implementations.
395395

396396
To delegate the exported model to the specific backend, we need to import its
397-
partitioner as well as edge compile config from ExecuTorch Codebase first, then
397+
partitioner as well as edge compile config from ExecuTorch codebase first, then
398398
call `to_backend` with an instance of partitioner on the `EdgeProgramManager`
399399
object `to_edge` function created.
400400

401-
Here's an example of how to delegate NanoGPT to XNNPACK (if you're deploying to an Android Phone for instance):
401+
Here's an example of how to delegate nanoGPT to XNNPACK (if you're deploying to an Android phone for instance):
402402

403403
```python
404404
# export_nanogpt.py
@@ -417,7 +417,7 @@ from torch._export import capture_pre_autograd_graph
417417

418418
from model import GPT
419419

420-
# Load the NanoGPT model.
420+
# Load the nanoGPT model.
421421
model = GPT.from_pretrained('gpt2')
422422

423423
# Create example inputs. This is used in the export process to provide
@@ -523,7 +523,7 @@ For more information regarding backend delegateion, see the ExecuTorch guides
523523
for the
524524
[XNNPACK Backend](https://pytorch.org/executorch/stable/tutorial-xnnpack-delegate-lowering.html)
525525
and
526-
[CoreML Backend](https://pytorch.org/executorch/stable/build-run-coreml.html).
526+
[Core ML Backend](https://pytorch.org/executorch/stable/build-run-coreml.html).
527527

528528
## Quantization
529529

@@ -633,15 +633,15 @@ df = delegation_info.get_operator_delegation_dataframe()
633633
print(tabulate(df, headers="keys", tablefmt="fancy_grid"))
634634
```
635635

636-
For NanoGPT targeting the XNNPACK backend, you might see the following:
636+
For nanoGPT targeting the XNNPACK backend, you might see the following:
637637
```
638638
Total delegated subgraphs: 86
639639
Number of delegated nodes: 473
640640
Number of non-delegated nodes: 430
641641
```
642642

643643

644-
| | op_type | occurrences_in_delegated_graphs | occurrences_in_non_delegated_graphs |
644+
| | op_type | # in_delegated_graphs | # in_non_delegated_graphs |
645645
|----|---------------------------------|------- |-----|
646646
| 0 | aten__softmax_default | 12 | 0 |
647647
| 1 | aten_add_tensor | 37 | 0 |
@@ -663,7 +663,7 @@ print(print_delegated_graph(graph_module))
663663
This may generate a large amount of output for large models. Consider using "Control+F" or "Command+F" to locate the operator you’re interested in
664664
(e.g. “aten_view_copy_default”). Observe which instances are not under lowered graphs.
665665

666-
In the fragment of the output for NanoGPT below, observe that embedding and add operators are delegated to XNNPACK while the sub operator is not.
666+
In the fragment of the output for nanoGPT below, observe that embedding and add operators are delegated to XNNPACK while the sub operator is not.
667667

668668
```
669669
%aten_unsqueeze_copy_default_22 : [num_users=1] = call_function[target=executorch.exir.dialects.edge._ops.aten.unsqueeze_copy.default](args = (%aten_arange_start_step_23, -2), kwargs = {})
@@ -879,7 +879,7 @@ def replace_linear_with_custom_linear(module):
879879

880880
The remaining steps are the same as the normal flow. Now you can run this module in eager mode as well as export to ExecuTorch.
881881

882-
## How to build Mobile Apps
882+
## How to Build Mobile Apps
883883
You can execute an LLM using ExecuTorch on iOS and Android.
884884

885885
**For iOS see the [iLLaMA App](https://pytorch.org/executorch/main/llm/llama-demo-ios.html).**

0 commit comments

Comments
 (0)