For years, the experience of running large language models locally has been defined by the stream. Developers and enthusiasts have grown accustomed to the rhythmic, typewriter-like cadence of tokens appearing one by one, a visual reminder of the hardware bottleneck between memory and processor. While cloud-based APIs offer blistering speeds, the latency of the round-trip and the privacy concerns of off-device processing have kept the local LLM experience in a state of compromise. This week, that compromise shifted. The emergence of LFM2.5-DSpark suggests a future where the gap between local edge devices and massive server clusters is no longer a chasm, but a manageable hurdle.
The Architecture of Speculative Acceleration
LFM2.5-DSpark introduces a sophisticated inference acceleration layer that pushes the LFM2.5-2.6B model to a staggering 140 tokens per second on an M4 Max MacBook Pro. This performance represents a leap in interactivity, effectively bringing cloud-level responsiveness to a portable workstation. In practical terms, the implementation of DSpark provides a speedup of up to 3.2 times compared to standard inference. To validate these claims, the system was benchmarked across two wildly different environments: the high-end H100 80GB GPU and the consumer-grade M4 Max MacBook Pro.
In the GPU environment, the team utilized SGLang, a high-performance inference framework, operating with BF16 precision. On the MacBook, the stack shifted to llama.cpp combined with Apple's Metal API, utilizing FP16 GGUF weights. The testing parameters were rigorous, using a block size of 9, a batch size of 1, and a temperature of 0, with a maximum output of 256 tokens across five distinct benchmark datasets. The results were stark. For the LFM2.5-2.6B model, latency in multi-tool scenarios dropped by an average of 57 percent. However, the LFM2.5-1.2B-Instruct model exhibited more volatility, with speed improvements fluctuating by up to 52 percent depending on the statistical distribution of the input data.
At the heart of this acceleration is a speculative decoding mechanism powered by a lightweight draft model of approximately 300 million parameters. Unlike the target model, which handles the heavy lifting of reasoning, the draft model is an attention-only structure consisting of only five layers. Its sole purpose is to predict a sequence of candidate tokens—up to 9 at a time, defined by the block size—which the larger target model then verifies in a single forward pass. This approach directly attacks the memory bandwidth bottleneck, the primary culprit in LLM slowness, by reducing the total number of times the massive target model weights must be loaded from memory to the processor.
Training this draft model required a curated blend of SFT, chat, code, and function-calling data. The team ran the training for 15 epochs, but they deviated from standard optimization goals. Rather than selecting the model based on the lowest loss value, they prioritized the highest acceptance rate. The acceptance rate is the percentage of tokens proposed by the draft model that the target model agrees with. By aligning the output distributions of the two models, the system ensures that the target model spends less time correcting the draft and more time confirming its predictions.
The MoE Bottleneck and Hardware Divergence
While the 2.6B model thrives under DSpark, the transition to Mixture of Experts (MoE) architectures reveals a critical tension in on-device AI. The LFM2.5-8B-A1B model, which utilizes an MoE structure, saw a much more modest improvement of only 18 percent. On paper, this is paradoxical because the MoE model actually demonstrated a higher token acceptance rate than the dense models. In a purely computational vacuum, a higher acceptance rate should translate to faster inference. In the real world of Apple Silicon, however, a different bottleneck emerges.
The limitation lies in the intersection of the MoE architecture and the llama.cpp Metal backend. In a standard dense model, verifying a block of candidate tokens is a streamlined process. In an MoE model, verifying multiple candidate tokens simultaneously requires the system to activate a wider array of expert parameters. This creates a massive spike in weight traffic—the volume of data moving between the memory and the GPU. When the cost of moving these weights exceeds the time saved by speculative decoding, the acceleration effect is neutralized. The system spends more time shuffling data than it does calculating tokens, effectively capping the performance gains of the MoE structure on edge hardware.
This disparity also extends to the smaller LFM2.5-1.2B-Instruct model, where the acceleration efficiency is highly sensitive to the domain of the text. Because the draft model is so small, its predictive accuracy fluctuates wildly based on the input pattern. When the input aligns with the draft model's training distribution, the acceptance rate climbs and speed surges. When the input shifts to an unfamiliar domain, the acceptance rate plummets, and the system reverts to the speed of the target model. This highlights a fundamental truth of speculative decoding: the smaller the draft model, the more dependent the system becomes on the statistical predictability of the prompt.
Despite these variances, the structural integrity of the output remains untouched. Because the target model performs a strict verification of every single token proposed by the draft model, the final output is mathematically identical to what the target model would have produced alone. This ensures that benchmarks like pass@1 and exact match remain constant, providing speed without sacrificing a single percentage point of accuracy.
Implementation and Deployment
For developers looking to integrate these gains, the path is already paved through specific pull requests in the major inference engines. Those using SGLang can implement DSpark by utilizing a build that includes PR #31041. The integration allows the target and draft models to be linked during server launch via a specific command line interface.
python -m sglang.launch_server --model-path <target> --speculative-model <draft> --speculative-draft <draft> --speculative-block-size 9In this configuration, the `speculative-block-size` flag is the primary lever for tuning efficiency, determining how many candidates the draft model proposes per cycle. For those operating in the llama.cpp ecosystem, PR #27383 is required to enable the experimental Metal kernels necessary for this level of throughput. The weights are readily available in both Safetensors and GGUF formats via the Liquid AI Hugging Face repository, allowing users to choose the format that best fits their memory mapping needs.
The system is designed for rapid deployment, reading the block size automatically from the `config.json` or sidecar metadata files. This removes the need for manual hyperparameter tuning, allowing developers to move from weight download to 140tok/s inference with minimal friction. By providing these weights in multiple formats and integrating with the most popular C++ and Python inference libraries, the LFM2.5-DSpark framework ensures that high-speed inference is accessible whether the target is a cloud-based H100 cluster or a laptop in a coffee shop.
When deploying these models to edge devices, the primary metric for success is the ratio of `draft_n_accepted` to `draft_n`. This ratio, visible in the llama.cpp logs, serves as the heartbeat of the system. A ratio approaching 1.0 indicates a perfect synergy between the draft and target models, resulting in linear speed increases. For those utilizing SGLang, the acceleration is served through the standard `http://localhost:30000/v1` endpoint, making it a drop-in replacement for existing AI pipelines.
The achievement of 140tok/s marks a psychological shift in on-device AI. It moves the technology away from a tool that we wait for and toward an interface that reacts in real-time, fundamentally changing how we interact with local intelligence.




