--- 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 ---
# 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**