alibaba/MNN

▲ 64 stars today★ 16,593⑂ 2,545

MNN: A blazing-fast, lightweight inference engine battle-tested by Alibaba, powering high-performance on-device LLMs and Edge AI.

About alibaba/MNN

alibaba/MNN is an open-source project on GitHub, mainly written in C++. MNN: A blazing-fast, lightweight inference engine battle-tested by Alibaba, powering high-performance on-device LLMs and Edge AI. It currently holds 16,593 stars and 2,545 forks with 112 open issues, and was last pushed on 2026-11-20 (repository created 2019-04-15).

Project Overview

AI Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository alibaba/MNN · default branch master · size 369913 KB · watchers 237 · source: GitHub REST API and repository README

README

MNN --- License Documentation 簡體中文版本 繁體中文版本 日本語バージョン MNN Homepage zread

MNN Chat App TaoAvatar Sana

News 🔥

ModelScope | Hugging Face | Technical report
History News
  • [2026/07/22] MNN 3.6.1 is released with a new 🚀 Hexagon backend, enabling accelerated model inference on Qualcomm Hexagon DSPs. Learn more.
  • [2026/03/05] Support Qwen3.5 Series.

https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon

  • [2026/02/13] MNN-Sana-Edit-V2 is now available at apps, offering cartoon-style photo editing based on Sana.

https://github.com/alibaba/MNN/blob/HEAD/Icon

  • [2025/10/16] Support Qwen3-VL Series.
  • [2025/06/11] New App MNN TaoAvatar released, you can talk with 3DAvatar offline with LLM, ASR, TTS, A2BS and NNR models all run local on your device!! MNN TaoAvatar

https://github.com/alibaba/MNN/blob/HEAD/Icon

  • [2025/05/12] android app support qwen2.5 omni 3b and 7b MNN Chat App.

https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon

  • [2025/04/30] android app support qwen3 and dark mode MNN Chat App.

https://github.com/alibaba/MNN/blob/HEAD/Icon

  • [2025/02/18] iOS multimodal LLM App is released MNN LLM iOS.

https://github.com/alibaba/MNN/blob/HEAD/Icon

https://github.com/alibaba/MNN/blob/HEAD/Icon

  • [2025/01/23] We released our full multimodal LLM Android App:MNN-LLM-Android. including text-to-text, image-to-text, audio-to-text, and text-to-image generation.

https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon https://github.com/alibaba/MNN/blob/HEAD/Icon

Intro

MNN is a highly efficient and lightweight deep learning framework. It supports inference and training of deep learning models and has industry-leading performance for inference and training on-device. At present, MNN has been integrated into more than 30 apps of Alibaba Inc, such as Taobao, Tmall, Youku, DingTalk, Xianyu, etc., covering more than 70 usage scenarios such as live broadcast, short video capture, search recommendation, product searching by image, interactive marketing, equity distribution, security risk control. In addition, MNN is also used on embedded devices, such as IoT.

MNN-LLM is a large language model runtime solution developed based on the MNN engine. The mission of this project is to deploy LLM models locally on everyone's platforms(Mobile Phone/PC/IOT). It supports popular large language models such as Qianwen, Baichuan, Zhipu, LLAMA, and others. MNN-LLM User guide

MNN-Diffusion is a stable diffusion model runtime solution developed based on the MNN engine. The mission of this project is to deploy stable diffusion models locally on everyone's platforms. MNN-Diffusion User guide

architecture

Inside Alibaba, MNN works as the basic module of the compute container in the Walle System, the first end-to-end, general-purpose, and large-scale production system for device-cloud collaborative machine learning, which has been published in the top system conference OSDI’22. The key design principles of MNN and the extensive benchmark testing results (vs. TensorFlow, TensorFlow Lite, PyTorch, PyTorch Mobile, TVM) can be found in the OSDI paper. The scripts and instructions for benchmark testing are put in the path “/benchmark”. If MNN or the design of Walle helps your research or production use, please cite our OSDI paper as follows:

