diff --git a/README.md b/README.md index fbec11667..8b2b4855a 100644 --- a/README.md +++ b/README.md @@ -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!* + iOS app running a LlaMA model