Local LLM Inference Benchmark: A Deep Dive into Three Configurations on the AI Max+ 495 Platform
This article presents a reproducible methodology for benchmarking local large language model inference on a unified-memory mobile workstation platform, using three configurations on the AI Max+ 495. It explains why on-device inference is gaining attention, how to choose an inference framework and prepare model files, and why prefill and decode must be measured separately. The three configurations cover a distilled 4-bit baseline model, speculative decoding with a draft model, and a newer model with built-in multi-token prediction (MTP). You will also find a step-by-step test workflow, a prioritized troubleshooting order for common bottlenecks, and guidance on moving validated configurations to the cloud. The focus is on measurement discipline rather than ranking specific hardware or products.
1. Why On-Device Inference Is Back in Focus
Over the past two years, LLM usage has been heavily concentrated in cloud calls: send a request, wait in a cloud queue, get the result back. This model remains the best choice for high concurrency and very large parameter counts, but it comes with three unavoidable problems: data must leave the local device, network jitter shows up directly in time to first token, and long-term usage costs grow linearly with volume.
On-device inference addresses exactly these three pain points. Data never leaves the device, which naturally satisfies compliance and privacy requirements; with no network round trip, time to first token is more stable; and after a one-time hardware investment, the marginal cost of inference approaches zero. A class of platforms that has recently drawn wide discussion is the mobile-workstation-class chip with an integrated unified memory architecture, where the CPU, GPU, and memory controller share a single high-bandwidth memory pool with a capacity in the tens of gigabytes. These platforms have moved “running locally the models that used to require a professional accelerator card” from proof of concept to reproducible engineering practice.
Note that this article does not judge any specific hardware model or product as better or worse. Instead, it abstracts the combination of “large-capacity unified memory plus a general-purpose inference framework” into a transferable methodology: swap the device, swap the model, and the test procedure still holds.
2. Three Key Decisions Before Testing
2.1 Inference framework: prefer one that supports a general model format
The de facto standard for on-device inference is a general-purpose framework centered on GGUF, such as llama.cpp. The reason to choose it is not absolute performance leadership but three engineering properties: an open model format, a wide range of selectable quantization levels, and the ability to mix CPU and GPU backends. Mixed scheduling matters especially on unified memory platforms: some layers go to the GPU to exploit high bandwidth, while others stay on the CPU to avoid running out of memory, and the framework needs to make this split automatically or semi-automatically.
A schematic startup parameter structure (it only illustrates what the parameters mean and does not represent any specific version):
# Typical invocation of a general-purpose inference frameworkinfer_engine \--model /models/xxx-Q4_K_M.gguf \ # model file path and quantization level--n-gpu-layers 60 \ # layers offloaded to the GPU; tune to your memory budget--ctx-size 8192 \ # context window length--batch-size 512 \ # batch size; affects prefill speed--temp 0.7 --top-p 0.9 \ # sampling parameters--repeat-penalty 1.1 # repetition penalty
2.2 Model files: download and verify locally in advance
All model files must be downloaded and integrity-checked before testing starts, so that network time is not mixed into the inference timing. Three layers of verification are recommended:
- Hash check: confirm the file was not truncated;
- Metadata check: confirm the parameter count, layer count, and vocabulary size match expectations;
- Cold-start warm-up: run one very short request first so the weights are loaded into the page cache, then start the real test from a warm state.
2.3 Metrics: separate the prefill and decode phases
LLM inference time consists of two phases, and measuring them together produces misleading conclusions:
- Prefill: processes the input prompt, compute-intensive, determines time to first token (TTFT);
- Decode: generates token by token, memory-access-intensive, determines output throughput (tokens/s).
Bandwidth on a unified memory platform is a shared resource, so you must record all of the following: TTFT, decode throughput, peak memory usage, and the performance decay curve over long runs.
3. Design Logic of the Three Configurations
This benchmark uses three configurations that form a clear progression: establish a baseline, verify an acceleration mechanism, then verify the gains of a newer architecture.
Configuration 1: A single base model (baseline)
Use a medium-sized, distilled reasoning model at 4-bit quantization. Its role is to show “what this device can do with no acceleration at all.” The value of the baseline is not the absolute numbers but that the relative improvements of the next two configurations are all measured against it as the denominator.
Expected observations: whether decode throughput hits the memory bandwidth ceiling (a rough estimate is theoretical bandwidth divided by model size); whether TTFT grows close to linearly when the context goes from 2K to 8K.
Configuration 2: Base model plus a speculative decoding plugin
Speculative decoding works by having a small, fast draft model guess several tokens in a row, which the large model then verifies in one parallel pass: accepted tokens are taken directly, rejected ones are rolled back and re-guessed. The key conditions for gains are that the draft model’s per-step cost is far smaller than the large model’s, and that the acceptance rate is not too low.
Engineering points:
- The draft model and the main model must share the same vocabulary, otherwise the verification step cannot align;
- The draft length (how many tokens to guess at once) needs a parameter sweep; too long will backfire as the acceptance rate drops;
- This approach shows the clearest gains in interactive batch=1 scenarios; the gains are diluted under high concurrency.
Configuration 3: A newer model plus multi-token prediction (MTP)
Multi-token prediction builds “predicting multiple subsequent tokens” into the model’s training objective. The model carries multiple prediction heads and can produce multiple candidates in one step at inference time without an external draft model. Compared with Configuration 2, it removes the memory and scheduling overhead of a separate draft model, and is theoretically a better fit for a bandwidth-constrained environment like unified memory.
Expected observations: the distribution of tokens produced per step, how the acceptance rate changes with generation position, and whether gains decay under long context.
4. A Reproducible Test Procedure
1. Fix the environment: record driver, framework version, quantization format, memory frequency2. Prepare models: download -> hash check -> metadata check -> warm-up3. Sweep per configuration: grid search over n-gpu-layers / ctx-size / batch-size4. Stability check: run the same configuration 10 times in a row; take median and standard deviation5. Long-run test: generate continuously for 30 minutes; watch throughput decay and memory usage6. Archive results: record TTFT, throughput, peak memory, acceptance rate in a unified table
For presenting results, relative values are recommended: with Configuration 1 as 1.0x, report the throughput multiples and TTFT change percentages of Configurations 2 and 3. That is more comparable than listing absolute numbers.
5. Common Bottlenecks and Tuning Order
When on-device inference underperforms, troubleshoot in the order below for the highest hit rate:
- Memory budget: whether model size plus KV cache plus context length exceeds available memory. The KV cache grows linearly with context, and long-context scenarios are often the real source of overflow.
- Offloaded layers: more GPU-offloaded layers is not always better; inter-device transfer of layer data cancels out the gains, so measure to find the inflection point.
- Quantization level: a lower bit width buys capacity but loses precision; for reasoning models, the attention and embedding layers are usually more sensitive than the feed-forward layers.
- Batch and concurrency: for single-request interaction, lower the batch to protect latency; for offline batch processing, raise the batch to protect throughput.
- Thermal and power limits: throttling under sustained load makes “peak data” meaningless, so you must look at the long-run curve.
6. Moving This Capability to the Cloud
A configuration validated locally often needs to be scaled out in the cloud. Here you can reuse common cloud components: use a container platform to host the inference service with elastic scaling, use object storage to distribute model files and versions, use a message queue to smooth out traffic peaks and valleys, and use logging plus monitoring and alerting to track TTFT, throughput, and error rate. The general capabilities Baidu AI Cloud provides for this kind of scenario are organized around the chain of “model hosting, elastic inference, observability”; for specific specifications and pricing, refer to the official documentation.
7. Conclusion
Comparing the three configurations essentially answers one question: in a bandwidth-constrained unified memory environment, where do the acceleration gains come from. The baseline provides the denominator, speculative decoding verifies the ceiling of the “external draft” route, and multi-token prediction verifies the efficiency of the “built into the model” route. The practical advice for developers is: get the measurement right first, then sweep parameters, and only then weigh framework and model tradeoffs. Reverse that order and the data you get is essentially unusable.
