Skip to content

Commit 24fd6ac

Browse files
committed
fix: readme
1 parent a85a613 commit 24fd6ac

File tree

2 files changed

+23
-32
lines changed

2 files changed

+23
-32
lines changed
Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,41 @@
1-
# Welcome to your Expo app 👋
1+
# React Native Llama
22

3-
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
3+
<p align="center">
4+
<img src="./assets/images/rnllama.png" width="200" alt="rnllama Logo">
5+
</p>
46

5-
## Get started
7+
A React Native mobile application for running LLaMA language models using ExecuTorch. This example is for iOS only for now.
68

7-
1. Install dependencies
9+
## Features
810

9-
```bash
10-
npm install
11-
```
11+
- Run LLaMA models directly on device, build the UI using React Native
12+
- Tested using Llama 3.2 SpinQuant 1B on iPhone 12 Pro
1213

13-
2. Start the app
1414

15-
```bash
16-
npx expo start
17-
```
15+
## Prerequisites
1816

19-
In the output, you'll find options to open the app in a
17+
- Node.js & npm
18+
- Xcode
2019

21-
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
22-
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
23-
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
24-
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
20+
## Installation
2521

26-
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
22+
1. Clone the repository: `git clone [email protected]:pytorch/executorch.git`
2723

28-
## Get a fresh project
24+
2. Navigate to the root of the repository: `cd executorch`
2925

30-
When you're ready, run:
26+
3. Install dependencies: `./install_requirements.sh --pybind xnnpack && ./examples/models/llama/install_requirements.sh`
3127

32-
```bash
33-
npm run reset-project
34-
```
28+
4. Follow the instructions in the [README](https://github.com/pytorch/executorch/blob/main/examples/models/llama/README.md#option-a-download-and-export-llama32-1b3b-model) to export a model as `.pte`
3529

36-
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
30+
6. Navigate to the example: `cd examples/demo-apps/react-native/rnllama`
3731

38-
## Learn more
32+
7. Install dependencies: `npm install`
3933

40-
To learn more about developing your project with Expo, look at the following resources:
34+
8. Run the app: `npx expo run:ios --device` and select a USB connected iOS device
4135

42-
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
43-
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
36+
9. Find the device in finder, and place the exported `.pte` model and the downloaded tokenizer under the app.
4437

45-
## Join the community
38+
10. Select the model and tokenizer in the app to start chatting:
4639

47-
Join our community of developers creating universal apps.
40+
![Select model](./assets/images/select_model.png)
4841

49-
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
50-
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.

examples/demo-apps/react-native/rnllama/ios/rnllama/SplashScreen.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<scene sceneID="EXPO-SCENE-1">
1313
<objects>
1414
<viewController storyboardIdentifier="SplashScreenViewController" id="EXPO-VIEWCONTROLLER-1" sceneMemberID="viewController">
15-
<view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="EXPO-ContainerView" userLabel="ContainerView">
15+
<viecw key="view" userInteractionEnabled="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="EXPO-ContainerView" userLabel="ContainerView">
1616
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1717
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1818
<subviews>

0 commit comments

Comments
 (0)