Skip to content

Improve iOS demo app readme #5488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions examples/demo-apps/apple_ios/LLaMA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ First it’s important to note that currently ExecuTorch provides support across
## How to Use the App
This section will provide the main steps to use the app, along with a code snippet of the ExecuTorch API.

```{note}
### Swift Package Manager

ExecuTorch runtime is distributed as a Swift package providing some .xcframework as prebuilt binary targets.
Xcode will download and cache the package on the first run, which will take some time.

Expand All @@ -47,6 +48,13 @@ rm -rf \
~/Library/Developer/Xcode/DerivedData
```

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.

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.

For more details integrating and Running ExecuTorch on Apple Platforms, checkout this [link](https://pytorch.org/executorch/main/apple-runtime.html).

### XCode
* Open XCode and select "Open an existing project" to open `examples/demo-apps/apple_ios/LLama`.
* Ensure that the ExecuTorch package dependencies are installed correctly, then select which ExecuTorch framework should link against which target.

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


## Copy the model to Simulator

* Drag&drop the model and tokenizer files onto the Simulator window and save them somewhere inside the iLLaMA folder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Install dependencies
## Prepare Models
In this demo app, we support text-only inference with Llama 3.1, Llama 3, and Llama 2 models.

Install the required packages
Install the required packages to export the model

```
executorch/examples/models/llama2/install_requirements.sh
sh examples/models/llama2/install_requirements.sh
```

Export the model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Install dependencies
## Prepare Models
In this demo app, we support text-only inference with up-to-date Llama models.

Install the required packages
Install the required packages to export the model

```
executorch/examples/models/llama2/install_requirements.sh
sh examples/models/llama2/install_requirements.sh
```

Export the model
Expand Down
Loading