Model setup recipes
Last updated
LFM2.5-VL-3B DSpark: more than 2× faster visual responses on Mac
LFM2.5-VL-3B reads images and answers; DSpark speeds up answer generation
LFM2.5-VL-3B is a 3B-class vision-language model that takes a photo and a question and answers about receipt text or a scene. DSpark has a small draft model propose the next token1 and the main model verify it, shortening generation. Image reading and first-input processing stay the same, so this guide covers both the official per-device figures and how to compare your own run.
DSpark works during the answer-writing stage. Separating image reading or scene understanding from answer generation makes it easier to see which tasks benefit most.
This guide first identifies the hardware and runtimes behind the published results, then covers setup paths for Mac and NVIDIA servers and a way to compare timing on your own tasks.
Separate image processing from answer generation
An image question involves image encoding, prefill2 that reads the input context, and decode3 that generates answer tokens. LFM2.5-VL-3B supports a 32K context. DSpark reduces repeated decode computation by having a small draft model propose tokens and the target model verify them. Image encoding and input reading are still required.
Extracting short values such as a date and amount from a receipt produces a short answer, so image processing makes up a larger share of the work. Longer answers, such as a photo description or translation, can reflect decode savings more strongly in total response time. A token-generation speedup shown on a speed page and completion time for an actual task are different measures.
- Liquid AI's official LFM2.5-VL DSpark explanation and measurements
- Mac Studio M3 Ultra 512GB baseline
- Prefill vs decode: should you look at TTFT or tok/s?
- GGUF vs MLX: which model format should you download?
- GLM-5.3-Flash Serving Guide: A 320B Server-Scale MoE Recipe
- Finding objects with Florence-2-base: one 0.23B vision model


Read official speedups together with hardware and runtime
Across six vision tasks published by Liquid AI, decode on M5 Max with MLX-VLM improved by 2.30–3.13× and total completion time by 1.56–2.62×. On M3 Ultra with llama.cpp, decode improved by 1.57–2.14× and total time by 1.30–1.77×. Results vary with hardware, runtime4, and output length even for the same model name.
The model card lists 228 tok/s for the base LFM2.5-VL-3B on Apple M5 Max and 116 tok/s on AMD Ryzen AI Max+ 395. These are baseline figures for the documented paths, not guaranteed speeds for every quantization5 or image. Do not transfer the M5 Max or M3 Ultra DSpark multipliers to other hardware.
| Hardware and runtime | Decode improvement | Total completion improvement |
|---|---|---|
| M5 Max · MLX-VLM | 2.30–3.13× | 1.56–2.62× |
| M3 Ultra · llama.cpp | 1.57–2.14× | 1.30–1.77× |

Choose a Mac runtime for your workflow
For a simple start on M5 Max, specify the main model and DSpark draft model together in the MLX-VLM server. When connecting an app, check the OpenAI-compatible endpoint and save a baseline run with one fixed image and the same output length. After enabling acceleration, confirm the answer is preserved and draft acceptance is recorded.
For llama.cpp on M3 Ultra, prepare the target model's F16 GGUF6, vision projector, and DSpark draft file together. The official example starts with context 8192 and maximum draft length 8. Save the launch command and checkpoint7 hashes so you can repeat the comparison with the same files and settings.
mlx_vlm.server --model LiquidAI/LFM2.5-VL-3B --draft-model LiquidAI/LFM2.5-VL-3B-DSpark --host 127.0.0.1 --port 8080Run the SGLang example on an NVIDIA server
The SGLang example specifies the DSpark algorithm, draft model, FlashInfer draft attention8, and block size 9. Start with one request and a short context to verify server startup and image input, then compare the same request without acceleration. Record draft proposals and acceptances together with total completion time.
The draft does not replace the final answer. The main model verifies the candidates, which can preserve the target model's output under greedy-generation settings. Runtime versions or sampling settings change the conditions, so use the same request and generation options in a comparison.
python -m sglang.launch_server \
--model-path LiquidAI/LFM2.5-VL-3B \
--speculative-algorithm DSPARK \
--speculative-draft-model-path LiquidAI/LFM2.5-VL-3B-DSpark \
--speculative-draft-attention-backend flashinfer \
--speculative-dspark-block-size 9 \
--disable-radix-cache --mem-fraction-static 0.8 --host 127.0.0.1 --port 30000Compare total time on your image tasks
Measure the baseline and DSpark runs three times each with the same image and question. Record image submission to first token, first to final token, and total completion time separately. If image preprocessing takes a long time, reducing image size may have a larger effect on total wait.
If draft acceptance is low or answers are short, the cost of loading the extra draft model may exceed its benefit. Choose three real OCR9, captioning, or translation tasks and compare medians. The reduction in total wait on your own work is a better basis for keeping acceleration than a published multiplier.
Terminology notes
Token — A unit into which a model divides input or output for processing.
Back to the textPrefill — The stage where an LLM reads the input prompt and computes representations for its tokens. Longer prompts contain more tokens to process.
Back to the textToken decoding — The stage that generates successive output tokens using the input and the response produced so far.
Back to the textRuntime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.
Back to the textQuantization — A way to represent model weights or values with fewer bits, reducing storage and memory use. The coarser representation can also affect accuracy.
Back to the textGGUF — A file format for model data, widely used by llama.cpp-based tools.
Back to the textCheckpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.
Back to the textAttention — A neural-network operation that calculates relationships between input tokens and combines information from each position into the current representation.
Back to the textOCR — The process of recognizing characters in images or scanned documents and turning them into text. Table layout and reading order still need the original image to verify.
Back to the text
Frequently asked questions
- What should you check first in this article?
- LFM2.5-VL-3B is a 3B-class vision-language model that takes a photo and a question and answers about receipt text or a scene. DSpark has a small draft model propose the next token and the main model verify it, shortening generation. Image reading and first-input processing stay the same, so this guide covers both the official per-device figures and how to compare your own run.
Read next
Response speed and acceleration
Run DFlash and DSpark with llama.cpp: A Qwen3-4B Walkthrough
Executable programs and extensions
Run local AI with MLX on Apple Silicon: frameworks and model tools explained
Executable programs and extensions
llama.cpp: finding which settings are slowing you down
Executable programs and extensions
Set Up a Local vLLM Server: From a Small Model to Adaptive Verification in 0.30
