Open-Source On-Device Multimodal LLM Selection and Evaluation: A Practical Guide
This guide covers how to choose and evaluate open-source multimodal large language models (LLMs) that run on-device—on phones, entry-level single-board computers, thin laptops, and even workstations. It explains the three shifts making selection harder, compares dense versus mixture-of-experts (MoE) architectures from a compute and memory standpoint, and examines the on-device value of native multimodal input, long-context techniques built on hybrid attention and dual RoPE, and parameter-efficiency ideas such as per-layer embedding. It then lays out a reproducible evaluation methodology across quality, resource, and stability, and closes with deployment and fine-tuning guidance—quantization, edge-cloud collaboration, and LoRA/QLoRA—for turning open models into reliable, shippable products.
1. Why Selection Keeps Getting Harder: Three Shifts in Open-Source On-Device Multimodal Models
In recent years, open-source models that can run on phones, entry-level single-board computers, thin laptops, and even workstations have been released at a rapid pace. A new series often ships several variants at once, ranging from full models to “efficient” editions optimized for low power and low memory. Three trends stand out:
- Fragmented specifications: Within a single series you’ll find both dense models and mixture-of-experts (MoE) models, parameter counts spanning from the single-digit billions into the tens of billions, and both text-only and omni-modal models coexisting. Name and size alone rarely tell you which one actually fits your needs.
- Converging capability combinations: Text, images, video, and even audio are increasingly folded into a single model. Pipelines that used to require bolting together separate speech recognition, object detection, and OCR models may now be handled by one model. Evaluation has correspondingly expanded from pure language understanding to multimodal coordination and resource overhead.
- Harder on-device constraints: Cloud inference can amortize cost by scaling out. On-device, you instead face physical limits at the same time—memory capacity, memory bandwidth, and power and thermal behavior under sustained load. A model must both run and last.
It’s also worth recognizing that public leaderboard scores often diverge noticeably from real-world experience. This isn’t necessarily a data problem but an evaluation-condition problem: quantization precision, context length, prompt templates, decoding parameters, and task distribution all affect the outcome. The more reliable approach is to build your own evaluation loop and run head-to-head comparisons against your real business scenarios.
2. An Architecture Perspective: Where Dense and MoE Models Fit Differently
In a Transformer decoder, the feed-forward network (FFN) typically accounts for most of the parameters and computation. A dense model runs the full FFN computation for every token. An MoE model replaces the FFN with several parallel “experts”; a router picks a few experts per token, and the remaining experts contribute no computation for that token.
# Illustration: forward pass of a sparse MoE feed-forward layerdef moe_ffn(x, router, experts, top_k):# 1. Routing scores: affinity between each token and each expertscores = softmax(x @ router.T) # shape: [num_tokens, num_experts]# 2. Keep only the top-k highest-scoring expertsweights, index = top_k(scores, k=top_k)weights = weights / sum(weights) # normalize the gating weights# 3. Run the FFN only on the selected experts, then weighted sumy = zeros_like(x)for slot in range(top_k):for e in unique(index[slot]):mask = (index[slot] == e)y[mask] += weights[mask, slot] * experts[e](x[mask])return y
As a result, the two architectures have very different resource profiles:
- Dense models: The inference path is deterministic. Every token requires all parameters to participate in computation, so memory traffic scales with the total parameter count. Compute is predictable, which makes compiler optimization and operator fusion easier.
- MoE models: Compute is governed by the activated parameter count. On long sequences, the same expert may be hit by many tokens and stay resident in the compute units, so real-world speed doesn’t necessarily scale strictly with activated parameters. Memory footprint is determined by the total parameter count, while token-to-token variation in routing tends to lower compute-unit utilization.
2.1 Why “larger dense, smaller MoE” can appear counterintuitive
By conventional reasoning, MoE trades more parameters for equivalent quality, so its total parameter count should be higher than a dense model of the same class. When a given generation ships the opposite combination—a larger dense variant and a smaller MoE variant—it is most likely a deliberate product division of labor. The reasoning below is based on publicly known model-design principles and is a reasonable inference about design intent, not an official statement:
- MoE targets cost-efficiency and fits the “bandwidth-constrained” on-device scenario. Autoregressive decoding generates tokens one at a time, and each step must read the activated parameters. MoE’s total memory footprint depends on all experts, but its speed depends mainly on the parameters activated per step. This lets it approach the quality of a large model with memory traffic close to that of a small one. Fewer activated parameters and simpler routing also reduce power fluctuation, which aligns with the energy-efficiency demands of phones and single-board computers.
- Dense models target the ceiling and double as “fine-tunable” bases. Under the same training compute, every parameter in a dense model receives full gradient updates, yielding higher parameter utilization. Dense models tend to produce cleaner instruction-following and more stable structured output, with predictable inference behavior that is easier to quantize and deploy. That makes them well suited as fine-tuning bases: mature community toolchains make both full-parameter and parameter-efficient fine-tuning easier to land.
- MoE’s engineering costs are not negligible. Routing is prone to load imbalance, fine-tuning can disrupt the routing distribution, and different experts can be differently sensitive to quantization—none of which are problems a dense architecture faces.
2.2 Selection checklist
When judging the “activated parameter count,” always normalize the definition first: some counts include the embedding layer and shared parameters, others don’t, and comparing them directly leads to wrong conclusions.
| Dimension | Dense model | MoE model |
|---|---|---|
| Memory footprint | Grows linearly with total parameters | Grows with total parameters, typically higher |
| Compute cost | Proportional to total parameters | Mainly determined by activated parameters |
| Inference predictability | High, deterministic path | Affected by routing fluctuation |
| Quantization & compiler optimization | Mature, easy toolchain fit | Must handle expert imbalance and differentiated precision |
| Fine-tuning difficulty | Lower | Higher, needs routing-stability care |
| Best-fit role | High capability ceiling, good fine-tuning base | On-device energy efficiency, high quality per unit compute |
A practical rule of thumb:
- When device memory is ample and you want the capability ceiling or need deep customization, evaluate large dense models first.
- When device memory or power is tight and tasks are mostly simple instruction execution and content generation, evaluate small MoE models first.
- Whichever architecture you pick, measure first-token latency, decode speed (tokens/s), and peak memory on the same quantization scheme and the same device before deciding.
3. A Capability Perspective: The On-Device Value of Native Multimodal Input
The latest on-device models commonly support text, images (variable resolution), and video as native inputs, and some efficient variants also accept audio directly. Compared with the traditional “language model + bolted-on speech recognition” approach, native audio input folds speech transcription and semantic understanding into a single forward pass. It reduces the number of models and memory footprint, avoids error propagation across a cascaded pipeline, and lowers end-to-end latency.
Many typical on-device Agent tasks happen to be “lightweight, high-frequency, privacy-sensitive”: recognizing objects and text in a photo, executing voice commands, summarizing recent notifications, or checking whether a screenshot is compliant. These tasks don’t need the deep reasoning of a cloud-scale model, yet they demand low latency and strong privacy—exactly where a small native-multimodal model fits.
| Input modality | Typical on-device scenario | Key constraint | Evaluation focus |
|---|---|---|---|
| Text | Instruction following, summarization, polishing | Context length, memory footprint | Instruction adherence, structured-output accuracy |
| Image | Photo recognition, screenshot understanding, receipt info extraction | Visual-token inflation from variable resolution | Accuracy and latency across resolutions |
| Video | Footage understanding, key-clip summarization | Frame sampling rate, long temporal span | Temporal event localization, cross-frame reasoning |
| Audio | Voice assistant, meeting-clip summarization | Sample rate, duration limits, noisy environments | Command recognition in quiet vs. noisy conditions |
When evaluating a multimodal model, verify the following one by one:
- Capability boundaries: Does it truly understand text, charts, and spatial relationships in an image, not just recognize object categories?
- Quantization precision: After low-bit quantization, language tasks may lose only a little, while visual and audio capabilities can degrade noticeably.
- Resource fluctuation: High-resolution images and longer audio sharply inflate visual-token counts and peak memory, so evaluate stability under extreme inputs.
- Output reliability: Can it reliably emit JSON that conforms to an agreed schema? This is a prerequisite for an on-device Agent to call local tools or system capabilities.
4. Long Context: Hybrid Attention and Scaled Positional Encoding
An on-device model’s long-context capability directly affects multi-turn dialogue, document Q&A, and Agent memory retention. Research on RoPE extrapolation has shown that standard RoPE generalizes poorly beyond the trained length; combining local-window attention with global-attention layers can substantially improve long-context performance.
4.1 The rationale behind a dual-RoPE configuration
Rotary Position Embedding (RoPE) encodes relative position information into attention by rotating the query (Q) and key (K) vectors. The mainstream approach alternates two kinds of layers:
- Local sliding-window layers: attend only to the most recent few tokens, with complexity that grows linearly with sequence length, using standard RoPE.
- Global attention layers: retain direct access to history beyond the sliding window, using scaled RoPE (p-RoPE).
You can think of p-RoPE intuitively as scaling position indices by a uniform factor. After scaling, the same rotation angle corresponds to a larger actual token distance, effectively extending the “field of view.” Global layers can therefore maintain stable positional discrimination well beyond the trained length, mitigating the “Lost in the Middle” phenomenon in long contexts.
# Illustration: alternating local/global attention positional encodingdef build_layer_rope(layer_id, config):if layer_id % 2 == 0: # local layer: standard RoPEpositions = arange(seq_len)return rope(freq_base=config.rope_base, positions=positions)else: # global layer: scaled RoPEpositions = arange(seq_len) / config.rope_scale # scale positions by a factorreturn rope(freq_base=config.rope_base, positions=positions)
4.2 The real cost of long context
Long context isn’t “free.” The KV cache grows linearly with sequence length and becomes one of the main memory costs on-device. The estimate is:
KV cache memory = 2 (K and V) × num_layers × num_kv_heads × head_dim × seq_len × bytes_per_element
Take a 32-layer model with 8 KV heads, head dimension 128, sequence length 8192, and KV stored in FP16:
2 × 32 × 8 × 128 × 8192 × 2 ≈ 1.07 GB
That doesn’t yet include model weights or activation memory. So when evaluating long context, examine three things at once:
- Whether tasks such as key-information retrieval and cross-segment summarization stay effective under long inputs;
- Whether the memory peak fits within the device;
- Whether first-token latency under long prompts is acceptable.
When necessary, general techniques such as KV-cache quantization, out-of-window cache eviction, and prompt compression can help.
5. Parameter Efficiency: The Design Idea Behind Per-Layer Embedding
In a traditional Transformer, each token receives a single embedding vector before entering the decoder. Context information is then passed forward step by step through inter-layer attention and FFN computation, while the embedding layer itself mainly carries a “token identity” signal. On small models constrained by parameters and memory, the information capacity of this path is relatively limited.
An increasingly popular idea is per-layer embedding (PLE), exemplified by the Gemma technical reports from Google. Its core is to add a parallel, low-dimensional conditioning path:
- Project the token embedding into a low-dimensional space, then combine it with condition signals produced from context;
- Generate a dedicated small vector for each decoder layer;
- Inject that vector into the corresponding layer in an “additive” or “gated” manner.
This way, each decoder layer can pull the token-specific information it needs on demand, rather than forcing the initial embedding to carry everything every layer might use. More broadly, it follows the “weight sharing + per-layer adaptation” approach widely used in small models recently:
- Share part of the parameters across depth to compress the total parameter count;
- Restore per-layer differentiated expressiveness through lightweight, layer-specific parameters.
It’s a trade-off that buys expressiveness with a small amount of extra parameters—particularly friendly to on-device scenarios. But implementations differ considerably, so it’s best treated as a design idea to reference when building your own models.
# Illustration: per-layer embedding vs. standard embedding# Standard: all layers share the same static embeddingh = embedding(token_ids)for block in decoder_blocks:h = block(h)# Per-layer embedding: first project the embedding to low-dim,# then combine with the context condition signal to build a per-layer vectorbase = down_proj(embedding(token_ids)) # low-dim base representationh = embedding(token_ids)for i, block in enumerate(decoder_blocks):layer_vec = combine(base, condition_signal) # combine token identity with contexth = block(h, inject=layer_vec) # inject per layer, not all at once
6. Evaluation Methodology: Turning “Experience” into Reproducible Numbers
Subjective impressions are valuable but hard to compare side by side. Build a reproducible evaluation process along three main lines: task quality, resource cost, and stability.
6.1 Fix the variables
- Task set: Sample typical cases from real business, covering instruction following, structured output, translation/summarization, code completion, visual Q&A, voice commands, and long-document retrieval.
- Inference configuration: Unify the quantization scheme, context length, sampling parameters (such as temperature, top-p), and system prompt. Record the model version, quantization version, and inference-framework version for every run.
- Runtime environment: Specify the device model, run mode (e.g., performance or power-saving), power state, and ambient temperature.
6.2 Metric design
- Quality metrics: Task accuracy; for key outputs like JSON, also track a “valid rate”—the proportion that can be parsed and conforms to the agreed structure.
- Efficiency metrics: First-token latency (TTFT), decode speed (tokens/s), and end-to-end latency.
- Resource metrics: Resident and peak memory, average power draw, temperature rise, and throttling behavior.
- Stability metrics: Consistency across repeated runs, plus crash rate and memory leaks under sustained operation.
# Illustration: a minimal evaluation loop for on-device modelsrecords = []for task in suite: # suite is a fixed task setfor case in task.cases:t0 = now()out = model.generate(prompt=case.prompt,images=case.images, # empty if there is no imageaudio=case.audio, # empty if there is no audiomax_tokens=cfg.max_tokens,)latency = now() - t0rec = {"task": task.name,"correct": judge(out, case.reference), # rule check or judge-model score"json_valid": is_valid_json(out),"ttft_ms": first_token_latency(),"throughput": output_tokens / decode_time,"peak_mem_mb": read_peak_memory(),"peak_temp": read_max_temperature(),}records.append(rec)report = aggregate(records) # aggregate per task: mean plus P50/P95
6.3 Interpreting results
- Cross-check public leaderboards. Their prompt templates, decoding parameters, and versions are unknown, so treat them only as reference. When public rankings differ markedly from your own measurements, reproduce the test conditions first before drawing conclusions.
- Look at distributions, not just averages. On-device experience depends on P95/P99 latency and the worst-case memory peak; occasional long-tail stalls hurt perception more than average speed does.
- Re-test after quantization. On-device deployments almost always use quantized versions, and the gap an INT4/INT8 model has with its full-precision form is sometimes larger than the gap between two different models.
- Focus on long and extreme inputs. High-resolution images, long audio, and very long conversations are what most expose real weaknesses.
7. On-Device Deployment and Fine-Tuning: From Demo to Deliverable
- Quantization and compiler optimization. Weight quantization (such as INT4, INT8), KV-cache quantization, and operator fusion are the fundamentals of on-device deployment. Note that quantization typically harms vision and audio capabilities more than text. Also, some on-device NPUs support only specific operator combinations; hybrid attention and multimodal-fusion modules may fall back to CPU computation and cause a sharp speed drop, so validate this early.
- Layered rollout. Assign models to the cloud, edge devices, and end terminals by task complexity. For example, the on-device model handles simple post-wake-word commands and privacy-sensitive data processing, while complex reasoning and batch workloads go to larger cloud models, forming edge-cloud collaboration. Deployment and elastic scaling can rely on general cloud capabilities such as container platforms, inference services, object storage, logging services, and monitoring/alerting. On Baidu AI Cloud, for instance, you can combine model services with serverless functions to build a layered “on-device inference + cloud fallback” architecture and observe latency and error rates across different endpoints in one place.
- Parameter-efficient fine-tuning. Small models have good fine-tuning potential. Methods like low-rank adaptation (LoRA) or quantized LoRA (QLoRA) let you customize on a single GPU or even a consumer-grade card, with relatively controllable data requirements and compute cost.
- Guard against catastrophic forgetting. Domain fine-tuning can easily erode general capability. Mix general instruction data in by proportion, and run the same regression evaluation before and after fine-tuning to confirm the target capability improves without noticeable degradation in general ability. For image and audio fine-tuning, also cover different resolutions and noise conditions.
8. Conclusion
From the decoupling of compute and memory traffic in sparse MoE, to the long context supported by dual-RoPE hybrid attention, to the efficiency gains from native audio/video input and per-layer embedding, the latest generation of open-source on-device models is evolving around “capability density per unit of compute and per unit of memory.” For developers, the more valuable thing than chasing a single leaderboard rank is building an evaluation system aligned with your own scenarios:
- Understand model differences along three dimensions—architecture, modality, and context;
- Turn “experience” into data with reproducible evaluation;
- Actually get models onto devices with quantization, edge-cloud collaboration, and fine-tuning.
That is precisely what turns open-source models into reliable products.
