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: content/learning-paths/mobile-graphics-and-gaming/Vision-LLM-inference-on-Android-with-KleidiAI-and-MNN/Benchmark_the_performance.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Build the MNN Command-line ViT Demo
2
+
title: Benchmark the Vision Transformer performance with KleidiAI
Copy file name to clipboardExpand all lines: content/learning-paths/mobile-graphics-and-gaming/Vision-LLM-inference-on-Android-with-KleidiAI-and-MNN/Build_the_MNN_Android_Demo_with_GUI.md
+8-21Lines changed: 8 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Open up a Windows PowerShell or Git Bash and checkout the source tree:
@@ -33,28 +33,15 @@ The app code is currently not merged into the MNN repo. The repo above is a fork
33
33
34
34
## Build the app using Android Studio
35
35
36
-
Create a signing.gradle file at android/app with the following template:
37
-
```shell
38
-
ext{
39
-
signingConfigs = [
40
-
release: [
41
-
storeFile: file('PATH_TO_jks_file'),
42
-
storePassword: "****",
43
-
keyAlias: "****",
44
-
keyPassword: "****"
45
-
]
46
-
]
47
-
}
48
-
```
36
+
Open Android Studio
49
37
50
-
If you don't need to compile a release version of the app, you can skip the following step of creating a sign file and write anything in the signing.gradle.
38
+
- Navigate to **Open**.
39
+
- Browse the folder to the MNN/transformers/llm/engine/android, it will be android icon as picture show,
40
+
- Press **OK** to load the android project
41
+
- Wait for a while till the Gradle sync finish
51
42
52
-
- Navigate to **Build -> Generate Signed App Bundle or APK**.
53
-
- Select **APK** and click **next**.
54
-
- Press **Create new** and fill in the information..
55
-
- Fill in the information of the newly generated JKS file in the template above.
43
+

56
44
57
-
Open the MNN/transformers/llm/engine/android directory with Android Studio and wait for the Gradle project sync to finish.
58
45
59
46
## Prepare the model
60
47
You can download the model from ModelScope : https://www.modelscope.cn/models/qwen/qwen2-vl-2b-instruct
- --sym: the quantization parameter, means symmetrical quantization.
80
67
81
68
## Build and run the app
82
-
Before launching the app, you need to push the model into the device manually:
69
+
Before launching the app, you need to push the model into the device manually, connect the android device with the host PC with usb, and make sure the USB debugging is enable in the android device:
0 commit comments