mlx-community/d1-2B-OptiQ-4bit

Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. All OptiQ quants ยท Docs

An OptiQ mixed-precision quant of LiquidAI/d1-2B, Liquid's decision model built on LFM3-VL-2B. It answers named, typed questions about a state (yes/no, choice, score) with a probability for every option, in one forward pass and with no generated tokens.

d1 has no separate head: each answer is read off the language model at its answer slot, after a prompt where the state and the questions read each other both ways. optiq serve runs that natively in MLX, with Liquid's own prompt and calibration code (shipped in this repo) so the model sees exactly what it was trained on.

Typed Decisions

Scored on the full 400-case test split of LocalLLaMA/typed-decisions (2,000 decisions) with the benchmark's own metrics, one request per case with all five questions, zero-shot.

Model Size Accuracy KL from gold โ†“ Brier โ†“ ECE โ†“
LiquidAI/d1-2B (Liquid's runner, float32) 3.8 GB 0.637 0.2817 0.1370 0.1244
This model 1.7 GB 0.641 0.2834 0.1386 0.1262
LiquidAI/d1-2B-MLX-4bit 1.35 GB 0.6265 0.2905 0.1431 0.1304

How far each quant moves the answers away from the original, over the same 2,000 decisions:

Mean KL from the original โ†“ Answers changed โ†“ Largest probability shift โ†“
This model 0.011 8.2% 0.27
LiquidAI/d1-2B-MLX-4bit 0.025 11.3% 0.37

This quant stays closer to the original than Liquid's uniform 4-bit, at about a quarter more disk (1.7 GB against 1.35 GB). Its typed-decisions accuracy is within noise of the original's. Median latency is 0.27 s per case (five questions in one request) on an Apple M3 Max.

Run it

pip install -U mlx-optiq
optiq serve --model mlx-community/d1-2B-OptiQ-4bit

Then ask it questions over POST /v1/systemone:

curl -s localhost:8080/v1/systemone -H 'Content-Type: application/json' -d '{
  "model": "d1",
  "state": "I was charged twice and my parcel never arrived. Please refund one charge.",
  "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", "shipping": "Delivery and parcels"}},
    "urgency": {"type": "score", "instructions": "How urgent is this ticket?", "criteria": ["low", "medium", "high"]}
  }
}'

Each answer comes back in d1's own shape, with its probabilities and "output_tokens": 0. From Python:

from optiq.decision import D1

model = D1.load("mlx-community/d1-2B-OptiQ-4bit")
out = model.system_one(state, questions)

Yes/no, choice (including "multiple": true), score and estimate questions are supported, over text and JSON states. Reading spans out of the state (text, number, date) and pictures or video are not supported yet; the vision tower ships here at bf16 in optiq_vision.safetensors for when they are. Needs mlx-optiq 0.7.9 or later.

Links

Downloads last month
38
Safetensors
Model size
2B params
Tensor type
U32
ยท
BF16
ยท
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 mlx-community/d1-2B-OptiQ-4bit

Finetuned
LiquidAI/d1-2B
Quantized
(9)
this model

Evaluation results

  • LocalLLaMA/typed-decisions leaderboard
  • Accuracy View evaluation results
    source
    Zero-shot (no training on the benchmark): the full 400-case test split (2,000 decisions), one request per case with all five questions, text only, the benchmark's own metrics, MLX on an Apple M3 Max.
    0.64 *
  • Kl From Gold View evaluation results
    source
    Zero-shot (no training on the benchmark): the full 400-case test split (2,000 decisions), one request per case with all five questions, text only, the benchmark's own metrics, MLX on an Apple M3 Max.
    0.28 *
  • Brier View evaluation results
    source
    Zero-shot (no training on the benchmark): the full 400-case test split (2,000 decisions), one request per case with all five questions, text only, the benchmark's own metrics, MLX on an Apple M3 Max.
    0.14 *