d3 — MLX (Apple Silicon)

MLX conversion of vllm-sr/d3, part of the Decision 3.0 collection — the System One code-readout decision model (Qwen3.5-VL backbone + a 255-way readout head).

Install

pip install mlx-vlm transformers

Use

from d3_mlx import D3MLX

m = D3MLX(".")
result = m.system_one(
    "state text the model should treat as data",
    {"route": {"type": "choice", "criteria": {"a": "first option", "b": "second option"}}},
)
print(result)

Files

  • weights.safetensors — MLX backbone weights (remapped + transposed)
  • readout.safetensors — the original 255-way readout head (unchanged)
  • d3_mlx.py — MLX runtime: loader, prompt contract, decision path
  • config.json, decision_config.json, tokenizer files — copied from the original checkpoint

What was changed to make it run on MLX

  • key remap: language_model.* → language_model.model.*; language_model.visual.* → vision_tower.*
  • linear_attn.conv1d.weight transposed [C,1,K] → [C,K,1]
  • patch_embed.proj.weight transposed NCDHW → NDHWC
  • decoder layer types taken from the checkpoint's explicit layer_types list (irregular patterns: the small models end with several full-attention layers; the 32/64-layer models use a uniform every-4 pattern — the stock MLX class derives this and gets it wrong)
  • tied lm_head dropped (embeddings are tied; only hidden states are needed)
  • prompt format, answer codes and the readout head are identical to the original

Numerics: BF16 backbone, FP32 readout + softmax — the same as the reference implementation.

Weights are unchanged from the original; only the format/layout was converted. Converted with mlx-vlm on an Apple M3 Max.

Downloads last month
140
MLX
Hardware compatibility
Log In to add your hardware

Quantized

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

Model tree for ahmedandaloes/d3-mlx

Base model

Qwen/Qwen3.8-27B
Finetuned
vllm-sr/d3
Quantized
(8)
this model

Collection including ahmedandaloes/d3-mlx