Local LLM Inference Tested: Running DeepSeek V4-Flash on AI Max+ 495
This article reports a hands-on evaluation of local large language model inference on a unified-memory platform, using DeepSeek V4-Flash on AI Max+ 495 as the test case. It explains why on-device inference is gaining attention, outlines a reusable benchmarking methodology with fixed variables and clearly defined metrics (TTFT, TPOT, throughput, and peak memory), and compares three configurations: native multi-token prediction, speculative decoding with a separate draft model, and a lightweight model with a built-in multi-token prediction head. The results show that memory bandwidth, not compute, is the main bottleneck, and that draft acceptance rate matters more than theoretical speedup. The article closes with six practical engineering tips and guidance on splitting workloads between local and cloud endpoints.
1. Why Local LLM Inference Is Back in Focus
For the past two years, LLM inference has almost defaulted to the cloud. That assumption is now being re-examined. On-device inference offers data that never leaves the machine, predictable costs that are not billed per token, availability without a network connection, and millisecond-level time-to-first-token for a more responsive feel. For teams working with code repositories, design drawings, or medical imaging reports, local inference is often the only compliant option.
The difficulty is equally clear: large models put pressure on both memory capacity and memory bandwidth. In a conventional discrete-GPU-plus-system-memory design, VRAM capacity is a hard ceiling, so models must be split or aggressively quantized, with visible accuracy loss. A unified memory architecture (referred to here as a large-memory unified architecture) lets the CPU, GPU, and NPU share one high-capacity memory pool, which largely resolves the “will it fit” question. “Will it run fast” then depends on bandwidth and scheduling efficiency.
2. Test Environment and Methodology
The goal of this evaluation was not to produce a hardware score, but to validate a reusable methodology for benchmarking on-device inference. The overall approach:
- Runtime: an open-source inference framework that supports LLM inference (a common general-purpose inference runtime). Model weights were downloaded and verified offline in advance so that network fluctuations would not affect the test.
- Configurations under test: three combinations of a high-throughput model plus a speculative-decoding-style acceleration scheme.
- Configuration A: a single large dense/mixture-of-experts model with native multi-token prediction.
- Configuration B: the same model paired with a separate draft model for speculative decoding.
- Configuration C: a lightweight model from another family with a built-in multi-token prediction (MTP) head.
- Controlled variables: the same quantization bit-width range, the same context length, the same sampling parameters (fixed temperature and top_p), and the same concurrency.
- Metrics:
- TTFT (time to first token): determines how responsive the interaction feels.
- TPOT (time per output token): determines the smoothness of long-form output.
- Throughput (tokens/s): determines batch and concurrency capability.
- Peak memory usage and stability: determines whether long sessions get reclaimed by the system.
Illustrative startup and benchmark commands (neutralized):
# 1. Prepare weights offline# Place the verified model directory on local storage and record file hashes# 2. Start the inference server with the unified memory backend and context cachingrun-server --model /models/local-llm \--ctx-size 32768 \--cache-type-k q8_0 --cache-type-v q8_0 \--flash-attn on \--host 127.0.0.1 --port 8080# 3. Run the benchmark: fixed input/output lengths, take the median over multiple runsrun-bench --model /models/local-llm \--prompt-len 2048 --gen-len 512 --repeat 5
Note that quantized KV cache (such as q8_0) and Flash Attention are general-purpose optimizations. The former trades a very small accuracy cost for several times the context capacity; the latter reduces the memory and bandwidth overhead of attention computation. Both pay off especially well in on-device scenarios.
3. Measured Results and Root-Cause Analysis
With a 32K context, 512 output tokens, and a single concurrent request, the three configurations showed a clear tiering.
Configuration A (native multi-token prediction) was the most stable for long outputs. Because drafting and verification happen inside the same model, no extra weights need to be loaded and memory usage is predictable. The speculative acceptance rate is noticeably higher on highly repetitive text such as code and structured JSON, and measured generation speed improved considerably over baseline autoregressive decoding, with almost no impact on time-to-first-token.
Configuration B (external draft model) delivered strong throughput at low concurrency, but at the cost of additional resident memory and higher time-to-first-token. The smaller the draft model, the lower the hit rate, which can produce a speedup below expectations or even a negative optimization; dual-model scheduling also adds runtime overhead. The conclusion: this scheme suits scenarios with ample VRAM or memory that pursue extreme single-stream speed.
Configuration C (lightweight model plus built-in MTP) gave the best overall experience on memory-constrained devices. The model itself is small and loads fast, and with the multi-token prediction head, response times in short-context interactions come close to a cloud experience. However, when long chains of reasoning or large code contexts are required, the gap in output quality becomes visible.
One easily overlooked observation: the bottleneck across all three configurations was not compute but memory bandwidth. As batch size increased, throughput growth flattened quickly, indicating that on-device inference is a typical memory-bound workload rather than a compute-bound one.
4. Six Engineering Practices for a Smoother Experience
- Warm-up is not optional. The first request must page in weights and compile kernels, so send several discarded requests before benchmarking; otherwise TTFT numbers are badly distorted.
- Layer the context. Keep the system prompt and tool definitions in cache, and truncate multi-turn history on demand so the context does not grow indefinitely and consume bandwidth.
- Converge sampling parameters. On-device compute is limited, and a high temperature with a large top_k significantly increases wasted tokens; use a fixed low temperature for structured output.
- Concurrency strategy. Under a unified memory architecture, concurrency gains are limited; 1–2 concurrent requests is the sweet spot, leaving headroom for the system itself.
- Quantization choices. 4-bit weights are already the mainstream on-device compromise; KV cache quantization offers greater gains and should be enabled first for long-context scenarios.
- Observability. Collect TTFT, TPOT, and memory levels through logging and alerting, and build a trend dashboard; only then can you pinpoint the real cause of progressive slowdowns.
5. Deployment Guidance and Cloud-Edge Collaboration
On-device inference is not meant to replace the cloud but to divide the work: short tasks such as sensitive-data preprocessing, code completion, and document summarization move to the local machine, while complex reasoning, long-document understanding, and large offline batch jobs go to elastic cloud compute. Architecturally, a unified service interface abstraction can be used, with local and cloud endpoints sharing the same protocol and the business layer switching routing through configuration, balancing “data stays within its domain” against “compute on demand.”
For building a complete on-device inference platform, general cloud product capabilities can serve as complements: object storage for distributing and versioning model weights and datasets, a container platform for standardized delivery of inference services, logging and alerting for full-chain observability, and a message queue for smoothing out offline batch workloads. These are all general capability categories in the industry; specific choices should be evaluated against your own compliance and cost constraints.
6. Conclusion
Three conclusions stand out. First, a large-memory unified architecture turns running large models locally from infeasible into feasible, so selection should prioritize memory capacity and bandwidth over peak compute. Second, the effectiveness of speculative-decoding acceleration depends heavily on how well the model matches the task; the draft hit rate, not the theoretical speedup, is the basis for a decision. Third, the main battleground for on-device inference optimization lies in context management, quantization strategy, and concurrency control, not in stacking hardware specifications. Only by fixing the evaluation methodology in place can you make reproducible, comparable technical judgments as hardware iterates quickly.
