Skip to content

Commit

Permalink
Update README.md (#856)
Browse files Browse the repository at this point in the history
* Update README.md

Addressing #757

* Update README.md
  • Loading branch information
shoumikhin authored and malfet committed Jul 17, 2024
1 parent d8e103f commit bf26cc0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,31 +238,31 @@ run `python3 torchchat.py export`

### Deploy and run on iOS

The following assumes you've completed the steps for [Setting up
Executorch](#set-up-executorch) and
The following assumes you've completed the steps for [Setting up Executorch](#set-up-executorch).

Open the xcode project
```
open et-build/src/executorch/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj
```
Then click the Play button to launch the app in Simulator.
#### Requirements
- Xcode 15.0 or later
- A development provisioning profile with the [`increased-memory-limit`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_kernel_increased-memory-limit) entitlement.

To run on a device, given that you already have it set up for
development, you'll need to have a provisioning profile with the
[`increased-memory-limit`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_kernel_increased-memory-limit)
entitlement. Just change the app's bundle identifier to whatever
matches your provisioning profile with the aforementioned capability
enabled.
#### Steps

After the app launched successfully, copy an exported ExecuTorch model (`.pte`) and tokenizer (`.bin`) files to the iLLaMA folder.
1. Open the Xcode project:
```bash
open et-build/src/executorch/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj
```
2. Click the Play button to launch the app in the Simulator.

For the Simulator, just drag&drop both files onto the Simulator window and save at `On My iPhone > iLLaMA` folder.
3. To run on a device, ensure you have it set up for development and a provisioning profile with the `increased-memory-limit` entitlement. Update the app's bundle identifier to match your provisioning profile with the required capability.
For a device, open it in a separate Finder window, navigate to the Files tab, drag&drop both files to the iLLaMA folder and wait till the copying finishes.
4. After successfully launching the app, copy the exported ExecuTorch model (`.pte`) and tokenizer (`.model`) files to the iLLaMA folder. You can find the model file called `llama3.pte` in the current `torchchat` directory and the tokenizer file at `$(python3 torchchat.py where llama3)/tokenizer.model` path.
Now, follow the app's UI guidelines to pick the model and tokenizer files from the local filesystem and issue a prompt.
- **For the Simulator:** Drag and drop both files onto the Simulator window and save them in the `On My iPhone > iLLaMA` folder.
- **For a device:** Open a separate Finder window, navigate to the Files tab, drag and drop both files into the iLLaMA folder, and wait for the copying to finish.
5. Follow the app's UI guidelines to select the model and tokenizer files from the local filesystem and issue a prompt.

*Click the image below to see it in action!*

<a href="https://pytorch.org/executorch/main/_static/img/llama_ios_app.mp4">
<img src="https://pytorch.org/executorch/main/_static/img/llama_ios_app.png" width="600" alt="iOS app running a LlaMA model">
</a>
Expand Down

0 comments on commit bf26cc0

Please sign in to comment.