UbiquitousLearning/mllm
Fast Multimodal LLM on Mobile Devices
What it solves
mllm is a fast and lightweight multimodal LLM inference engine designed specifically for mobile and edge devices. It addresses the challenge of running large vision-language models (VLMs) and LLMs locally on hardware with limited resources, such as smartphones and embedded systems, without relying on cloud servers.
How it works
The engine acts as a bridge between high-level optimization algorithms and low-level hardware execution layers. It uses a conversion tool (mllm-convertor) to ingest PyTorch and SafeTensors models, quantizing and converting them into a proprietary mllm format for execution.
Key technical components include:
- Hardware Backends: Support for Arm CPU, OpenCL GPU, QNN NPU, and Ascend NPU.
- Optimizations: Implementation of quantization (e.g., W4A16, W8A8), pruning, and speculative execution to reduce memory and compute requirements.
- Architecture: On Android, it employs a Client-Server architecture using an In-App Go Server to decouple the UI from heavy inference tasks.
- Graph Execution: A
traceAPI allows for computational graph extraction, converting dynamic execution into optimized static representations for NPU integration.
Who it’s for
Developers and engineers building on-device AI applications for Android, Jetson Orin, and other edge devices who need high-performance local inference for multimodal models.
Highlights
- Broad Hardware Support: Runs on Arm CPUs, OpenCL GPUs, and NPUs from Qualcomm (QNN) and Huawei (Ascend).
- High Performance on Edge: Demonstrates significant prefill speedups (up to 3.12x on Jetson Orin for specific models) compared to llama.cpp.
- Extensive Model Zoo: Supports a wide range of models including Qwen series (Qwen3, Qwen2-VL), MiniCPM, Llama 3, and DeepSeek-OCR.
- Developer Friendly: Provides a Pythonic API for model authoring and a C++ SDK for integration.
Related
- Project
- Project
- Project
- Project
- Project