@inproceedings {proc:osdi22:walle, author = {Chengfei Lv and Chaoyue Niu and Renjie Gu and Xiaotang Jiang and Zhaode Wang and Bin Liu and Ziqi Wu and Qiulin Yao and Congyu Huang and Panos Huang and Tao Huang and Hui Shu and Jinde Song and Bin Zou and Peng Lan and Guohuan Xu and Fei Wu and Shaojie Tang and Fan Wu and Guihai Chen}, title = {Walle: An {End-to-End}, {General-Purpose}, and {Large-Scale} Production System for {Device-Cloud} Collaborative Machine Learning}, booktitle = {16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22)}, year = {2022}, isbn = {978-1-939133-28-1}, address = {Carlsbad, CA}, pages = {249--265}, url = {https://www.usenix.org/conference/osdi22/presentation/lv}, publisher = {USENIX Association}, month = jul, }

Documentation and Workbench

MNN's docs are in place in Read the docs.

You can also read docs/README to build docs's html.

MNN Workbench could be downloaded from MNN's homepage, which provides pretrained models, visualized training tools, and one-click deployment of models to devices.

Key Features

Lightweight

Versatility

High performance

Ease of use

The Architecture / Precision MNN supported is shown below: | Architecture / Precision | | Normal | FP16 | BF16 | INT8 / INT4 | | --- | --- | --- | --- | --- | --- | | CPU | Native | B | C | B | B | | | x86/x64-SSE4.1 | A | C | C | A | | | x86/x64-AVX2 | S | C | C | A | | | x86/x64-AVX512 | S | C | C | S | | | ARMv7a | S | C | S | S | | | ARMv8 | S | S (ARMv8.2) | S(ARMv8.6) | S | | | ARMv9 (SME2) | S | S | B | S | | | RISC-V (RVV) | A | C | C | B | | GPU | OpenCL | A | S | C | S | | | Vulkan | A | A | C | A | | | Metal | A | S | C | S | | | CUDA | A | S | C | A | | NPU | CoreML | A | A | C | C | | | Hexagon | A | A | C | B | | | NeuroPilot | B | B | C | B | | | HIAI | A | C | C | C | | | NNAPI | B | B | C | B | | | QNN | C | B | C | A |

CoreML primarily uses FP16 MIL tensors and weights in Precision_Normal; Precision_Low is not a separate execution path. Core ML selects the compute device for each operation.

Hexagon uses FP16 device tensors even with normal-precision host input.

ARMv9 can use ARMv8 paths; SME2 acceleration requires a supported CPU and build configuration. BF16 uses the existing ARM path and requires MNN_SUPPORT_BF16. RISC-V IME2 optimizations target SpacemiT K3.

INT8 / INT4 ratings cover supported quantized model paths, including weight-only quantization; they do not imply full integer execution for every operator. Hexagon LLM currently documents symmetric INT4 weights with FP16 activations. QNN support depends on the target and quantization configuration.

Tools

Base on MNN (Tensor compute engine), we provided a series of tools for inference, train and general computation.

How to Discuss and Get Help From the MNN Community

The group discussions are predominantly Chinese. But we welcome and will help English speakers.

Dingtalk discussion groups:

Group #4 (Available): 160170007549

Group #3 (Full)

Group #2 (Full): 23350225

Group #1 (Full): 23329087

Historical Paper

The preliminary version of MNN, as mobile inference engine and with the focus on manual optimization, has also been published in MLSys 2020. Please cite the paper, if MNN previously helped your research:

@inproceedings{alibaba2020mnn, author = {Jiang, Xiaotang and Wang, Huan and Chen, Yiliu and Wu, Ziqi and Wang, Lichuan and Zou, Bin and Yang, Yafeng and Cui, Zongyang and Cai, Yu and Yu, Tianhang and Lv, Chengfei and Wu, Zhihua}, title = {MNN: A Universal and Efficient Inference Engine}, booktitle = {MLSys}, year = {2020} }

License

Apache 2.0

Acknowledgement

MNN participants: Taobao Technology Department, Search Engineering Team, DAMO Team, Youku and other Alibaba Group employees.

MNN refers to the following projects:

GitHub Stars & Activity

16,593Stars
2,545Forks
112Open issues
C++Language

GitHub Popularity

GitHub stars16,593
Forks2,545
Open issues112
Primary languageC++
LicenseApache-2.0
Stars gained today64
Created2019-04-15
Last pushed2026-11-20

Trending History

Weekly boardrank #77 · ▲ 64 stars

Related AI Projects

1

microsoft / BitNet

C++★ 42,441⑂ 4,010▲ 35 stars
→
2

k2-fsa / sherpa-onnx

C++★ 16,170⑂ 1,913▲ 68 stars
→
3

openvinotoolkit / openvino

C++★ 12,250⑂ 3,677▲ 183 stars
→
4

kvcache-ai / Mooncake

C++★ 7,118⑂ 1,522▲ 12 stars
→
5

incoai / splash

C++★ 2,675⑂ 254▲ 47 stars
→
6

intrinsic-ai / intrinsic-core

C++★ 782⑂ 100▲ 5 stars
→
7

mattpocock / skills

Shell★ 331,272⑂ 27,830▲ 759 stars
→
8

obra / superpowers

Shell★ 324,910⑂ 28,822▲ 838 stars
→

More AI Rankings