File size: 5,444 Bytes
de47c42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458ceda
de47c42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
library_name: sglang
base_model: LiquidAI/LFM2.5-2.6B
license: other
license_name: lfm1.0
license_link: LICENSE
pipeline_tag: text-generation
tags:
- speculative-decoding
- dspark
- lfm2
- draft-model
---

<div align="center">
  <img 
    src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png" 
    alt="Liquid AI" 
    style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
  />
  <div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;">
    <a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> β€’ 
    <a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> β€’ 
    <a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> β€’ 
    <a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
  </div>
</div>

# LFM2.5-2.6B-DSpark

**LFM2.5-DSpark** is a family of speculative-decoding draft models that adapt DSpark for the LFM2.5 architecture. 
They allow LFM2.5 models to run faster without degrading quality.

This is a drafter for **[`LiquidAI/LFM2.5-2.6B`](https://huggingface.co/LiquidAI/LFM2.5-2.6B)**. 
In SGLang, decoding runs about 2.6Γ— faster. It also runs on-device on Apple silicon through the Metal backend.

Find more information about LFM2.5-DSpark in our [blog post](https://www.liquid.ai/blog/lfm2.5-dspark).

## πŸ—’οΈ Model Details

LFM2.5-2.6B-DSpark is a DSpark speculative-decoding draft model with the following features:

- **Target model**: [`LiquidAI/LFM2.5-2.6B`](https://huggingface.co/LiquidAI/LFM2.5-2.6B)
- **Draft parameters**: **327.7M** (BF16)
- **Backbone**: 5 full attention layers, `hidden_size=2048`, `intermediate_size=6144` with SiLU/SwiGLU, GQA with `num_attention_heads=32` / `num_key_value_heads=8`, `head_dim=64`
- **Extra heads**: Markov head (rank 256) + confidence head
- **Block size**: 9
- **Vocabulary**: 128,000

Other models in the LFM2.5-DSpark family:

| Drafter | Target |
|---|---|
| [LFM2.5-1.2B-Instruct-DSpark](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct-DSpark) | [LFM2.5-1.2B-Instruct](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct) |
| [LFM2.5-8B-A1B-DSpark](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B-DSpark) | [LFM2.5-8B-A1B](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B) |
| [LFM2.5-2.6B-DSpark](https://huggingface.co/LiquidAI/LFM2.5-2.6B-DSpark) | [LFM2.5-2.6B](https://huggingface.co/LiquidAI/LFM2.5-2.6B) |

## πŸ“Š Performance

### Benchmarks

Speculative decoding is **exact**: the target verifies every proposed token, so the generated
text is what the target would have produced on its own. You get the speedup, not a different model.

See [`LiquidAI/LFM2.5-2.6B`](https://huggingface.co/LiquidAI/LFM2.5-2.6B) for performance benchmarks.

### Acceptance

Mean accepted tokens per decoding step, by benchmark (1Γ—H100, batch size 1, greedy decoding).
Higher means more of the draft's proposed block is accepted per target forward pass, so decoding
is faster (at block size 9, the ceiling is 10).

| Benchmark | 1Γ—H100 (SGLang) | Apple M4 Max (Metal) |
|---|---:|---:|
| MATH-500 | 5.67 | 4.45 |
| GSM8K | 4.32 | 4.91 |
| HumanEval | 4.54 | 5.24 |
| MBPP | 4.92 | 4.19 |
| MT-Bench | 4.69 | 3.33 |
| **Mean** | **4.83** | **4.42** |

### On-device and GPU Inference

| Dataset | Acceptance (of 10\) | Speedup on H100 | Speedup on M4 Max |
| :---- | :---- | :---- | :---- |
| MATH500 | 5.42 | **3.06x**<br/>(326 β†’ 1000 tok/s) | **2.25x**<br/>(61 β†’ 137 tok/s) |
| HumanEval | 4.54 | **2.56x**<br/>(326 β†’ 835 tok/s) | **2.63x**<br/>(61 β†’ 161 tok/s) |
| MBPP | 4.71 | **2.64x**<br/>(326 β†’ 861 tok/s) | **2.11x**<br/>(62 β†’ 132 tok/s) |
| GSM8K | 4.32 | **2.22x**<br/>(312 β†’ 693 tok/s) | **2.36x**<br/>(60 β†’ 143 tok/s) |
| MT-Bench | 5.07 | **2.87x**<br/>(325 β†’ 933 tok/s) | **1.99x**<br/>(62 β†’ 123 tok/s) |
| Mean | 4.81 | **2.67x**<br/>(323 β†’ 864 tok/s) | **2.27x**<br/>(61 β†’ 139 tok/s) |

## πŸƒ How to run (SGLang)

Requires a build of SGLang with DSpark support for LFM2 targets
([PR #31041](https://github.com/sgl-project/sglang/pull/31041)). Launch the target with the draft
attached:

```bash
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.

## πŸ“¬ Contact

- Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai)
- If you are interested in custom solutions with edge deployment, please contact [our sales team](https://www.liquid.ai/contact).

## Citation

```bibtex
@article{liquidAI202626B,
  author  = {Liquid AI},
  title   = {LFM2.5-2.6B: Agents Everywhere},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {www.liquid.ai/blog/lfm2-5-2-6b},
}
```

```bibtex
@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},
}
```