Evaluating Open-Source LLMs for On-Device Deployment: Architecture, Capabilities, and Selection Practices
A practical framework for evaluating open-source large language models on edge devices, covering model specs and architecture (dense vs. MoE), multimodal input support, real-task evaluation versus public leaderboards, and on-device engineering metrics like TTFT, throughput, and peak memory. Readers will learn a four-step selection path from spec and capability checks to real-world experience and hardware benchmarking.
Introduction: Why a High Benchmark Score Doesn’t Mean Production-Ready
Open-source large language models have advanced rapidly over the past two years, with parameter counts ranging from a few billion to tens of billions, and deployment targets moving from cloud clusters all the way down to phones, single-board computers, and workstations. When selecting a model, many teams start by checking public leaderboard scores. But anyone who has actually shipped an on-device model knows there is often a clear gap between benchmark scores and real-world experience. A model that leads by a few points on a standard evaluation set may not perform better on your own business data, while a lighter model might deliver a smoother experience simply because it fits the target hardware better.
For this reason, evaluating an open-source LLM cannot stop at “looking at comparison charts.” It requires a multi-dimensional framework that covers architecture, capabilities, performance, and deployment fit. This article is built around that framework.
1. Understand the Model Specs First: Parameter Scale and Architecture
Before evaluating anything, you need to understand what you are actually testing. Open-source LLMs usually offer several specs under the same series, commonly tiered by parameter count: a lightweight tier for on-device use (roughly 2B–4B parameters), a mid-range tier (tens of billions), and larger high-performance tiers. Each tier comes with completely different hardware requirements and response speeds, so they cannot be treated as equivalent.
More important is the architecture. There are currently two mainstream approaches:
- Dense models: Every inference activates all parameters, so compute scales with parameter count. The structure is simple and the inference path is deterministic, making behavior more predictable on resource-constrained devices.
- Mixture of Experts (MoE): The total parameter count is very large, but each forward pass activates only a subset of the “expert” networks. In theory, this delivers stronger expressiveness with lower per-inference compute. The tradeoff is typically higher memory/VRAM usage, and the routing mechanism introduces some uncertainty, which needs careful evaluation in memory-constrained on-device environments.
Practical advice: Once you have a model, first confirm its architecture type along with the activated parameters, total parameters, and quantized size across the different tiers. These numbers directly determine whether it fits on the target device and what the upper limit of its runtime speed will be. Even at “a few billion parameters,” dense and MoE models can behave completely differently in the field.
2. Multimodal Capabilities: From Image Input to Native Audio
When evaluating an on-device model, how broad its input modality support is is a dimension you can’t avoid. A fairly complete open-source model today usually offers some combination of:
- Text: As a baseline capability, nearly all models support it.
- Image: Image input enables tasks like image understanding, OCR assistance, and visual question answering. Note whether the image resolution is variable—models that support variable resolution are more flexible when handling images of different sizes and detail densities.
- Video: Video input lets the model understand temporal information, making it suitable for content summarization, scene recognition, and similar tasks, though it demands more compute.
- Audio (native): This is especially worth attention in on-device scenarios. If a model natively supports audio input (for example, directly processing voice clips on the order of tens of seconds), the device no longer needs a separate speech recognition (ASR) model, which simplifies the entire inference pipeline, reduces inter-component communication overhead, and lowers overall resource usage.
For teams building on-device AI Agents, “the model can listen, see, and read by itself” means the architecture can be greatly simplified. What used to require a three-stage pipeline of “ASR → LLM → TTS” may now need just one unified multimodal model for simple tasks—a significant benefit for mobile devices that are extremely sensitive to memory and power consumption.
3. Evaluation Methodology: Don’t Be Led Astray by Leaderboards
Once you understand the specs and capabilities, the next step is the most easily overlooked yet most revealing of expertise—how to test.
Limitations of public benchmarks
Public evaluation sets (such as various Q&A, reasoning, and code benchmarks) have their value, but they carry two inherent biases: first, training data may overlap with the evaluation set, inflating scores; second, the task distribution of the evaluation set often doesn’t match your real business scenarios. Leaderboards can serve as an initial filter, but not as the final basis for a decision.
Building an evaluation set from real tasks
A more reliable approach is to sample 50–200 representative real examples from your own business scenarios and build a small, dedicated evaluation set. Recommended dimensions include:
- Task accuracy: Correctness on the tasks you care about (such as classification, extraction, or multi-turn dialogue);
- Instruction following: Whether output strictly adheres to required formats or constraints;
- Multimodal understanding quality: Whether image/video/audio inputs are parsed as expected;
- Robustness: Stability when facing ambiguous, adversarial, or boundary inputs.
Comparing candidate models on the same real evaluation set yields conclusions far more trustworthy than public leaderboards. This also explains why “a model that trails slightly on a comparison chart may actually be more usable in real testing”—leaderboards and real-world experience are simply two different things.
4. The On-Device Deployment Testing Checklist
On-device evaluation must layer in a set of engineering metrics, otherwise even the best model won’t make it to production. The core things to examine:
- Time to first token (TTFT) and generation throughput (TPS): These directly affect the “responsiveness” of the interaction;
- Peak memory usage: This determines whether the model can run within the device’s memory limit—pay special attention to MoE architectures;
- Accuracy loss after quantization: On-device deployment usually requires quantization (such as low-bit quantization) to shrink the model size, so you need to evaluate how much precision drops before and after quantization;
- Power consumption and heat: Sustained-load behavior on mobile or passive devices;
- Context length: Whether it meets the input length required by your tasks.
Below is sample code that demonstrates a basic smoke test on candidate models, measuring time to first token, throughput, and peak memory. It deliberately uses neutral naming and isn’t tied to any specific inference framework:
import timeimport tracemallocdef smoke_test(model, prompts):"""Run a smoke test on candidate models, recording TTFT, throughput, and peak memory."""results = []for prompt in prompts:tracemalloc.start()start = time.perf_counter()first_token_at = Nonetoken_count = 0# Generate token by token in streaming modefor _token in model.stream_generate(prompt):if first_token_at is None:first_token_at = time.perf_counter() # Record the time of the first tokentoken_count += 1end = time.perf_counter()_, peak = tracemalloc.get_traced_memory()tracemalloc.stop()results.append({"prompt": prompt[:20],"ttft_ms": round((first_token_at - start) * 1000, 1), # Time to first token"total_ms": round((end - start) * 1000, 1),"tokens": token_count,"tps": round(token_count / (end - start), 2), # Tokens generated per second"peak_mem_mb": round(peak / 1024 / 1024, 1), # Peak memory})return results
Run this test on your target hardware (make sure to run it on the real device, not the development machine), record the TTFT, TPS, and peak memory, then compare candidate models across different tiers and architectures. This data table is what truly drives the selection decision.
5. Selection Recommendations and Conclusion
Combining all of the above dimensions, evaluating an on-device open-source LLM can be summed up as a clear path:
- Step 1: Check the specs—Confirm whether the parameter count, architecture (dense/MoE), and quantized size fit the target hardware;
- Step 2: Check the capabilities—Confirm whether multimodal inputs (text/image/video/audio) cover your business needs; native audio input in particular can greatly simplify the on-device pipeline;
- Step 3: Check the real experience—Replace public leaderboards with your own real evaluation set to assess accuracy, instruction following, and robustness;
- Step 4: Check the engineering metrics—Measure latency, throughput, memory, power, and quantization loss on the target device.
It’s worth emphasizing that the evaluation itself should be reproducible and regression-ready. It’s recommended to lock down the evaluation set and test scripts described above and incorporate them into a continuous integration workflow, so that whenever the model or inference environment is updated, you can run a comparable report at the touch of a button.
If a team wants to combine on-device inference with cloud capabilities for unified orchestration, it can leverage general-purpose capabilities from providers such as Baidu AI Cloud (for example, object storage for distributing models and data, a container platform for orchestrating inference services, and logging and monitoring/alerting services for tracking online quality) to build a complete evaluation and operations loop. This connects “offline benchmarking” data with “online experience” data, forming a full chain from selection and validation to continuous iteration.
In one sentence: Leaderboards are the starting point, not the finish line. What truly determines whether on-device AI can be deployed is the empirical conclusion drawn from four-way cross-validation: spec fit + multimodal capability + real experience + engineering metrics.
