diff --git a/examples/demo-apps/apple_ios/LLaMA/README.md b/examples/demo-apps/apple_ios/LLaMA/README.md index 04a6eaef67..1e0d28b4e5 100644 --- a/examples/demo-apps/apple_ios/LLaMA/README.md +++ b/examples/demo-apps/apple_ios/LLaMA/README.md @@ -5,9 +5,19 @@ This app demonstrates the use of the LLaMA chat app demonstrating local inferenc iOS LLaMA App
## Prerequisites -* [Xcode 15](https://developer.apple.com/xcode). -* [iOS 17 SDK](https://developer.apple.com/ios). -* Set up your ExecuTorch repo and environment if you haven’t done so by following the [Setting up ExecuTorch](https://pytorch.org/executorch/stable/getting-started-setup) to set up the repo and dev environment. +* [Xcode 15](https://developer.apple.com/xcode) +* [iOS 17 SDK](https://developer.apple.com/ios) +* Set up your ExecuTorch repo and environment if you haven’t done so by following the [Setting up ExecuTorch](https://pytorch.org/executorch/stable/getting-started-setup) to set up the repo and dev environment: + +```bash +git clone -b release/0.2 https://github.com/pytorch/executorch.git +cd executorch +git submodule update --init + +python3 -m venv .venv && source .venv/bin/activate + +./install_requirements.sh +``` ## Exporting models Please refer to the [ExecuTorch Llama2 docs](https://github.com/pytorch/executorch/blob/main/examples/models/llama2/README.md) to export the model. @@ -16,10 +26,11 @@ Please refer to the [ExecuTorch Llama2 docs](https://github.com/pytorch/executor 1. Open the [project](https://github.com/pytorch/executorch/blob/main/examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj) in Xcode. 2. Run the app (cmd+R). -3. In app UI pick a model and tokenizer to use, type a prompt and tap the arrow buton as on the [video](../_static/img/llama_ios_app.mp4). +3. In app UI pick a model and tokenizer to use, type a prompt and tap the arrow buton ```{note} -ExecuTorch runtime is distributed as a Swift package providing some .xcframework as prebuilt binary targets. Xcode will dowload and cache the package on the first run, which will take some time. +ExecuTorch runtime is distributed as a Swift package providing some .xcframework as prebuilt binary targets. +Xcode will dowload and cache the package on the first run, which will take some time. ``` ## Copy the model to Simulator @@ -33,5 +44,11 @@ ExecuTorch runtime is distributed as a Swift package providing some .xcframework 2. Navigate to the Files tab and drag&drop the model and tokenizer files onto the iLLaMA folder. 3. Wait until the files are copied. +Click the image below to see it in action! + + + iOS app running a LlaMA model + + ## Reporting Issues If you encountered any bugs or issues following this tutorial please file a bug/issue here on [Github](https://github.com/pytorch/executorch/issues/new).