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:
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.tokenize=False and pass a sampler:
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:
--temperature 0. See Speculative Decoding for which models have drafters.