Skip to content

Commit dbb00e5

Browse files
pytorchbotRiandy
andauthored
Improve iOS demo app readme (#5488)
Improve iOS demo app readme (#5453) Summary: Pull Request resolved: #5453 - Add instructions on how to clear package dependencies cache Reviewed By: shoumikhin Differential Revision: D62909056 fbshipit-source-id: ce5f595c9eebd51a7322209d562c98ff6c4c1c43 (cherry picked from commit 61e5d4c) Co-authored-by: Riandy Riandy <[email protected]>
1 parent dabf082 commit dbb00e5

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

examples/demo-apps/apple_ios/LLaMA/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ First it’s important to note that currently ExecuTorch provides support across
3333
## How to Use the App
3434
This section will provide the main steps to use the app, along with a code snippet of the ExecuTorch API.
3535

36-
```{note}
36+
### Swift Package Manager
37+
3738
ExecuTorch runtime is distributed as a Swift package providing some .xcframework as prebuilt binary targets.
3839
Xcode will download and cache the package on the first run, which will take some time.
3940

@@ -47,6 +48,13 @@ rm -rf \
4748
~/Library/Developer/Xcode/DerivedData
4849
```
4950

51+
Link your binary with the ExecuTorch runtime and any backends or kernels used by the exported ML model. It is recommended to link the core runtime to the components that use ExecuTorch directly, and link kernels and backends against the main app target.
52+
53+
Note: To access logs, link against the Debug build of the ExecuTorch runtime, i.e., the executorch_debug framework. For optimal performance, always link against the Release version of the deliverables (those without the _debug suffix), which have all logging overhead removed.
54+
55+
For more details integrating and Running ExecuTorch on Apple Platforms, checkout this [link](https://pytorch.org/executorch/main/apple-runtime.html).
56+
57+
### XCode
5058
* Open XCode and select "Open an existing project" to open `examples/demo-apps/apple_ios/LLama`.
5159
* Ensure that the ExecuTorch package dependencies are installed correctly, then select which ExecuTorch framework should link against which target.
5260

@@ -61,7 +69,6 @@ rm -rf \
6169
* Run the app. This builds and launches the app on the phone.
6270
* In app UI pick a model and tokenizer to use, type a prompt and tap the arrow buton
6371

64-
6572
## Copy the model to Simulator
6673

6774
* Drag&drop the model and tokenizer files onto the Simulator window and save them somewhere inside the iLLaMA folder.

examples/demo-apps/apple_ios/LLaMA/docs/delegates/mps_README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Install dependencies
3939
## Prepare Models
4040
In this demo app, we support text-only inference with Llama 3.1, Llama 3, and Llama 2 models.
4141

42-
Install the required packages
42+
Install the required packages to export the model
4343

4444
```
45-
executorch/examples/models/llama2/install_requirements.sh
45+
sh examples/models/llama2/install_requirements.sh
4646
```
4747

4848
Export the model

examples/demo-apps/apple_ios/LLaMA/docs/delegates/xnnpack_README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Install dependencies
3939
## Prepare Models
4040
In this demo app, we support text-only inference with up-to-date Llama models.
4141

42-
Install the required packages
42+
Install the required packages to export the model
4343

4444
```
45-
executorch/examples/models/llama2/install_requirements.sh
45+
sh examples/models/llama2/install_requirements.sh
4646
```
4747

4848
Export the model

0 commit comments

Comments
 (0)