Liquid AI 发布 LFM2.5-DSpark 草稿模型,推理最高提速 3.2 倍
Up to 3.2x Faster Inference with LFM2.5-DSpark
Liquid AI 发布 LFM2.5-DSpark 系列草稿模型,用于 LFM2.5 的推测解码,在 H100 与 M4 Max MacBook 上最高带来 3.2 倍推理提速。草稿模型约 300M 参数,采用 5 层注意力结构、block size 为 9,在多工具场景下将 LFM2.5-2.6B 的延迟平均降低 57%。模型已以 Safetensors 和 GGUF 格式在 Hugging Face 开放,并支持 llama.cpp 与 SGLang,文中给出了对应的启动命令。
推荐理由
AI 评分 58
Liquid AI 给出 DSpark 草稿模型在 H100 与 MacBook 上的实测加速数据,并附 llama.cpp 与 SGLang 的启动命令,便于判断端侧推理的可用性。
主题
正文
当前显示原文,中文全文译文尚未就绪。
How does DSpark work
The decode phase in LLM inference is traditionally memory-bound. Most latency comes from streaming weights from DRAM into SRAM, not from intense computation. Speculative decoding addresses this by using a lightweight draft model to produce candidate tokens, then having the target model verify them all in a single forward pass, sharing the cost of loading the weights across all tokens we verify.
Over the years, multiple approaches of speculation have been proposed, with the most prominent being EAGLE-3 , DFlash , and, most recently, DSpark , which combines three components:
DFlash-style parallel backbone conditioned on the target model’s context features, producing hidden states for all draft tokens in a single forward pass.
A lightweight sequential head , modeled as a Markov chain between neighboring tokens, that adds inter-token dependency, raising the acceptance rate at later positions.
A confidence-scheduled verifier that predicts each token’s survival probability and prunes low-confidence suffixes when verification would cost more than it saves.
Training and Architecture
We follow the DSpark recipe with a larger and more diverse data mix covering SFT, chat, code, and function-calling data. Based on our ablations, the first versions of the draft models are simplified attention-only draft models, with 5 layers and a block of 9. For each draft model, we ran 15 epochs on the entire dataset and selected the epoch with the highest acceptance rate rather than the lowest loss.
The resulting draft models are relatively small, with each around ~300M parameters.
Quality parity
Under greedy decoding, a draft token is only accepted if it matches the target model’s distribution. On rejection, the target model's own token takes its place. The emitted sequence is therefore identical to baseline greedy by construction, so benchmark accuracy (pass@1 or exact match) is unchanged.
Our DSpark draft models for LFM2.5 ship with day-one support for llama.cpp (implementation builds on top of the official codebase , which we run with experimental metal kernels ) and **SGLang (**implementation builds on the official SGLang implementation of DSpark ).
We measure on-device throughput with llama.cpp and Metal on an M4 Max MacBook Pro using FP16 GGUF weights and up to 256 output tokens. We measure GPU throughput with SGLang on a single H100 80 GB in BF16. Both configurations use a DSpark block size of 9, a batch size of 1, and a temperature of 0. We evaluate them on five benchmark datasets.
All three drafter models deliver noticeable throughput improvements on both the large-scale accelerator (H100) and the edge deployment (M4 Max MacBook).
For LFM2.5-2.6B, speedup on the MacBook is especially noticeable, as it pushes the interactivity level a user can enjoy far beyond the throughput offered by most proprietary cloud models (around ~140 tok/s, depending on the dataset).
Across various multi-tool scenarios, DSpark reduces the latency by 57% on average for LFM2.5-2.6B.
For LFM2.5-1.2B-Instruct , we see much more variance in dataset acceptance rates, so speedup varies by as much as 52% depending on the underlying text distribution.
For LFM2.5-8B-A1B , the acceptance rate increases compared to two dense models, yet on-device we get only an 18% improvement on average. This gap is due to the current MoE implementation in llama.cpp's Metal backend, and to the fact that verifying k tokens activates more experts and thus more weight traffic than a single decode step.
How to use LFM2.5-DSpark
Running the DSpark draft models with SGLang requires an SGLang build with DSpark support for LFM2 targets ( PR #31041 ). Launch the target with the draft 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
Then query the OpenAI-compatible endpoint at http://localhost:30000/v1 . The block size is read from the draft's config.json ; the baseline is the same command without the three --speculative-* flags.
Running them with llama.cpp requires the respective llama.cpp build ( 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 the sidecar metadata (n-max is clamped to it). Speculative decoding is exact : the target verifies every proposed token, so greedy output equals the target alone; per-response timings report draft_n / draft_n_accepted .
The DSpark draft model checkpoints are available on Hugging Face as Safetensors and in GGUF format:
Safetensors : LFM2.5-2.6B-DSpark , LFM2.5-1.2B-Instruct-DSpark , and LFM2.5-8B-A1B-DSpark
GGUF : LFM2.5-2.6B-DSpark-GGUF , LFM2.5-1.2B-Instruct-DSpark-GGUF , LFM2.5-8B-A1B-DSpark-GGUF
We can’t wait to see what you build.
Citation
For citations, please use the following reference or BibTeX:
Liquid AI, "LFM2.5-DSpark: Up to 3.2x Faster Inference from H100 to MacBook", Liquid AI Blog, Aug 2026.
@article{liquidAI2026dspark, author = {Liquid AI}, title = {LFM2.5-DSpark: Up to 3.2x Faster Inference from H100 to MacBook}, journal = {Liquid AI Blog}, year = {2026}, note = {www.liquid.ai/blog/lfm2.5-dspark}, }
Models mentioned in this article 6 LiquidAI/LFM2.5-1.2B-Instruct-DSpark Text Generation • 0.3B • Updated Aug 20 • 1.02k • 33 LiquidAI/LFM2.5-1.2B-Instruct-DSpark-GGUF Text Generation • 0.3B • Updated Aug 21 • 1.85k • 29 LiquidAI/LFM2.5-2.6B-DSpark Text Generation • 0.3B • Updated Aug 20 • 8.95k • 36 LiquidAI/LFM2.5-2.6B-DSpark-GGUF Text Generation • 0.3B • Updated Aug 21 • 148k • 53 LiquidAI/LFM2.5-8B-A1B-DSpark Text Generation • 0.3B • Updated Aug 20 • 1.99k • 39 LiquidAI/LFM2.5-8B-A1B-DSpark-GGUF Text Generation • 0.3B • Updated Aug 21 • 100k • 27 Papers mentioned in this article 3 EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test Paper • 2503.01840 • Published Mar 3, 2025 • 10 DFlash: Block Diffusion for Flash Speculative Decoding Paper • 2602.06036 • Published Feb 5 • 100 DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation Paper • 2607.05147 • Published Jul 6 • 50 More from this author
Accelerating vision-language models with LFM2.5-VL-DSpark
49 September 24, 2026 LFM2.5 Q4\_0 Checkpoints from Quantization-Aware Distillation 36 August 19, 2026 Community Edit Preview Upload images, audio, and videos by dragging in the text input, pasting, or clicking here . Tap or paste here to upload images Comment · Sign up or log in to comment
+44
Models mentioned in this article 6
LiquidAI/LFM2.5-1.2B-Instruct-DSpark
LiquidAI/LFM2.5-1.2B-Instruct-DSpark-GGUF
LiquidAI/LFM2.5-2.6B-DSpark
LiquidAI/LFM2.5-2.6B-DSpark-GGUF
LiquidAI/LFM2.5-8B-A1B-DSpark
LiquidAI/LFM2.5-8B-A1B-DSpark-GGUF
Papers mentioned in this article 3