| Demo | Performance | Models | Quick Start | Issues |
OmniInfer-LLM is the central orchestrator repository for deploying end-to-end Visual Language Model (VLM) inference on mobile devices using a hybrid NPU acceleration strategy.
This repository ties together:
Together, these form a complete pipeline for running models such as Qwen2.5-VL on-device with both image and text understanding.
Below are two examples of running OmniInfer-LLM as a chatbot on the OnePlus Ace5 Pro.
Vision-Language Models consist of two major components:
To balance these needs effectively, OmniInfer-LLM uses:
This hybrid approach enables efficient, production-ready VLM inference on real mobile devices.
OmniInfer-LLM sets a new benchmark for on-device VLM inference. Compared to existing frameworks like llama.cpp, MNN, and PowerServe, OmniInfer provides significant advantages in latency and throughput.
Purpose: The integration layer that connects vision and language inference:
Purpose: Vision encoder (ViT) inference powered by a custom llama.cpp NPU backend.
Responsibilities:
Purpose: Common NPU operator library and backend support.
Responsibilities:
Input: Image + Text Prompt
│
▼
[OmniInfer-VLM]
ViT encoding (llama.cpp with NPU)
│
▼
Visual Embeddings
│
▼
[OmniInfer-LLM]
LLM decoding (ExecuTorch with NPU)
│
▼
Output: Generated Text
Follow omnimind-ai/OmniInfer-VLM to generate mtmd_data.bin
examples/models/llama/install_requirements.shPrepare Model (Qwen2.5 VL)
python examples/qualcomm/oss_scripts/llama/llama.py -b build-android -s ${SERIAL_NUM} -m ${SOC_MODEL} --prompt "How are you?" --temperature 0 --model_mode hybrid --prefill_ar_len 128 --max_seq_len 2048 --decoder_model qwen2_5_vl_3b --artifact ./qwen_qnn
It will automatically push the model to the device and run it. But please make sure to place the previously generated mtmd_data.bin in the corresponding path first. You can also prepare the files manually and run them yourself.
adb shell
cd /data/local/tmp/${username}/executorch/single_llama
./qnn_llama_runner --decoder_model_version qwen2_5 --tokenizer_path tokenizer.json --model_path hybrid_llama_qnn.pte --seq_len 2048 --output_path outputs/outputs.txt --kv_updater SmartMask --eval_mode 1 --embeds_path mtmd_data.bin
| Requirement | Single Engine | OmniInfer Hybrid |
|---|---|---|
| Variable image input | ❌ | ✅ (llama.cpp ViT) |
| Efficient LLM decoding | ❌ | ✅ (ExecuTorch NPU) |
| Unified inference | ❌ | ⚡️ Balanced execution |
| On-device production | ⚠️ | ✅ |
This strategy avoids forcing one runtime to do everything sub-optimally, resulting in better performance and broader model support.
This project is licensed under the Apache License, Version 2.0.
This repository contains code derived from the following open-source project:
If you have any questions, feedback, or would like to join our community, please feel free to reach out.
Python
49.5%
C++
38.0%
Objective-C++
3.1%
Starlark
2.3%
GLSL
1.8%
CMake
1.4%
| Demo | Performance | Models | Quick Start | Issues |
OmniInfer-LLM is the central orchestrator repository for deploying end-to-end Visual Language Model (VLM) inference on mobile devices using a hybrid NPU acceleration strategy.
This repository ties together:
Together, these form a complete pipeline for running models such as Qwen2.5-VL on-device with both image and text understanding.
Below are two examples of running OmniInfer-LLM as a chatbot on the OnePlus Ace5 Pro.
Vision-Language Models consist of two major components:
To balance these needs effectively, OmniInfer-LLM uses:
This hybrid approach enables efficient, production-ready VLM inference on real mobile devices.
OmniInfer-LLM sets a new benchmark for on-device VLM inference. Compared to existing frameworks like llama.cpp, MNN, and PowerServe, OmniInfer provides significant advantages in latency and throughput.
Purpose: The integration layer that connects vision and language inference:
Purpose: Vision encoder (ViT) inference powered by a custom llama.cpp NPU backend.
Responsibilities:
Purpose: Common NPU operator library and backend support.
Responsibilities:
Input: Image + Text Prompt
│
▼
[OmniInfer-VLM]
ViT encoding (llama.cpp with NPU)
│
▼
Visual Embeddings
│
▼
[OmniInfer-LLM]
LLM decoding (ExecuTorch with NPU)
│
▼
Output: Generated Text
Follow omnimind-ai/OmniInfer-VLM to generate mtmd_data.bin
examples/models/llama/install_requirements.shPrepare Model (Qwen2.5 VL)
python examples/qualcomm/oss_scripts/llama/llama.py -b build-android -s ${SERIAL_NUM} -m ${SOC_MODEL} --prompt "How are you?" --temperature 0 --model_mode hybrid --prefill_ar_len 128 --max_seq_len 2048 --decoder_model qwen2_5_vl_3b --artifact ./qwen_qnn
It will automatically push the model to the device and run it. But please make sure to place the previously generated mtmd_data.bin in the corresponding path first. You can also prepare the files manually and run them yourself.
adb shell
cd /data/local/tmp/${username}/executorch/single_llama
./qnn_llama_runner --decoder_model_version qwen2_5 --tokenizer_path tokenizer.json --model_path hybrid_llama_qnn.pte --seq_len 2048 --output_path outputs/outputs.txt --kv_updater SmartMask --eval_mode 1 --embeds_path mtmd_data.bin
| Requirement | Single Engine | OmniInfer Hybrid |
|---|---|---|
| Variable image input | ❌ | ✅ (llama.cpp ViT) |
| Efficient LLM decoding | ❌ | ✅ (ExecuTorch NPU) |
| Unified inference | ❌ | ⚡️ Balanced execution |
| On-device production | ⚠️ | ✅ |
This strategy avoids forcing one runtime to do everything sub-optimally, resulting in better performance and broader model support.
This project is licensed under the Apache License, Version 2.0.
This repository contains code derived from the following open-source project:
If you have any questions, feedback, or would like to join our community, please feel free to reach out.
Python
49.5%
C++
38.0%
Objective-C++
3.1%
Starlark
2.3%
GLSL
1.8%
CMake
1.4%