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
First it’s important to note that by default, the app depends on [ExecuTorch library](https://central.sonatype.com/artifact/org.pytorch/executorch-android) on Maven Central. It uses the latest `org.pytorch:executorch-android` package, which comes with all the default kernel libraries (portable, quantized, optimized), LLM customized libraries, and XNNPACK backend.
@@ -64,6 +65,18 @@ Select the settings widget to get started with picking a model, its parameters a
64
65
65
66
66
67
68
+
### Push Model and Tokenizer Files to Device
69
+
70
+
Before selecting a model and tokenizer in the app, you need to push these files to your Android device. Use the following commands to copy the model (`.pte`) and tokenizer files to the device:
71
+
72
+
```sh
73
+
adb shell mkdir -p /data/local/tmp/llama
74
+
adb push <your_model>.pte /data/local/tmp/llama
75
+
adb push <your_tokenizer> /data/local/tmp/llama
76
+
```
77
+
78
+
Replace `<your_model>.pte` with your exported model file and `<your_tokenizer>` with your tokenizer file (e.g., `tokenizer.bin` or `tokenizer.model`).
79
+
67
80
### Select Models and Parameters
68
81
69
82
Once you've selected the model, tokenizer, and model type you are ready to click on "Load Model" to have the app load the model and go back to the main Chat activity.
@@ -91,15 +104,15 @@ mModule = new LlmModule(
91
104
int loadResult = mModule.load();
92
105
```
93
106
94
-
*`modelCategory`: Indicate whether it’s a text-only or vision model
95
-
*`modePath`: path to the .pte file
96
-
*`tokenizerPath`: path to the tokenizer file
97
-
*`temperature`: model parameter to adjust the randomness of the model’s output
98
-
*`dataPath`: path to one or a list of .ptd files
107
+
*`modelCategory`: Indicates whether it’s a text-only or vision model
108
+
*`modelPath`: Path to the .pte file
109
+
*`tokenizerPath`: Path to the tokenizer file
110
+
*`temperature`: Model parameter to adjust the randomness of the model’s output
111
+
*`dataPath`: Path to one or a list of .ptd files
99
112
100
113
101
114
### User Prompt
102
-
Once model is successfully loaded then enter any prompt and click the send (i.e. generate) button to send it to the model.
115
+
Once the model is successfully loaded, enter any prompt and click the send (i.e., generate) button to send it to the model.
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).
220
+
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