Skip to content

Commit 5fb9f1f

Browse files
authored
Merge branch 'ArmDeveloperEcosystem:main' into main
2 parents ab9191d + 5496cd9 commit 5fb9f1f

File tree

57 files changed

+1895
-386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1895
-386
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@ startup.sh
1414
nohup.out
1515

1616
venv/
17-
z_local_saved/
17+
z_local_saved/
18+
/.idea/
19+
/tools/.python-version
20+
/.python-version
21+
*.iml
22+
*.xml
23+

.wordlist.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3872,3 +3872,48 @@ upscales
38723872
upscaling
38733873
vl
38743874
webbot
3875+
APKs
3876+
ASR's
3877+
DLRM
3878+
DLRMv
3879+
DeepSeek
3880+
Geremy
3881+
MERCHANTABILITY
3882+
MLPerf’s
3883+
MoE
3884+
NONINFRINGEMENT
3885+
NaN
3886+
OCPU
3887+
OCaml
3888+
Ollama
3889+
Ollama's
3890+
Prefill
3891+
Unsloth’s
3892+
YAMLs
3893+
Yiyang
3894+
bartowski
3895+
bc
3896+
checkboxes
3897+
deepseek
3898+
diy
3899+
fenv
3900+
gguf
3901+
highmem
3902+
inria
3903+
lfs
3904+
lora
3905+
ollama
3906+
opam
3907+
perceptrons
3908+
personalization
3909+
rclone
3910+
screenspace
3911+
significand
3912+
stdbuf
3913+
sublicense
3914+
tok
3915+
truncations
3916+
ulp
3917+
unmangled
3918+
unportable
3919+
zeropoint

content/learning-paths/cross-platform/llm-fine-tuning-for-web-applications/how-to-7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Mobile Plartform for Fine Tuning Large Language Model
2+
title: Mobile Platform for Fine Tuning Large Language Model
33
weight: 9
44

55
### FIXED, DO NOT MODIFY

content/learning-paths/embedded-and-microcontrollers/_index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ key_ip:
99
- Ethos-U
1010
maintopic: true
1111
operatingsystems_filter:
12-
- Android: 2
12+
- Android: 1
1313
- Baremetal: 32
14-
- Linux: 26
14+
- Linux: 25
1515
- macOS: 5
1616
- RTOS: 9
17-
- Windows: 4
17+
- Windows: 3
1818
subjects_filter:
1919
- CI-CD: 5
2020
- Containers and Virtualization: 6
@@ -48,13 +48,13 @@ tools_software_languages_filter:
4848
- DetectNet: 1
4949
- Docker: 9
5050
- DSTREAM: 2
51-
- ExecuTorch: 3
51+
- ExecuTorch: 2
5252
- Fixed Virtual Platform: 9
5353
- FPGA: 1
5454
- Fusion 360: 1
5555
- FVP: 1
5656
- GCC: 8
57-
- GenAI: 3
57+
- GenAI: 2
5858
- GitHub: 3
5959
- GitLab: 1
6060
- Himax SDK: 1
@@ -63,15 +63,15 @@ tools_software_languages_filter:
6363
- Keil: 7
6464
- Keil MDK: 3
6565
- Kubernetes: 1
66-
- LLM: 3
66+
- LLM: 2
6767
- MDK: 2
6868
- MPS3: 1
6969
- MXNet: 1
7070
- Neon: 1
7171
- Paddle: 1
7272
- Porcupine: 1
73-
- Python: 5
74-
- PyTorch: 3
73+
- Python: 4
74+
- PyTorch: 2
7575
- QEMU: 1
7676
- Raspberry Pi: 5
7777
- Remote.It: 1

content/learning-paths/embedded-and-microcontrollers/training-inference-pytorch/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
title: Edge AI with PyTorch & ExecuTorch - Tiny Sentiment Analysis on Arm
33

4+
draft: true
5+
cascade:
6+
draft: true
7+
48
minutes_to_complete: 90
59

610
who_is_this_for: This topic is for machine learning engineers, embedded AI developers, and researchers interested in deploying TinyML models for NLP on Arm-based edge devices using PyTorch and ExecuTorch.

