Skip to main content
Use MLX for running models on Apple Silicon Macs with Metal GPU acceleration.
MLX runs LFMs on Apple Silicon’s Metal GPU. Use MLX-VLM for LFM3; MLX-LM remains the text-generation path for supported older models.

LFM3 and d1 Models

The LFM3 models and the d1 decision models run with MLX-VLM 0.8.0:
The LFM3 models run with mlx_vlm.generate:
mlx_vlm.generate turns reasoning off unless you pass --enable-thinking. mlx-lm cannot load LFM3-1.7B yet. Support is pending in ml-explore/mlx-lm#2016. The d1 models answer questions instead of generating text, and d1-2B and d1-omni-2B refuse mlx_vlm.generate and chat apps. Ask them with python -m mlx_vlm decide, which prints the answers as JSON:
Swap the model id to ask d1-omni-2B, d1-3B, or d1-omni-600M. d1-3B and d1-omni-600M return yes/no answers as value and probability. The d1 model cards show the Python API.

LFM2 and LFM2.5 text models

Use MLX-LM for older text checkpoints, including small, Japanese, and larger MoE models. These examples use MLX-LM 0.32.2. The LFM3 commands above use a different package; changing only the model ID in an MLX-LM command does not add LFM3 support.
For the Python API, apply the tokenizer’s template with tokenize=False and pass a sampler:
For an existing LFM2 deployment, keep its own model repository and sampling settings. For older vision checkpoints, use MLX-VLM and the repository linked on the selected model page.

Speculative Decoding

Some LFM2.5 vision models have DSpark draft models that make generation faster without changing the output. Pass the drafter to MLX-VLM (v0.7.2 or newer) with --draft-model:
DSpark in MLX-VLM currently supports greedy sampling only, so keep --temperature 0. See Speculative Decoding for which models have drafters.
Last modified on November 18, 2026