Open-Source LLMs on Device: A Selection and Deployment Guide for On-Device Inference
This article takes a vendor-neutral look at deploying open-source large language models on edge devices. It explains how on-device models are tiered by parameter count and by architecture (dense vs. mixture-of-experts), what native multimodal input adds on hardware with limited compute, memory, and power, and why benchmark rankings alone are not enough to judge a device model. It then walks through a practical deployment workflow covering format conversion, integer quantization (INT8/INT4), and lightweight inference runtimes for CPU, NPU, and GPU targets, and closes with on-device agent design and a cloud-device collaboration architecture that keeps latency and privacy on the device while pushing heavy inference to the cloud.
With open-source model releases accelerating, capable models are no longer confined to cloud data centers. They are moving down to phones, single-board computers and other development boards, home workstations, and embedded devices.
On-device deployment is attractive because it addresses three pain points at once: latency (data never makes a round trip to the cloud), privacy (sensitive data is processed locally), and cost (no ongoing cloud inference bill). The constraint is that edge devices have tightly limited compute, memory, and power budgets. That means you cannot simply shrink a cloud model and move it down. Model size, modality coverage, and deployment strategy all have to be traded off deliberately. This article analyzes how to select and deploy open-source LLMs for on-device use.
1. How On-Device Models Are Tiered
Mainstream open-source on-device models generally ship as a multi-tier family: the same model lineage is published in several parameter sizes so it can fit hardware ranging from wearables to workstations. Understanding the dimensions along which these tiers are drawn is the first step in selection.
There are two common capability shapes:
- Dense architectures activate every parameter on each forward pass. The upside is a straightforward structure, stable inference behavior, and easy deployment on general-purpose inference frameworks. The downside is that compute and memory usage grow linearly with parameter count.
- Mixture-of-Experts (MoE) architectures combine several expert subnetworks with a routing gate, activating only a subset of experts per inference. This preserves a large total parameter capacity (and therefore more knowledge) while keeping the per-inference activated parameter count low, which often yields better value for the same compute budget. The cost is added deployment complexity from the routing mechanism and greater sensitivity to memory bandwidth.
By parameter scale, on-device models typically fall into a few tiers: a few billion parameters (targeting extreme efficiency on phones and embedded devices), roughly one to two billion parameters (spanning on-device use and lightweight servers), and mid-size models with stronger reasoning ability (aimed at professional workstations and personal development environments). One principle should stay front of mind during selection: parameter count does not equal real-world experience. On-device scenarios care far more about effective output per unit of compute.
2. Multimodal Capability: Making the Device See and Hear
What sets an on-device model apart from a text-only one is native multimodal input. A mature on-device multimodal model typically supports:
- Text input — the baseline capability, covering dialogue, summarization, and information extraction.
- Image input — most models support variable resolution, dynamically adjusting the granularity of visual encoding based on image size to balance detail recognition against compute cost. This matters directly for on-device tasks such as receipt and document recognition, scene understanding, and product comparison.
- Video input — by sampling and encoding frame sequences, the model can interpret temporal information for use cases like surveillance summarization and action recognition.
- Audio input — some smaller tiers accept audio natively (for example, speech clips up to tens of seconds long). This is particularly important: the device can perform speech understanding entirely on-device, without attaching a separate ASR model.
Native on-device audio is a key piece for making on-device AI assistants practical. The traditional approach chains two stages: ASR converts speech to text, then a text model interprets it. That pipeline is long, adds latency, and accumulates errors at each hand-off. Feeding audio directly into an end-to-end model as a modality shortens the pipeline substantially, reduces on-device memory use (no need to load two models at once), and improves interaction latency.
3. How to Evaluate an On-Device Model
Asking “how does it feel to use?” invites subjective answers that vary from person to person. A more reliable approach is a reproducible evaluation framework built from three layers:
- Benchmarks — reference the general dimensions the industry already tracks, such as language understanding, reasoning, and code generation, along with multimodal understanding tasks. Keep in mind that different leaderboards use quite different evaluation setups, so a single score ranking is easy to misread; interpret it against your specific task scenario.
- On-device-specific metrics — these are what cloud leaderboards cannot show. Measure time to first token (TTFT), tokens per second (TPS), peak memory usage, sustained power draw and thermal behavior, and accuracy loss before and after quantization. For MoE models, also check whether routing is stable and whether behavior is consistent across devices.
- Real-task validation — run end-to-end tests on data close to your business. Working through a structured checklist of simple tasks (information extraction, instruction following, multi-turn dialogue) tells you far more about whether the model is good enough than a single aggregate score.
A pragmatic conclusion follows: a model that trails slightly on public rankings can still deliver a better experience in real on-device work, because on-device performance is heavily shaped by quantization strategy, inference framework optimization, and hardware adaptation — exactly the things public leaderboards struggle to capture.
4. Deployment Practice and Quantization
Deploying a model on-device usually follows this engineering flow:
- Model acquisition and conversion — convert the original weights into a format the target inference engine accepts, typically involving graph optimization and operator fusion.
- Quantization — the core step of on-device deployment. Common integer quantization schemes such as INT8 and INT4 sharply reduce memory footprint and compute cost while preserving usable accuracy, and they are the precondition for fitting on edge hardware at all.
- Inference engine adaptation — pick a lightweight runtime that supports your target hardware (CPU, NPU, or GPU) and enable the acceleration backend that matches the chip’s features.
A schematic view of the deploy-and-quantize flow (pseudocode, illustrating the general idea only):
# General flow only; not tied to any specific product APImodel = load_model("path/to/base-model")# 1) Convert to an edge-friendly formatruntime_model = convert(model, target="edge-runtime")# 2) Quantize to reduce edge memory and compute pressurequantized = quantize(runtime_model, scheme="int4")# 3) Bind to the target hardware backend and run inferencequantized.compile(backend="device-npu")# 4) Multimodal input example: text + image + audioresult = quantized.infer(text="Please summarize the key points of this content",image=load_image("scene.jpg"),audio=load_audio("clip.wav"), # Native audio input, no external ASR needed)
In practice, quantization is the easiest step to get wrong: different schemes affect accuracy very differently, so always compare before and after on your actual task data rather than accepting a precision drop just to get the model running.
5. From Model to Agent: On-Device Agents
The real value of an on-device model shows up when it powers a lightweight AI agent. Because data stays local, on-device agents have a natural advantage in privacy-sensitive, weak-network, or fully offline scenarios: local voice assistants, offline translation, personal knowledge management, and device automation tasks.
When building an on-device agent, design tool invocation and task orchestration deliberately: decompose a complex goal into a handful of simple subtasks and let the model drive a plan–execute–verify loop. Since on-device compute is limited, keep heavy or latency-critical inference local, and delegate work that needs large-scale knowledge or batch processing to the cloud.
6. Cloud–Device Collaboration: Balancing Experience and Capability
The on-device model is not meant to replace the cloud. The more realistic architecture is cloud–device collaboration: the device handles low-latency, privacy-sensitive real-time interaction, while the cloud handles complex reasoning, model training, and global scheduling. In this architecture, the cloud platform typically supplies a few general-purpose building blocks, such as:
- Object storage — for model weights, training data, and business files;
- Container platform — for orchestrating cloud inference services and model-serving deployments;
- Logging, monitoring, and alerting — for tracing call chains and anomalies reported from devices and protecting service quality.
Baidu AI Cloud, for example, offers general cloud capabilities such as object storage, containers, and monitoring that can serve as infrastructure components in a cloud–device architecture, helping teams put “on-device inference plus cloud orchestration” into practice without building the underlying infrastructure from scratch.
Conclusion
Competition in on-device open-source LLMs is fundamentally an engineering contest to approximate the ideal experience under constrained compute. When selecting a model, treat parameter count and leaderboard scores with perspective, and focus instead on multimodal capability (especially native audio, which closes the on-device voice loop), quantization strategy, and measured performance on your target hardware. With the combination of cloud–device collaboration and on-device agents, developers can find a workable balance among privacy, latency, and cost, and genuinely deliver model capabilities into users’ hands.
