whatisgithub

What is mnn?

deftruth/mnn — explained in plain English

Analysis updated 2026-07-14 · repo last pushed 2023-04-29

C++Audience · developerComplexity · 4/5DormantLicenseSetup · moderate

In one sentence

MNN is a lightweight engine from Alibaba that runs AI models directly on phones and small devices. It converts heavy models into a compact format so apps can do real-time AI without a server.

Mindmap

mindmap
  root((repo))
    What it does
      Runs AI on devices
      Converts heavy models
      Compresses model size
    Use cases
      Live video effects
      Visual shopping search
      Smart IoT cameras
    Tech stack
      C++
      Assembly optimizations
      Minimal dependencies
    Audience
      App founders
      Product managers
      IoT engineers
    Key strengths
      Tiny package size
      Fast on-device inference
      Visual workbench tool
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add real-time video filters or effects to a social app that run on the user's phone.

USE CASE 2

Build visual search into a shopping app so users can snap a photo to find products.

USE CASE 3

Run AI models on IoT devices like smart cameras where a full framework won't fit.

USE CASE 4

Deploy AI models to mobile devices using the included visual workbench tool.

What is it built with?

C++AssemblyTensorFlowPyTorchiOSAndroid

How does it compare?

deftruth/mnndaviddrysdale/pkcs11testhook12aaa/qwen3-mlx
Stars0
LanguageC++C++C++
Last pushed2023-04-292023-01-18
MaintenanceDormantDormant
Setup difficultymoderatemoderatehard
Complexity4/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires converting an existing AI model to MNN format and integrating the C++ engine into a mobile or embedded project.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

MNN is a tool that lets you run artificial intelligence models directly on phones and small devices, rather than requiring a powerful server. Created by Alibaba and used in over 30 of their apps, it is designed to be incredibly fast and take up very little space. This means apps can do things like real-time video filtering, image-based search, and smart recommendations without making the user wait or draining their battery. At a high level, it works as a translation and execution engine for AI. Most AI models are built using popular frameworks like TensorFlow or PyTorch, which are too heavy to run efficiently on a mobile phone. MNN takes those heavy models, converts them into its own lightweight format, and compresses them to be smaller. Once converted, the app uses MNN to run the model directly on the device's processor, taking advantage of the specific hardware, whether that is a phone's CPU, its graphics processor, or a specialized AI chip. A startup founder building a social app with live video effects, or a product manager adding visual search to a shopping app, would use this to ensure the features run smoothly on a user's phone. It is also useful for engineers building Internet of Things devices, like smart cameras, where there is not enough space for a full-sized AI framework. The project even includes a visual workbench tool that helps teams deploy their models to devices with a single click. What makes this project notable is how much effort goes into wringing performance out of limited hardware. The creators wrote core parts of it in highly optimized assembly code to make calculations run as fast as possible on standard phone chips. They also designed it to have virtually no external dependencies, meaning it will not bloat your app with unnecessary background software. The package size on an iPhone is only about 2MB, and on Android it can be as small as 800KB.

Copy-paste prompts

Prompt 1
I have a PyTorch model for image classification. How do I convert it to MNN format and run it on an Android app with minimal package size?
Prompt 2
Help me set up MNN to run a real-time video filtering model on iPhone, taking advantage of the GPU for maximum speed.
Prompt 3
I want to deploy a TensorFlow model to a smart camera using MNN. Walk me through converting the model, compressing it, and running inference on-device.
Prompt 4
Show me how to use the MNN visual workbench to deploy a model to a mobile device with a single click.

Frequently asked questions

What is mnn?

MNN is a lightweight engine from Alibaba that runs AI models directly on phones and small devices. It converts heavy models into a compact format so apps can do real-time AI without a server.

What language is mnn written in?

Mainly C++. The stack also includes C++, Assembly, TensorFlow.

Is mnn actively maintained?

Dormant — no commits in 2+ years (last push 2023-04-29).

What license does mnn use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is mnn to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is mnn for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.