Arm/qwen3-vl-2b-instruct-q4-k-m-ggml-llama-cpp-vivo-x300
Qwen3-VL-2B-Instruct optimized for Arm-based mobile CPUs with SME2
Qwen3-VL-2B-Instruct vision-language generation, with the text decoder quantized to Q4KM and the vision projector kept at Q8_0, exported as a GGUF .gguf pair for the llama.cpp runtime on Arm-based mobile CPUs with SME2.
Summary
This repository contains an Arm-optimized version of Qwen/Qwen3-VL-2B-Instruct for image-and-text to text generation. The model is provided as GGUF .gguf files for the llama.cpp runtime, targeting Mobile CPU systems.
A vision-language model is consumed by llama.cpp as a pair of files, and both are shipped here: the text decoder, quantized to Q4KM — a mixed scheme, not a uniform 4-bit one: most weight tensors are INT4 (Q4K), the more sensitive ones INT6 (Q6K), activations are dynamically quantized to INT8 at runtime, and the normalization tensors stay in FP32 — and an mmproj sibling holding the vision encoder and projector, kept at Q8_0. The projector never passes through llama-quantize, and the importance matrix used for the text decoder is not applied to it — an importance matrix collected on the decoder describes nothing about vision-tower activations. The text GGUF alone cannot see images; the two files must be loaded together.
This version is intended to demonstrate efficient inference on Arm-based platforms while preserving the original model's intended behavior. Arm evaluated this model on MMLU-Redux 2.0 and measured performance on a representative evaluation target.
Key results
Original model
Model files
Performance
Performance was measured on the reference configuration below. Results are intended to make the optimization reproducible but do not guarantee identical performance on every Arm-based system.
Reference configuration
Performance results
The benched shape is a 512-token prompt with 128 generated tokens.
Accuracy
Accuracy was evaluated using the same preprocessing, input resolution, and evaluation protocol described below. Where possible, the optimized model is compared against the original model under the same evaluation conditions.
Evaluation setup
Scoring follows the lettered multiple-choice formulation that published MMLU-family numbers use: subject header, lettered options, prompt ending in "Answer:", and only the next-token logits for the option letters are scored. Same-subject exemplars are prepended from MMLU's own dev split, and no chat template is applied.
Accuracy results
MMLU-Redux is a text benchmark. It measures the quantized decoder, which is the only half of the pair this recipe touches, but it says nothing about image grounding. Users who care about the vision path should evaluate it separately.
Accuracy was measured using the evaluation setup described above. Users should re-evaluate the model on their own data before production use.
Arm optimization approach
Arm optimized this model for efficient inference on Arm-based platforms using a hardware-aware conversion and validation flow.
For this release, Arm used:
The goal of this process is to improve deployment characteristics such as latency, memory use, model size, and runtime compatibility while preserving the model's intended behavior. Detailed conversion scripts, calibration configuration, or backend-specific implementation details may be provided separately where appropriate.
Using this model
Install dependencies
Dependencies are declared in pyproject.toml, which ships with this repository. Resolve and install them into a local virtual environment with uv:
uv python install
uv sync --frozenllama-cpp-python publishes no wheels on PyPI, so this compiles the vendored llama.cpp from source on first install; cmake and a C++ compiler must be present.
Download the model
Download both GGUF files from this repository and place them next to example.py. The text decoder alone cannot see images, so the example checks for both up front and fails with the missing filename rather than running half the pair.
Run the example
uv run example.pyNote: The Python/uv example runs on AWS Graviton (Ubuntu arm64) to confirm runtime compatibility only, and is intended as a guideline for building an equivalent run script on Mobile CPU systems.
The same pair can be served over an OpenAI-compatible endpoint, using the llama-server binary from a llama.cpp build:
llama-server \
-m Qwen__Qwen3-VL-2B-Instruct_llamacpp_optimized.gguf \
--mmproj Qwen__Qwen3-VL-2B-Instruct_llamacpp_optimized_mmproj.gguf \
--jinja -c 4096The --jinja flag is load-bearing: without it the server falls back to a generic chat template and the model never sees its own image and control tokens.
Expected input
Expected output
Intended use
This model is intended for developers evaluating image-text-to-text workloads on Arm-based platforms. It is suitable as a reference implementation for benchmarking, prototyping, and integration exploration.
Limitations
- Performance depends on the target device, runtime version, backend/delegate support, memory configuration, and system load.
- Accuracy was evaluated on MMLU-Redux 2.0 test (text, 5-shot) and may not generalize to all domains, and does not cover image grounding at all.
- This release preserves the original model's intended task and behavior, but users should validate it for their own application, data, and deployment environment.
- This repository is not a replacement for the original model documentation.
Additional notes
- The pair must stay together. The mmproj sibling,
Qwen__Qwen3-VL-2B-Instruct_llamacpp_optimized_mmproj.gguf, is published alongside the text decoder; loading the decoder without it yields a text-only model that silently ignores images rather than failing. libmtmd, which loads the pair, ships in the llama-mtmd-cli and llama-server binaries from a llama.cpp build. - The on-device figures cover the text decoder only: upstream llama-bench has no projector support, so the vision tower never reached the phone. There is no image-encoding cost in them, and peak memory understates real multimodal inference by the projector's residency plus vision KV.
- The baseline is f16, not bf16. ggml has no aarch64 bf16 kernel, so a bf16 reference would be measured through a scalar fallback and would inflate every speedup ratio. Re-encoding the bf16 checkpoint to f16 is exact for every weight in f16's normal range and loses precision only on weights small enough to fall into f16 subnormals.
- The model records a context length of 262144; the evaluated configuration used a 4096-token window.
- Sample input:
sample_input.jpgis derived from Living room (Unsplash).jpg) by Jarosław Ceborski, via Wikimedia Commons (CC0 1.0).
About this version
Original Model: Qwen/Qwen3-VL-2B-Instruct by Alibaba Cloud (Qwen team) - Repository
Optimization/conversion: Arm-Optimized version for execution on Arm-based platforms.
Converted/optimized by: Arm
License: The Original Model and the Optimized Model are subject to Apache-2.0.
This repository contains a converted or optimized version of the Original Model (the “Optimized Model”). The Original Model has been converted or optimized as described above for execution on Arm-based platforms.
No retraining or fine-tuning of the Original Model was performed as part of the conversion or optimization. The conversion or optimization was not intended to change the Original Model’s behavior or intended use.
Original Model and Documentation
For information about the Original Model, including its development, training data, intended uses, limitations and other relevant information, please refer to the Original Model repository. Information in that repository was provided by the original developer or other third parties and, unless expressly stated otherwise, has not been independently verified by Arm.
Licenses and Third-Party Terms
Use of the Original Model and the Optimized Model is subject to the applicable licenses, usage restrictions and other terms identified above and in the relevant repositories. Publication of the Optimized Model does not grant any rights beyond those provided under the applicable license terms.
You are responsible for reviewing those terms and ensuring that your use of the Original Model and the Optimized Model is permitted.
Purpose of this Release
The Optimized Model is provided as a reference implementation to demonstrate and evaluate execution and performance on Arm-based systems. It is not a production-ready or supported solution.
Arm’s publication of the Optimized Model does not constitute an endorsement or certification of the Original Model or a representation that the Optimized Model is suitable for production use or any particular purpose.
To the fullest extent permitted by applicable law (i) the Optimized Model is provided “as is.” Arm makes no representations or warranties that the Original Model, the Optimized Model or their outputs are accurate, safe, secure, non-infringing, legally compliant, suitable for production use or fit for any particular purpose; and (ii) Arm will not be liable for any loss or damage arising from or in connection with the Optimized Model, its use or its outputs.
You are responsible for independently evaluating the Optimized Model, its outputs and its suitability for your intended use, including compliance with applicable legal, regulatory, safety and security requirements.
Arm does not commit to provide ongoing support, maintenance or updates for the Optimized Model. Any use of or reliance on the Optimized Model or its outputs is at your own risk.
