LFM2.5-DSpark Delivers Up to 3.2x Faster Inference
Liquid AI has released DSpark draft model checkpoints for three models in the LFM2.5 family: LFM2.5 1.2B Instruct , LFM2.5 2.6B , and LFM2.5 8B A1B . The checkpoints add specula...
By Software Development Team
Liquid AI has released DSpark draft model checkpoints for three models in the LFM2.5 family: LFM2.5-1.2B-Instruct, LFM2.5-2.6B, and LFM2.5-8B-A1B. The checkpoints add speculative decoding, which slightly increases memory use while improving decoding speed without changing output quality.
Reported results include:
- Up to 3.18x higher throughput on a GPU and up to 2.87x on-device.
- An average 57% reduction in function-calling latency for LFM2.5-2.6B.
- Support for llama.cpp and SGLang, with LFM-compatible DSpark integrations available upstream.
How DSpark works
LLM decoding is traditionally memory-bound. Much of its latency comes from streaming model weights from DRAM into SRAM rather than from intensive computation.
Speculative decoding uses a lightweight draft model to propose candidate tokens. The target model then verifies those candidates in a single forward pass, allowing the cost of loading its weights to be shared across multiple tokens.
Several speculative decoding approaches have been proposed, including EAGLE-3, DFlash, and DSpark. DSpark combines three components:
- A DFlash-style parallel backbone, conditioned on context features from the target model and producing hidden states for all draft tokens in one forward pass.
- A lightweight sequential head, modeled as a Markov chain between neighboring tokens. It adds inter-token dependency and improves acceptance rates at later positions.
- A confidence-scheduled verifier, which estimates each token's probability of surviving verification and removes low-confidence suffixes when checking them would cost more than it saves.
Training and architecture
The DSpark training recipe uses a larger and more diverse mixture of supervised fine-tuning, chat, code, and function-calling data. The initial draft models are simplified, attention-only models with five layers and a block size of nine.
Each draft model was trained for 15 epochs over the full dataset. The selected checkpoint was the one with the highest acceptance rate, rather than the lowest loss.
The resulting draft models contain approximately 300 million parameters each:
| Component | LFM2.5-1.2B-Instruct | LFM2.5-8B-A1B | LFM2.5-2.6B |
|---|---|---|---|
| Decoder stack, 5 layers | 241.2M | 241.2M | 241.2M |
| Hidden-state projection | 21.0M | 21.0M | 21.0M |
| Markov head | 33.6M | 65.5M | 65.5M |
| Norms and confidence head | 27.5k | 27.5k | 27.5k |
| Total | 295.7M | 327.7M | 327.7M |
Quality parity
With greedy decoding, a draft token is accepted only when it matches the target model's distribution. If the token is rejected, the target model's own token replaces it.
As a result, the emitted sequence is identical to baseline greedy decoding by construction. Benchmark results based on pass@1 or exact match therefore remain unchanged.
Inference performance on CPU and GPU
The LFM2.5 DSpark draft models support llama.cpp and SGLang from release. The llama.cpp implementation builds on the official codebase and uses experimental Metal kernels. The SGLang implementation builds on the official SGLang DSpark implementation.
On-device throughput was measured with llama.cpp and Metal on an M4 Max MacBook Pro, using FP16 GGUF weights and up to 256 output tokens. GPU throughput was measured with SGLang on a single H100 80 GB using BF16. Both configurations used a DSpark block size of nine, a batch size of one, and a temperature of zero. Five benchmark datasets were evaluated.
LFM2.5-2.6B
| Dataset | Acceptance, out of 10 | H100 speedup | M4 Max speedup |
|---|---|---|---|
| MATH500 | 5.42 | 3.06x, 326 to 1000 tok/s | 2.25x, 61 to 137 tok/s |
| HumanEval | 4.54 | 2.56x, 326 to 835 tok/s | 2.63x, 61 to 161 tok/s |
| MBPP | 4.71 | 2.64x, 326 to 861 tok/s | 2.11x, 62 to 132 tok/s |
| GSM8K | 4.32 | 2.22x, 312 to 693 tok/s | 2.36x, 60 to 143 tok/s |
| MT-Bench | 5.07 | 2.87x, 325 to 933 tok/s | 1.99x, 62 to 123 tok/s |
| Mean | 4.81 | 2.67x, 323 to 864 tok/s | 2.27x, 61 to 139 tok/s |
Across multi-tool scenarios, DSpark reduced latency by an average of 57% for LFM2.5-2.6B.
LFM2.5-1.2B-Instruct
Acceptance rates varied more across datasets for LFM2.5-1.2B-Instruct, causing speedups to differ by as much as 52% depending on the underlying text distribution.
| Dataset | Acceptance, out of 10 | H100 speedup | M4 Max speedup |
|---|---|---|---|
| MATH500 | 6.02 | 2.56x, 668 to 1712 tok/s | 2.62x, 140 to 366 tok/s |
| HumanEval | 5.31 | 2.26x, 664 to 1499 tok/s | 2.87x, 136 to 389 tok/s |
| MBPP | 5.52 | 2.37x, 667 to 1578 tok/s | 2.74x, 137 to 375 tok/s |
| GSM8K | 4.34 | 1.67x, 624 to 1041 tok/s | 2.73x, 140 to 381 tok/s |
| MT-Bench | 3.90 | 1.66x, 657 to 1091 tok/s | 1.72x, 137 to 237 tok/s |
| Mean | 5.02 | 2.10x, 656 to 1384 tok/s | 2.54x, 138 to 350 tok/s |
LFM2.5-8B-A1B
LFM2.5-8B-A1B achieved higher acceptance rates than the two dense models. However, its average on-device improvement was 18%.
The difference is attributed to the current MoE implementation in llama.cpp's Metal backend. Verifying multiple tokens activates more experts, which creates more weight traffic than a single decode step.
| Dataset | Acceptance, out of 10 | H100 speedup | M4 Max speedup |
|---|---|---|---|
| MATH500 | 8.27 | 3.18x, 428 to 1362 tok/s | 1.21x, 93 to 112 tok/s |
| HumanEval | 7.02 | 2.58x, 426 to 1100 tok/s | 1.12x, 91 to 101 tok/s |
| MBPP | 6.93 | 2.64x, 426 to 1122 tok/s | 1.09x, 89 to 97 tok/s |
| GSM8K | 4.02 | 1.29x, 385 to 496 tok/s | 1.44x, 90 to 129 tok/s |
| MT-Bench | 8.52 | 3.02x, 426 to 1288 tok/s | 1.04x, 87 to 90 tok/s |
| Mean | 6.95 | 2.54x, 418 to 1074 tok/s | 1.18x, 90 to 106 tok/s |
Using LFM2.5-DSpark
SGLang
Running DSpark with SGLang requires an SGLang build with DSpark support for LFM2 targets, available through PR #31041. Launch the target model with the draft model attached:
python -m sglang.launch_server \
--model-path LiquidAI/LFM2.5-2.6B \
--speculative-algorithm DSPARK \
--speculative-draft-model-path LiquidAI/LFM2.5-2.6B-DSpark \
--speculative-draft-attention-backend flashinfer \
--disable-radix-cache --mem-fraction-static 0.75 --port 30000
The OpenAI-compatible endpoint is available at http://localhost:30000/v1. The block size is read from the draft model's config.json. A baseline run uses the same command without the three --speculative-* flags.
llama.cpp
Running the models with llama.cpp requires the corresponding build, available through PR #27383:
llama-server -m LFM2.5-2.6B-F16.gguf \
-md LFM2.5-2.6B-DSpark-F16.gguf \
--spec-type draft-dspark --spec-draft-n-max 10 --spec-draft-n-min 0 \
-fa on -ngl 99
The block size is read from sidecar metadata, and n-max is clamped to that value. Speculative decoding is exact: the target model verifies every proposed token, so greedy output matches the target model running alone. Per-response timings fields report draft_n and draft_n_accepted.
Model checkpoints
DSpark checkpoints are available in Safetensors and GGUF formats: