Liquid AI
Try LFM • Docs • Discord

d1-3B-MLX-4bit

d1-3B is a decision model developed by Liquid AI: it answers named, typed questions over a state (text, JSON or images) in one forward pass, with no generated tokens.

This repository is an MLX export of d1-3B in 4-bit for Apple Silicon, run with mlx-vlm. Find more details in the original model card: https://huggingface.co/LiquidAI/d1-3B

🏃 How to run d1-3B

d1 support is in mlx-vlm after 0.7.6. Until the next release, install it from GitHub:

pip install -U git+https://github.com/Blaizzy/mlx-vlm.git
from mlx_vlm import load, predict

model, processor = load("LiquidAI/d1-3B-MLX-4bit")

# Text: several named questions over one state, answered in one pass
questions = {
    "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"},
    "team": {
        "type": "choice",
        "instructions": "Which team should handle this?",
        "criteria": {
            "billing": "Charges, refunds, invoices",
            "technical": "App or site faults",
            "fraud": "Suspected unauthorised use",
        },
    },
    "urgency": {
        "type": "score",
        "instructions": "How urgent is this?",
        "criteria": ["Can wait", "Today", "Blocking the customer now"],
    },
}
result = predict(model, processor, "I was charged twice this month, please refund one of them.", questions)
print(result["answers"])

# Image: the photo is the whole state
cats = {
    "type": "choice",
    "instructions": "How many cats are there?",
    "criteria": {"one": "One", "two": "Two", "more": "Three or more"},
}
print(predict(model, processor, None, {"cats": cats},
              images=["http://images.cocodataset.org/val2017/000000039769.jpg"]))

Each call returns {"answers": {name: answer}, "usage": {"input_tokens": n, "output_tokens": 0}}. A choice answer has the chosen label in value, plus probabilities and metadata.confidence; a score answer has the expected level in value, plus probabilities and the level legend; a noul (or bool) answer has probability, the probability of yes.

From the command line:

python -m mlx_vlm decide --model LiquidAI/d1-3B-MLX-4bit \
  --state "I was charged twice this month, please refund one of them." \
  --questions '{"refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}}'

--state is optional with one or more --image options.

As a server, with the same request shape on /v1/decisions ("images" take URLs, paths or base64 data URIs):

python -m mlx_vlm server --decision-model LiquidAI/d1-3B-MLX-4bit

curl http://127.0.0.1:8080/v1/decisions -H "Content-Type: application/json" -d '{
  "state": "I was charged twice this month, please refund one of them.",
  "questions": {"refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}}
}'

📏 Precisions

Every precision was checked against the original checkpoint run in float32 with mlx-vlm, which matches the PyTorch reference to about 1e-5 in probability. The check covers 104 text and 41 image answers. "Same top answer" counts answers whose most likely option matches the float32 run; Δp is the largest change in any option's probability.

Repository Weights Size Same top answer Max Δp Mean Δp
d1-3B-MLX-fp16 float16 6.25 GB 145/145 0.005 0.0006
d1-3B-MLX-8bit 8-bit language model; vision tower, projector and norms in float16 3.72 GB 144/145 0.015 0.0020
d1-3B-MLX-4bit 4-bit language model; vision tower, projector and norms in float16 2.37 GB 142/145 0.212 0.0276

float16 is the recommended precision. The checkpoint is stored in bfloat16; in float16 all but about 0.1% of its weights, the very smallest, are exact and none overflow, and float16 computes with more precision at the same speed on Apple GPUs. It stays closest to the float32 answers, so there is no bfloat16 export. The quantized exports keep their unquantized parts in float16, which cut the 8-bit drift by more than half compared with bfloat16. 8-bit moves probabilities by up to about 0.015. 4-bit moves them by up to about 0.2, so prefer it only where memory matters more than calibration. The top answers that changed were near ties, with the float32 runner-up within 0.1. The vision tower and projector are never quantized. This check is a smoke test of agreement, not an accuracy benchmark.

🧪 Recipe

Converted from d1-3B at revision 051bcc464b01 with mlx-vlm at commit 952d4f6bc65b:

python -m mlx_vlm convert --hf-path LiquidAI/d1-3B --mlx-path d1-3B-MLX-4bit -q --q-bits 4 --q-group-size 64 --dtype float16

The upstream PyTorch .py files were removed after conversion; config.json keeps its auto_map entry, which mlx-vlm uses to select d1.

Citation

@article{liquidAI2026opend1,
  author  = {Liquid AI},
  title   = {Open d1: Edge decision models for text, vision, and audio},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {https://www.liquid.ai/blog/d1-open},
}
@article{liquidai2025lfm2,
  title   = {LFM2 Technical Report},
  author  = {Liquid AI},
  journal = {arXiv preprint arXiv:2511.23404},
  year    = {2025}
}

📄 License

This model is released under the LFM 1.0 License, as is the original checkpoint.

Downloads last month
8
Safetensors
Model size
3B params
Tensor type
U32
·
F16
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for LiquidAI/d1-3B-MLX-4bit

Finetuned
LiquidAI/d1-3B
Quantized
(19)
this model

Paper for LiquidAI/d1-3B-MLX-4bit