content/learning-paths/mobile-graphics-and-gaming/Vision-LLM-inference-on-Android-with-KleidiAI-and-MNN/1-devenv-and-model.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,69 @@ weight: 3
55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
8+
## Install Required Software
89

9-
In this section, you will set up a development environment by installing dependencies and preparing the Qwen vision model.
10+
In this section, you'll set up your development environment by installing dependencies and preparing the Qwen vision model.
1011

11-
## Install required software
12+
Install the Android NDK (Native Development Kit) and git-lfs. This Learning Path was tested with NDK version `28.0.12916984` and CMake version `4.0.0-rc1`.
1213

13-
Install the Android NDK (Native Development Kit) and git-lfs. This learning path was tested with NDK version `28.0.12916984` and CMake version `4.0.0-rc1`.
14-
15-
For Ubuntu or Debian systems, you can install CMake and git-lfs with the following command:
14+
For Ubuntu or Debian systems, install CMake and git-lfs with the following commands:
1615

1716
```bash
1817
sudo apt update
1918
sudo apt install cmake git-lfs -y
2019
```
2120

22-
You can use Android Studio to obtain the NDK. Click **Tools > SDK Manager**, and navigate to the the SDK Tools tab. Select the NDK (Side by side) and CMake checkboxes, as shown below:
21+
You can use Android Studio to obtain the NDK.
22+
23+
Click **Tools > SDK Manager** and navigate to the **SDK Tools** tab.
24+
25+
Select the **NDK (Side by side)** and **CMake** checkboxes, as shown below:
2326

2427
![Install NDK](./install_ndk.png)
2528

