What happened
Liquid AI has released DSpark, a suite of tools designed to boost the performance of Llama.cpp on Apple Silicon hardware by utilizing speculative decoding. The core of DSpark involves pairing lightweight 'draft' models with the larger target model – a technique known as Mixture-of-Experts (MoE). These draft models rapidly propose potential token sequences, and the bigger model then confirms or rejects them.
This approach attempts to sidestep the primary bottleneck in LLM inference: the slow process of streaming weights from DRAM into SRAM. The results are compelling. On an H100 GPU, the 8B-A1B LFM2.5 model achieved a 2.54x throughput improvement (at up to 1074 tokens per second) compared to the base GGUF version when running on Metal with FP16 weights. The 2.6B and 1.2B models also showed notable gains. Even more strikingly, DSpark delivered a 3.18x throughput increase on the MATH500 benchmark (again using the H100) for the 8B-A1B model—a figure that surprised many due to the inherent complexities of MoE inference. On an M4 Max MacBook, results were equally impressive: up to 2.87x throughput on the same MATH500 benchmark. This was achieved without requiring any modification to the base model outputs and indicated a significant advantage for devices with integrated GPUs, especially in agentic workloads.
Why it matters
The implications of DSpark extend beyond simply faster inference speeds. For applications relying heavily on LLMs—like complex chatbots or data analysis workflows—the ability to process information more quickly translates directly into improved user experience and increased productivity.
The demonstrable improvements on Apple Silicon, a platform increasingly used for AI development and deployment, are particularly noteworthy. The speedup primarily stems from the efficiency of speculative decoding in mitigating memory latency – a persistent challenge in LLM inference. The fact that this technique worked so well on devices like the M4 Max suggests a more general approach to accelerating LLMs across diverse hardware configurations.
But, but, but…
The 8B MoE model’s struggles highlight a key limitation currently facing MoE inference on llama.cpp's Metal backend. Verifying k tokens (the number of draft tokens considered) activates more experts and thus triggers increased weight traffic from DRAM to SRAM.
This creates an unexpected overhead, diminishing the benefits of the speculative approach for this particular model size. Liquid AI acknowledged this issue as a focus for future development, suggesting that optimizing how MoE inference is handled on Metal could unlock even greater performance gains. Additionally, variations in acceptance rates across different datasets indicated areas where further refinement of the draft models might be beneficial.
“it reduces latency by 57% on average for the 2.6b model on a macbook.”
— Dr Non
The counter-take
The persistent assumption that simply increasing model size always equates to better performance is being challenged. DSpark’s success demonstrates the potential for clever architectural techniques – like speculative decoding and draft models – to deliver significant improvements even with smaller models, highlighting a need to rethink scale-up strategies in LLM development.
The AI angle
AI-powered LLM inference is seeing a shift towards hardware-aware optimization. This means moving beyond purely software-based enhancements to directly address the underlying limitations of hardware, offering substantial gains in speed and efficiency – particularly as MoE architectures become more prevalent.