mnn
C methods for MNN Package
Decision gist · record as of 2026-08-14
Yes. MNN is a mature, actively maintained framework (latest release 23 days old, 15881 GitHub stars) with permissive BSD-3 licensing and zero known vulnerabilities. It solves a real problem—efficient on-device neural network inference—with proven production use across 30+ Alibaba applications. The single numpy dependency and broad platform support (Python 3.8–3.14, macOS/Linux/Windows) make installation straightforward. Install if you need to deploy models to mobile, embedded, or resource-constrained environments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a pre-converted MNN model file (.mnn format); models must be converted from TensorFlow, Caffe, ONNX, or TorchScript using MNN-Converter before inference.
- Medium install friction due to precompiled wheels for multiple Python versions (3.8–3.14) and platforms (macOS, Linux, Windows).
- Active maintenance with a recent release (23 days old) and strong repository activity (15881 stars, last commit 2026-08-14).
License · maintenance · safety
BSD-3 (permissive) — BSD-3 permissive license allows commercial and private use with minimal restrictions, making it suitable for proprietary applications and production deployments.
last release 2026-07-22 (23 days) · last repo commit 2026-08-14 · 15,881 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 210,401 downloads/mo, #9,493 on PyPI
Alternatives
Verify before relying
import mnn
import numpy as np
# Load and run inference on a model
interpreter = mnn.Interpreter('model.mnn')
session = interpreter.createSession()
output = interpreter.runSession(session)- Specific performance benchmarks comparing MNN to TensorFlow Lite, PyTorch Mobile, and TVM on representative models.
- Quantization support details for FP16, BF16, and Int8 across all supported architectures and backends.
- Availability and maturity of the Hexagon backend (released 2026-07-22) on real Qualcomm devices.
- Python API coverage for training workflows versus inference-only capabilities.
What it is and what it does
MNN is a production-grade deep learning framework designed for efficient on-device inference and training. It abstracts away the complexity of deploying neural networks across heterogeneous hardware—CPUs (ARM, x86/x64), GPUs (Metal, OpenCL, Vulkan, CUDA), and NPUs (CoreML, HIAI, NNAPI)—while keeping binary size small (12MB on iOS, 800KB on Android core). The framework supports model conversion from TensorFlow, Caffe, ONNX, and TorchScript, and includes graph optimization, quantization (FP16, Int8), and a lightweight image processing library. It powers inference in over 30 Alibaba applications across live broadcast, video capture, search, and recommendation systems.
Developers use MNN to deploy trained models locally on mobile phones, IoT devices, and edge servers without cloud dependencies. The Python API provides a high-level interface for inference, training, and image processing without requiring C++ knowledge. MNN also includes specialized runtimes: MNN-LLM for large language models (supporting Qianwen, Baichuan, LLAMA) and MNN-Diffusion for stable diffusion models, both designed to run entirely on-device.
Use it for
- Deploy trained deep learning models to iOS and Android apps for real-time inference without cloud calls.
- Run large language models (Qianwen, Baichuan, LLAMA) locally on mobile devices and edge servers.
- Optimize and quantize neural networks to reduce model size by 50–70% for memory-constrained devices.
- Build computer vision pipelines (image classification, object detection) on embedded IoT devices.
- Generate images using stable diffusion models entirely on-device without external APIs.
- Accelerate inference on Qualcomm Hexagon DSPs using the new Hexagon backend for power-efficient processing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
MNN is a mature, actively maintained framework (latest release 23 days old, 15881 GitHub stars) with permissive BSD-3 licensing and zero known vulnerabilities. It solves a real problem—efficient on-device neural network inference—with proven production use across 30+ Alibaba applications. The single numpy dependency and broad platform support (Python 3.8–3.14, macOS/Linux/Windows) make installation straightforward. Install if you need to deploy models to mobile, embedded, or resource-constrained environments.
Install
mnn on PyPI
Before you install
Medium install friction due to precompiled wheels for multiple Python versions (3.8–3.14) and platforms (macOS, Linux, Windows). Active maintenance with a recent release (23 days old) and strong repository activity (15881 stars, last commit 2026-08-14). Single runtime dependency on numpy keeps the footprint lean.
Requires a pre-converted MNN model file (.mnn format); models must be converted from TensorFlow, Caffe, ONNX, or TorchScript using MNN-Converter before inference.
License in practice
BSD-3 permissive license allows commercial and private use with minimal restrictions, making it suitable for proprietary applications and production deployments.
Quickstart
import mnn
import numpy as np
# Load and run inference on a model
interpreter = mnn.Interpreter('model.mnn')
session = interpreter.createSession()
output = interpreter.runSession(session)
Verify before relying
- Specific performance benchmarks comparing MNN to TensorFlow Lite, PyTorch Mobile, and TVM on representative models.
- Quantization support details for FP16, BF16, and Int8 across all supported architectures and backends.
- Availability and maturity of the Hexagon backend (released 2026-07-22) on real Qualcomm devices.
- Python API coverage for training workflows versus inference-only capabilities.
Package facts
| License | BSD-3 permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 210,401 / month, #9,493 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: C++Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: mnn-3.6.1-cp310-cp310-macosx_11_0_arm64.whl; mnn-3.6.1-cp310-cp310-macosx_11_0_x86_64.whl; mnn-3.6.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; mnn-3.6.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; mnn-3.6.1-cp310-cp310-win_amd64.whl; mnn-3.6.1-cp311-cp311-macosx_11_0_arm64.whl; mnn-3.6.1-cp311-cp311-macosx_11_0_x86_64.whl; mnn-3.6.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; mnn-3.6.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; mnn-3.6.1-cp311-cp311-win_amd64.whl; mnn-3.6.1-cp312-cp312-macosx_11_0_arm64.whl; mnn-3.6.1-cp312-cp312-macosx_11_0_x86_64.whl; mnn-3.6.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; mnn-3.6.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; mnn-3.6.1-cp312-cp312-win_amd64.whl; mnn-3.6.1-cp313-cp313-macosx_11_0_arm64.whl; mnn-3.6.1-cp313-cp313-macosx_11_0_x86_64.whl; mnn-3.6.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; mnn-3.6.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; mnn-3.6.1-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cross-platform ML inference”
- mnnMNN is a lightweight deep learning inference and training framework…
- mediapipeMediaPipe provides pre-built machine learning models and…
- onnxmltoolsConverts machine learning models from multiple frameworks…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also ncnn · tflite-runtime · ai-edge-litert · ai-edge-litert-nightly · executorch · mediapipe · netron · nvidia-cudnn-cu13 · tensorflow · onnxslim