26-
Refer to [Install NDK and CMake](https://developer.android.com/studio/projects/install-ndk) for other installation methods.
29+
See [Install NDK and CMake](https://developer.android.com/studio/projects/install-ndk) for other installation methods.
2730

28-
Make sure Python and pip is installed by verifying a version is printed on running this command:
31+
Ensure that Python and pip are installed by verifying the version with these commands:
2932

3033
```bash
3134
python --version
3235
pip --version
3336
```
3437

38+
You see the versions printed:
39+
40+
```output
41+
Python 3.12.3
42+
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
43+
```
44+
3545
{{% notice Note %}}
36-
The above commands may fail when Python is installed if Python 3.x is not the default version. You can try running `python3 --version` and `pip3 --version` to be sure.
46+
If Python 3.x is not the default version, try running `python3 --version` and `pip3 --version`.
3747
{{% /notice %}}
3848

39-
## Set up phone connection
49+
## Set up Phone Connection
50+
51+
You need to set up an authorized connection with your phone. The Android SDK Platform Tools package, included with Android Studio, provides Android Debug Bridge (ADB) for transferring files.
4052

41-
You will need to set up an authorized connection with your phone. The Android SDK Platform Tools package, included in Android Studio, comes with Android Debug Bridge (ADB). You will use this tool to transfer files later on.
53+
Connect your phone to your computer using a USB cable, and enable USB debugging on your phone. To do this, tap the **Build Number** in your **Settings** app 7 times, then enable **USB debugging** in **Developer Options**.
4254

43-
Connect your phone to the computer using a USB cable. You will need to activate USB debugging on your phone. Find the **Build Number** in your **Settings** app and tap it 7 times. Then, enable **USB debugging** in **Developer Options**.
55+
Verify the connection by running:
4456

45-
You should now see your device listed upon running `adb devices`:
57+
```console
58+
adb devices
59+
```
60+
61+
If your device is connected you see it listed with your device id:
4662

4763
```output
4864
List of devices attached
4965
<DEVICE ID> device
5066
```
5167

52-
## Download and convert the model
68+
## Download and Convert the Model
5369

54-
The following commands download the model from Hugging Face, and clones a tool for exporting LLM model to the MNN framework.
70+
The following commands download the model from Hugging Face, and clone a tool for exporting the LLM model to the MNN framework.
5571

5672
```bash
5773
cd $HOME
@@ -60,8 +76,7 @@ huggingface-cli download Qwen/Qwen2-VL-2B-Instruct --local-dir ./Qwen2-VL-2B-Ins
6076
git clone https://github.com/wangzhaode/llm-export
6177
cd llm-export && pip install .
6278
```
63-
64-
You can use the `llm-export` repository to quantize the model with the following options:
79+
Use the `llm-export` repository to quantize the model with these options:
6580

6681
```bash
6782
llmexport --path ../Qwen2-VL-2B-Instruct/ --export mnn --quant_bit 4 \
@@ -72,13 +87,13 @@ The table below gives you an explanation of the different arguments:
7287

7388
| Parameter | Description | Explanation |
7489
|------------------|-------------|--------------|
75-
| `--quant_bit` | mnn quant bit, 4 or 8, default is 4 | `4` represents q4 quantization. |
76-
| `--quant_block` | mnn quant block, default is 0 | `0` represents per-channel quantization, `128` represents 128 per-block quantization. |
77-
| `--sym` | symmetric quantization (without zeropoint), defualt is False. | The quantization parameter that enables symmetrical quantization. |
90+
| `--quant_bit` | MNN quant bit, 4 or 8, default is 4. | `4` represents q4 quantization. |
91+
| `--quant_block` | MNN quant block, default is 0. | `0` represents per-channel quantization; `128` represents 128 per-block quantization. |
92+
| `--sym` | Symmetric quantization (without zeropoint); default is False. | The quantization parameter that enables symmetrical quantization. |
7893

79-
To learn more about the parameters, refer to the [transformers README.md](https://github.com/alibaba/MNN/tree/master/transformers).
94+
To learn more about the parameters, see the [transformers README.md](https://github.com/alibaba/MNN/tree/master/transformers).
8095

81-
Verify the model is built correct by checking the size of the resulting model. The `Qwen2-VL-2B-Instruct-convert-4bit-per_channel` directory should be at least 1 GB in size.
96+
Verify that the model was built correctly by checking that the `Qwen2-VL-2B-Instruct-convert-4bit-per_channel` directory is at least 1 GB in size.
8297

8398
Push the model onto the device:
8499

@@ -87,4 +102,4 @@ adb shell mkdir /data/local/tmp/models/
87102
adb push Qwen2-VL-2B-Instruct-convert-4bit-per_channel /data/local/tmp/models
88103
```
89104

90-
With the model set up, it's time to use Android Studio to build and run an example application.
105+
With the model set up, you're ready to use Android Studio to build and run an example application.

content/learning-paths/mobile-graphics-and-gaming/Vision-LLM-inference-on-Android-with-KleidiAI-and-MNN/2-generate-apk.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ weight: 4
66
layout: learningpathall
77
---
88

9-
In this section, you will try the Qwen model in action using a demo application using a Android Package Kit (APK)
10-
119
## Clone MNN repo
1210

13-
A fork of the upstream MNN repository is set up to enable building the app as an Android Studio project. Run the following to clone the repository and checkout the source tree:
11+
In this section, you will run the Qwen model in action using a demo application using a Android Package Kit (APK).
12+
13+
A fork of the upstream MNN repository is set up to enable building the app as an Android Studio project.
14+
15+
Run the following commands to clone the repository and checkout the source tree:
1416

1517
```bash
1618
cd $HOME
@@ -19,19 +21,25 @@ cd MNN
1921
git checkout origin/llm_android_demo
2022
```
2123

22-
## Build the app using Android Studio
24+
## Build the App Using Android Studio
25+
26+
You can use Android Studio to build the app and create an APK.
2327

2428
### Open project and build
2529

26-
Open Android Studio. Go to **File > Open**. Navigate to the MNN repository you just cloned. Expand the `transformers/llm/engine/` directories, select the `android` one and click `Open`.
30+
Open Android Studio.
31+
32+
Go to **File > Open**.
33+
34+
Navigate to the cloned MNN repository, expand the `transformers/llm/engine/` directories, select the `android` directory, and click `Open`.
2735

28-
This will trigger a build of the project, and you should see a similar output on completion:
36+
This triggers a build of the project, and you should see output similar to the following on completion:
2937

3038
```output
3139
BUILD SUCCESSFUL in 1m 42s
3240
```
3341

34-
### Generate and run the APK
42+
### Generate and Run the APK
3543

3644
Navigate to **Build > Generate App Bundles or APKs**. Select **Generate APKs**.
3745

0 commit comments

Comments
 (0)