Skip to content

Commit 032c61d

Browse files
authored
docs(readme): streamline LFM2.5 quickstart for Expo (#1171)
## Description Tightens the LFM2.5 quickstart in the root README and all five translated readmes: - Flags the quickstart as Expo-targeted and links bare React Native users to the [Getting Started guide](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) instead of duplicating the bare install steps inline. - Drops the `react-native-executorch-bare-resource-fetcher` / `@dr.pogodin/react-native-fs` / `@kesha-antonov/react-native-background-downloader` lines from the install snippet now that the bare path lives in the docs. - Switches the sample to the model-registry accessor (`models.llm.lfm2_5_1_2b_instruct()`), matching the apps and the new MODEL_REGISTRY flow added in #1148. - Normalizes `yarn <ios|android>` placeholders — no spaces inside the angle brackets. ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [ ] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [x] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions Docs-only change. Render the affected readmes on GitHub and confirm: - Quickstart heading is followed by the Expo / bare-RN doc-link sentence. - Install block lists only the Expo fetcher trio. - Code sample imports `models` and calls `models.llm.lfm2_5_1_2b_instruct()`. - No `< ios | android >` (with spaces) remains. ### Screenshots N/A ### Related issues N/A ### Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes The translated readmes carry through the same edits with the disclaimer + doc link translated into each language; the docs URL is shared across all of them.
1 parent 7b452e6 commit 032c61d

8 files changed

Lines changed: 46 additions & 58 deletions

File tree

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,20 @@ React Native ExecuTorch is powering [Private Mind](https://privatemind.swmansion
7979

8080
**Get started with AI-powered text generation in 3 easy steps!**
8181

82+
The steps below assume an Expo project. For bare React Native, follow the [Getting Started guide](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) in the documentation.
83+
8284
### :one: Installation
8385

8486
```bash
8587
# Install the package
8688
yarn add react-native-executorch
8789

88-
# If you use expo, please add these packages for resource fetching:
90+
# Add these packages for resource fetching:
8991
yarn add react-native-executorch-expo-resource-fetcher
9092
yarn add expo-file-system expo-asset
9193

92-
# If you use bare React Native project use these packages:
93-
yarn add react-native-executorch-bare-resource-fetcher
94-
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
95-
9694
# Depending on the platform, choose either iOS or Android
97-
yarn < ios | android >
95+
yarn <ios|android>
9896
```
9997

10098
> npm and pnpm work too — use `npm install` or `pnpm add` for the packages, and `npm run <ios|android>` / `pnpm <ios|android>` for the run step.
@@ -106,7 +104,7 @@ Add this to your component file:
106104
```tsx
107105
import {
108106
useLLM,
109-
LFM2_5_1_2B_INSTRUCT,
107+
models,
110108
Message,
111109
initExecutorch,
112110
} from 'react-native-executorch';
@@ -118,7 +116,7 @@ initExecutorch({
118116

119117
function MyComponent() {
120118
// Initialize the model 🚀
121-
const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT });
119+
const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() });
122120
// ... rest of your component
123121
}
124122
```
@@ -151,7 +149,7 @@ We currently host a few example [apps](https://github.com/software-mansion/react
151149
If you would like to run a demo app, navigate to its project directory. Then install dependencies and run app with:
152150

153151
```bash
154-
yarn && yarn < ios | android >
152+
yarn && yarn <ios|android>
155153
```
156154

157155
> [!WARNING]

docs/docs/01-fundamentals/01-getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,21 @@ Running the app with the library:
164164
<TabItem value="npm" label="npm">
165165

166166
```bash
167-
npm run <ios | android> -- -d
167+
npm run <ios|android> -- -d
168168
```
169169

170170
</TabItem>
171171
<TabItem value="pnpm" label="pnpm">
172172

173173
```bash
174-
pnpm <ios | android> -d
174+
pnpm <ios|android> -d
175175
```
176176

177177
</TabItem>
178178
<TabItem value="yarn" label="yarn">
179179

180180
```bash
181-
yarn <ios | android> -d
181+
yarn <ios|android> -d
182182
```
183183

184184
</TabItem>

docs/versioned_docs/version-0.8.x/01-fundamentals/01-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Because we are using ExecuTorch under the hood, you won't be able to build iOS a
121121
Running the app with the library:
122122

123123
```bash
124-
yarn <ios | android> -d
124+
yarn <ios|android> -d
125125
```
126126

127127
## Supporting new models in React Native ExecuTorch

readmes/README_cn.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,20 @@ React Native ExecuTorch 为 [Private Mind](https://privatemind.swmansion.com/)
7575

7676
**通过三个简单步骤,开始使用 AI 驱动的文本生成!**
7777

78+
以下步骤假设您使用 Expo 项目。对于原生 React Native,请参阅文档中的[入门指南](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started)
79+
7880
### :one: 安装
7981

8082
```bash
8183
# 安装包
8284
yarn add react-native-executorch
8385

84-
# 如果您使用 expo,请添加这些包用于资源获取
86+
# 添加这些包用于资源获取
8587
yarn add react-native-executorch-expo-resource-fetcher
8688
yarn add expo-file-system expo-asset
8789

88-
# 如果您使用原生 React Native 项目,请使用这些包:
89-
yarn add react-native-executorch-bare-resource-fetcher
90-
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
91-
9290
# 根据平台,选择 iOS 或 Android
93-
yarn < ios | android >
91+
yarn <ios|android>
9492
```
9593

9694
> npm 和 pnpm 同样适用 — 使用 `npm install``pnpm add` 安装包,使用 `npm run <ios|android>` / `pnpm <ios|android>` 运行应用。
@@ -102,7 +100,7 @@ yarn < ios | android >
102100
```tsx
103101
import {
104102
useLLM,
105-
LFM2_5_1_2B_INSTRUCT,
103+
models,
106104
Message,
107105
initExecutorch,
108106
} from 'react-native-executorch';
@@ -114,7 +112,7 @@ initExecutorch({
114112

115113
function MyComponent() {
116114
// 初始化模型 🚀
117-
const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT });
115+
const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() });
118116
// ... 您组件的其余部分
119117
}
120118
```
@@ -147,7 +145,7 @@ const handleGenerate = async () => {
147145
如果您想运行示例应用程序,请导航到其项目目录。然后安装依赖项并运行应用:
148146

149147
```bash
150-
yarn && yarn < ios | android >
148+
yarn && yarn <ios|android>
151149
```
152150

153151
> [!WARNING]

readmes/README_es.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,20 @@ React Native ExecuTorch impulsa [Private Mind](https://privatemind.swmansion.com
7575

7676
**¡Comienza con la generación de texto impulsada por IA en 3 sencillos pasos!**
7777

78+
Los pasos a continuación asumen un proyecto Expo. Para React Native puro, sigue la [guía de Inicio](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) en la documentación.
79+
7880
### :one: Instalación
7981

8082
```bash
8183
# Instalar el paquete
8284
yarn add react-native-executorch
8385

84-
# Si usa expo, agregue estos paquetes para la obtención de recursos:
86+
# Agrega estos paquetes para la obtención de recursos:
8587
yarn add react-native-executorch-expo-resource-fetcher
8688
yarn add expo-file-system expo-asset
8789

88-
# Si usa un proyecto básico de React Native, use estos paquetes:
89-
yarn add react-native-executorch-bare-resource-fetcher
90-
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
91-
9290
# Dependiendo de la plataforma, elige iOS o Android
93-
yarn < ios | android >
91+
yarn <ios|android>
9492
```
9593

9694
> npm y pnpm también funcionan — usa `npm install` o `pnpm add` para los paquetes, y `npm run <ios|android>` / `pnpm <ios|android>` para el paso de ejecución.
@@ -102,7 +100,7 @@ Agrega esto a tu archivo de componente:
102100
```tsx
103101
import {
104102
useLLM,
105-
LFM2_5_1_2B_INSTRUCT,
103+
models,
106104
Message,
107105
initExecutorch,
108106
} from 'react-native-executorch';
@@ -114,7 +112,7 @@ initExecutorch({
114112

115113
function MyComponent() {
116114
// Inicializa el modelo 🚀
117-
const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT });
115+
const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() });
118116
// ... resto de tu componente
119117
}
120118
```
@@ -147,7 +145,7 @@ Actualmente alojamos algunos ejemplos de [aplicaciones](https://github.com/softw
147145
Si deseas ejecutar una aplicación de demostración, navega a su directorio de proyecto. Luego instala las dependencias y ejecuta la app con:
148146

149147
```bash
150-
yarn && yarn < ios | android >
148+
yarn && yarn <ios|android>
151149
```
152150

153151
> [!WARNING]

readmes/README_fr.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,20 @@ React Native ExecuTorch alimente [Private Mind](https://privatemind.swmansion.co
7575

7676
**Commencez avec la génération de texte AI en 3 étapes faciles !**
7777

78+
Les étapes ci-dessous supposent un projet Expo. Pour React Native brut, suivez le [guide de démarrage](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) dans la documentation.
79+
7880
### :one: Installation
7981

8082
```bash
8183
# Installez le package
8284
yarn add react-native-executorch
8385

84-
# Si vous utilisez expo, veuillez ajouter ces packages pour la récupération de ressources :
86+
# Ajoutez ces packages pour la récupération de ressources :
8587
yarn add react-native-executorch-expo-resource-fetcher
8688
yarn add expo-file-system expo-asset
8789

88-
# Si vous utilisez un projet React Native brut, utilisez ces packages :
89-
yarn add react-native-executorch-bare-resource-fetcher
90-
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
91-
9290
# Selon la plateforme, choisissez soit iOS soit Android
93-
yarn < ios | android >
91+
yarn <ios|android>
9492
```
9593

9694
> npm et pnpm fonctionnent aussi — utilisez `npm install` ou `pnpm add` pour les packages, et `npm run <ios|android>` / `pnpm <ios|android>` pour l'étape d'exécution.
@@ -102,7 +100,7 @@ Ajoutez ceci à votre fichier de composant :
102100
```tsx
103101
import {
104102
useLLM,
105-
LFM2_5_1_2B_INSTRUCT,
103+
models,
106104
Message,
107105
initExecutorch,
108106
} from 'react-native-executorch';
@@ -114,7 +112,7 @@ initExecutorch({
114112

115113
function MyComponent() {
116114
// Initialisez le modèle 🚀
117-
const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT });
115+
const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() });
118116
// ... reste de votre composant
119117
}
120118
```
@@ -147,7 +145,7 @@ Nous hébergeons actuellement quelques applications [exemples](https://github.co
147145
Si vous souhaitez exécuter une application de démonstration, accédez à son répertoire de projet. Puis installez les dépendances et lancez l'application avec :
148146

149147
```bash
150-
yarn && yarn < ios | android >
148+
yarn && yarn <ios|android>
151149
```
152150

153151
> [!WARNING]

readmes/README_in.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,20 @@ React Native ExecuTorch को [Private Mind](https://privatemind.swmansion.com/
7575

7676
**AI-समर्थित पाठ पीढ़ी के साथ आरंभ करें, केवल 3 आसान कदमों में!**
7777

78+
नीचे दिए गए चरण एक Expo प्रोजेक्ट मानते हैं। bare React Native के लिए, कृपया दस्तावेज़ में [Getting Started गाइड](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) का पालन करें।
79+
7880
### :one: स्थापना
7981

8082
```bash
8183
# पैकेज को इंस्टॉल करें
8284
yarn add react-native-executorch
8385

84-
# यदि आप expo का उपयोग करते हैं, तो कृपया संसाधन प्राप्त करने के लिए ये पैकेज जोड़ें:
86+
# संसाधन प्राप्त करने के लिए ये पैकेज जोड़ें:
8587
yarn add react-native-executorch-expo-resource-fetcher
8688
yarn add expo-file-system expo-asset
8789

88-
# यदि आप bare React Native प्रोजेक्ट का उपयोग करते हैं तो इन पैकेजों का उपयोग करें:
89-
yarn add react-native-executorch-bare-resource-fetcher
90-
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
91-
9290
# प्लेटफॉर्म के अनुसार, या तो iOS या Android चुनें
93-
yarn < ios | android >
91+
yarn <ios|android>
9492
```
9593

9694
> npm और pnpm भी काम करते हैं — पैकेजों के लिए `npm install` या `pnpm add` का उपयोग करें, और रन स्टेप के लिए `npm run <ios|android>` / `pnpm <ios|android>` का उपयोग करें।
@@ -102,7 +100,7 @@ yarn < ios | android >
102100
```tsx
103101
import {
104102
useLLM,
105-
LFM2_5_1_2B_INSTRUCT,
103+
models,
106104
Message,
107105
initExecutorch,
108106
} from 'react-native-executorch';
@@ -114,7 +112,7 @@ initExecutorch({
114112

115113
function MyComponent() {
116114
// मॉडल को प्रारंभ करें 🚀
117-
const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT });
115+
const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() });
118116
// ... आपके घटक के शेष
119117
}
120118
```
@@ -147,7 +145,7 @@ const handleGenerate = async () => {
147145
यदि आप डेमो ऐप चलाना चाहते हैं, तो इसके प्रोजेक्ट डायरेक्टरी में नेविगेट करें। फिर निर्भरता इंस्टॉल करें और ऐप चलाएं:
148146

149147
```bash
150-
yarn && yarn < ios | android >
148+
yarn && yarn <ios|android>
151149
```
152150

153151
> [!WARNING]

readmes/README_pt.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,20 @@ React Native ExecuTorch está impulsionando o [Private Mind](https://privatemind
7575

7676
**Comece com geração de texto com IA em 3 passos simples!**
7777

78+
Os passos abaixo assumem um projeto Expo. Para React Native puro, siga o [guia de Introdução](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) na documentação.
79+
7880
### :one: Instalação
7981

8082
```bash
8183
# Instale o pacote
8284
yarn add react-native-executorch
8385

84-
# Se você usa expo, adicione estes pacotes para busca de recursos:
86+
# Adicione estes pacotes para busca de recursos:
8587
yarn add react-native-executorch-expo-resource-fetcher
8688
yarn add expo-file-system expo-asset
8789

88-
# Se você usa projeto React Native básico, use estes pacotes:
89-
yarn add react-native-executorch-bare-resource-fetcher
90-
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
91-
9290
# Dependendo da plataforma, escolha iOS ou Android
93-
yarn < ios | android >
91+
yarn <ios|android>
9492
```
9593

9694
> npm e pnpm também funcionam — use `npm install` ou `pnpm add` para os pacotes, e `npm run <ios|android>` / `pnpm <ios|android>` para o passo de execução.
@@ -102,7 +100,7 @@ Adicione isso ao seu arquivo de componente:
102100
```tsx
103101
import {
104102
useLLM,
105-
LFM2_5_1_2B_INSTRUCT,
103+
models,
106104
Message,
107105
initExecutorch,
108106
} from 'react-native-executorch';
@@ -114,7 +112,7 @@ initExecutorch({
114112

115113
function MyComponent() {
116114
// Inicialize o modelo 🚀
117-
const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT });
115+
const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() });
118116
// ... restante do seu componente
119117
}
120118
```
@@ -147,7 +145,7 @@ Atualmente, hospedamos alguns [apps](https://github.com/software-mansion/react-n
147145
Se deseja executar um aplicativo de demonstração, navegue até seu diretório de projeto. Em seguida, instale as dependências e execute o aplicativo com:
148146

149147
```bash
150-
yarn && yarn < ios | android >
148+
yarn && yarn <ios|android>
151149
```
152150

153151
> [!WARNING]

0 commit comments

Comments
 (0)