MLX-VLM support?

#1
by dalisoft - opened

Hi @LiquidAI team

thank you for small, fast and smart decision model.
As i see https://github.com/Blaizzy/mlx-vlm/pull/2611 is merged but this model card (MLX-4bit) is not updated. Also, LM Studio says not supported for this model (maybe due of vision/mlx-vlm).

Can you fix or help me please?
Thank you

Hi, thanks for the report.

d1 support shipped in mlx-vlm 0.7.11 (https://github.com/Blaizzy/mlx-vlm/pull/2611). With pip install -U "mlx-vlm>=0.7.11" the example on this card runs as written and prints the answers shown there. We updated this card and the other d1-2B and d1-Omni-2B MLX cards to say so.

LM Studio has two separate problems with this model:

  1. LM Studio runs MLX models through https://github.com/lmstudio-ai/mlx-engine, which currently pins mlx-vlm 0.7.3. That version predates LFM3, so it cannot load any lfm3_vl model, d1-2B included.
  2. Even once LM Studio updates its mlx-vlm, d1-2B will not work as a chat model. d1-2B is a decision model: it answers named, typed questions with calibrated probabilities in one forward pass instead of generating text, so mlx-vlm refuses chat requests for it on purpose.

On a Mac you can run it today from Python with model.system_one(...), as in the card, or from the command line:

pip install -U "mlx-vlm>=0.7.11"
python -m mlx_vlm decide --model LiquidAI/d1-2B-MLX-4bit \
  --state "I was charged twice this month. Please refund one of the charges." \
  --questions '{"refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}}'

Thank you for detailed response. Yes, directly it works

dalisoft changed discussion status to closed

Sign up or log in to comment