Skip to content

Commit 0f8e313

Browse files
docs: add note about new architecture in readme and docs (#127)
## Description <!-- Provide a concise and descriptive summary of the changes implemented in this PR. --> ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] Documentation update (improves or adds clarity to existing documentation) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [ ] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
1 parent 0ea8129 commit 0f8e313

File tree

2 files changed

+32
-15
lines changed

2 files changed

+32
-15
lines changed

README.md

+26-15
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
**ExecuTorch** is a novel framework created by Meta that enables running AI models on devices such as mobile phones or microcontrollers. React Native ExecuTorch bridges the gap between React Native and native platform capabilities, allowing developers to run AI models locally on mobile devices with state-of-the-art performance, without requiring deep knowledge of native code or machine learning internals.
88

9+
## Compatibility
10+
11+
React Native Executorch supports only the [New React Native architecture](https://reactnative.dev/architecture/landing-page).
12+
13+
If your app still runs on the old architecture, please consider upgrading to the New Architecture.
14+
915
## Readymade models 🤖
1016

1117
To run any AI model in ExecuTorch, you need to export it to a `.pte` format. If you're interested in experimenting with your own models, we highly encourage you to check out the [Python API](https://pypi.org/project/executorch/). If you prefer focusing on developing your React Native app, we will cover several common use cases. For more details, please refer to the documentation.
@@ -15,12 +21,12 @@ To run any AI model in ExecuTorch, you need to export it to a `.pte` format. If
1521
Take a look at how our library can help build you your React Native AI features in our docs:
1622
https://docs.swmansion.com/react-native-executorch
1723

24+
# 🦙 **Quickstart - Running Llama**
1825

19-
# 🦙 **Quickstart - Running Llama**
26+
**Get started with AI-powered text generation in 3 easy steps!**
2027

21-
**Get started with AI-powered text generation in 3 easy steps!**
28+
### 1️⃣ **Installation**
2229

23-
### 1️⃣ **Installation**
2430
```bash
2531
# Install the package
2632
yarn add react-native-executorch
@@ -29,46 +35,51 @@ cd ios && pod install && cd ..
2935

3036
---
3137

32-
### 2️⃣ **Setup & Initialization**
33-
Add this to your component file:
38+
### 2️⃣ **Setup & Initialization**
39+
40+
Add this to your component file:
41+
3442
```tsx
35-
import {
36-
LLAMA3_2_3B_QLORA,
43+
import {
44+
LLAMA3_2_3B_QLORA,
3745
LLAMA3_2_3B_TOKENIZER,
38-
useLLM
46+
useLLM,
3947
} from 'react-native-executorch';
4048

4149
function MyComponent() {
4250
// Initialize the model 🚀
4351
const llama = useLLM({
4452
modelSource: LLAMA3_2_3B_QLORA,
45-
tokenizerSource: LLAMA3_2_3B_TOKENIZER
53+
tokenizerSource: LLAMA3_2_3B_TOKENIZER,
4654
});
4755
// ... rest of your component
4856
}
4957
```
5058

5159
---
5260

53-
### 3️⃣ **Run the model!**
61+
### 3️⃣ **Run the model!**
62+
5463
```tsx
5564
const handleGenerate = async () => {
56-
const prompt = "The meaning of life is";
57-
65+
const prompt = 'The meaning of life is';
66+
5867
// Generate text based on your desired prompt
5968
const response = await llama.generate(prompt);
60-
console.log("Llama says:", response);
69+
console.log('Llama says:', response);
6170
};
6271
```
6372

6473
## Minimal supported versions
74+
6575
The minimal supported version is 17.0 for iOS and Android 13.
6676

6777
## Examples 📲
6878

6979
https://github.com/user-attachments/assets/27ab3406-c7f1-4618-a981-6c86b53547ee
7080

7181
We currently host two example apps demonstrating use cases of our library:
82+
7283
- examples/speech-to-text - Whisper and Moonshine models ready for transcription tasks
7384
- examples/computer-vision - computer vision related tasks
7485
- examples/llama - chat applications showcasing use of LLMs
@@ -100,10 +111,10 @@ yarn expo run:ios
100111
```
101112

102113
### Warning
103-
Running LLMs requires a significant amount of RAM. If you are encountering unexpected app crashes, try to increase the amount of RAM allocated to the emulator.
104114

115+
Running LLMs requires a significant amount of RAM. If you are encountering unexpected app crashes, try to increase the amount of RAM allocated to the emulator.
105116

106-
## License
117+
## License
107118

108119
This library is licensed under [The MIT License](./LICENSE).
109120

docs/docs/fundamentals/getting-started.md

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ ExecuTorch is a novel AI framework developed by Meta, designed to streamline dep
1414

1515
React Native ExecuTorch is our way of bringing ExecuTorch into the React Native world. Our API is built to be simple, declarative, and efficient. Plus, we’ll provide a set of pre-exported models for common use cases, so you won’t have to worry about handling exports yourself. With just a few lines of JavaScript, you’ll be able to run AI models (even LLMs 👀) right on your device—keeping user data private and saving on cloud costs.
1616

17+
## Compatibility
18+
19+
React Native Executorch supports only the [New React Native architecture](https://reactnative.dev/architecture/landing-page).
20+
21+
If your app still runs on the old architecture, please consider upgrading to the New Architecture.
22+
1723
## Installation
1824

1925
Installation is pretty straightforward, just use your favorite package manager.

0 commit comments

Comments
 (0)