You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llm/android/LlamaDemo/README.md
+36-13Lines changed: 36 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,32 +189,55 @@ Ensure you have the following functions in your callback class that you provided
189
189
190
190
```
191
191
192
-
## Instrumentation Test
193
-
You can run the instrumentation test for a sanity check. The test loads a model .pte file and tokenizer.bin file
194
-
under `/data/local/tmp/llama`.
192
+
## Instrumentation Tests
193
+
194
+
The app includes instrumentation tests for sanity checking and UI workflow validation.
195
+
196
+
### Available Tests
197
+
198
+
1.**SanityCheck** - Basic model loading and generation test that verifies the LLM module can load a model and generate tokens.
199
+
200
+
2.**UIWorkflowTest** - UI-based tests that simulate user interactions:
201
+
-`testModelLoadingWorkflow`: Tests the complete flow of selecting a model/tokenizer and loading it
202
+
-`testSendMessageAndReceiveResponse`: Tests sending a message and receiving a response from the model
203
+
204
+
### Model Preparation
205
+
206
+
The test model (`stories110M.pte`) and tokenizer (`tokenizer.model`) are **automatically downloaded** when you run the tests via Gradle. The download task runs before the instrumentation tests execute.
207
+
208
+
If you want to manually prepare the model files, you can use the following commands:
195
209
196
-
### Model preparation
197
-
You need to install [executorch python package](https://docs.pytorch.org/executorch/stable/getting-started.html#installation) first.
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), or join our Discord [here](https://lnkd.in/gWCM4ViK).
0 commit comments