Torchcast Decision 4B — MLX 4-bit
⚠️ Vision / image input is NOT available in this MLX version. The original checkpoint
is a vision-language model (Qwen3_5ForConditionalGeneration), but MLX-LM has no
Qwen3.5 vision-tower implementation, so mlx_lm.convert silently discards
model.visual.* (0.33 B params, ~6% of the model). Text decisions are unaffected.
For image evidence, use torchcast-ai/torchcast-decision-4b.
4-bit MLX quantization of torchcast-ai/torchcast-decision-4b (Qwen3.5-4B hybrid: 24 Gated-DeltaNet + 8 full-attention layers). Runs on Apple Silicon.
Quantization
4-bit affine, group_size: 64. Effective 8.41 bits/weight, because the norms,
lm_head, and all Gated-DeltaNet recurrence internals (A_log, dt_bias, conv1d,
in_proj_[qkv/z/a/b], out_proj, linear_attn.norm) stay in bf16 — the delta-net
state recurrence is numerically sensitive and quantizing it changes decisions.
Benchmark
Scored on the Typed Decisions
test split (400 cases × 5 questions = 2000 decisions), with the benchmark's own
scoring function (accuracy, KL from gold, Brier, ECE):
| Variant | Accuracy ↑ | KL ↓ | Brier ↓ | ECE ↓ | Size |
|---|---|---|---|---|---|
| BF16 | 0.7185 | 0.2884 | 0.1405 | 0.0645 | 9.68 GB |
| 8-bit | 0.7190 | 0.2907 | 0.1415 | 0.0635 | 6.69 GB |
| 4-bit — this repo | 0.7245 | 0.2783 | 0.1342 | 0.0480 | 5.09 GB |
For reference on that leaderboard: Prior = 0.470, Uniform = 0.308.
Read with care: relative to BF16, 106 of 2000 decisions (5.3%) change, max |Δprobability| 0.62 (near-ties). The aggregate metrics are equal or slightly better than BF16, but that is within sampling noise — not evidence of better quality. The 5.3% decision drift is the real behavioural difference. If behaviour fidelity matters more than size, use the 8-bit or BF16 version.
The model does not generate text — one forward pass, then the answer letter is read
from the last prompt token (see decision_config.json).
Usage
Weights only; the original torchcast_decision package supplies the decision math
(prompt rendering, letter-token readout, temperature 0.9, noul_floor 0.801).
Note the decision runs use non-causal attention, which stock MLX-LM generation
does not apply:
import sys, json, mlx.core as mx
from mlx_lm.models.qwen3_5 import Model, ModelArgs
from torchcast_decision import render as R # from the original repo
from transformers import AutoTokenizer
cfg = json.load(open("config.json"))
model = Model(ModelArgs.from_dict(cfg))
# load weights from the safetensors shards, then run the layers with mask=None
A complete harness (scripts/mlx_decide.py, scripts/bench.py) reproduces the
original's attention mode and letter readout end to end.