LiquidAI/d1-3B converted to ONNX for Transformers.js and the browser (WebGPU). d1 is a decision model on LFM2.5-VL-3B: give it a state (text and/or images) and typed questions (choice, noul yes/no, score), and it answers in one forward pass with zero generated tokens. The answer is a softmax over each option's token at the answer slot.
This is a straight conversion: the same weights in LiquidAI/LFM2.5-VL-3B-ONNX's graphs (same architecture), with one change: the decoder returns logits for the last position only, which is all d1 reads (and all generation needs), so a 300-token prompt doesn't materialise 300 × 128k logits.
Option probabilities vs the model repo's system_one (PyTorch, fp32), on 8 text decisions (choice, noul, score) and 3 image decisions:
Variant
Text max \
Δ\
Image max \
Δ\
Flipped answers
fp32
0.0000
0.0000
0
q8
0.018
0.002
0
q4
0.028
0.063
1 (a 0.48 vs 0.45 near-tie)
Transformers.js' own LFM2-VL image processor tiles slightly differently from the Python one (256 vs 234 image tokens on a 640×480 picture), which moves image answers by up to 0.04 at q8; same picks.
conversion/ has everything: build.py maps d1's safetensors onto the LFM2.5-VL-3B-ONNX graphs by name (transposing MatMul weights, the SigLIP2 position table to a 16×16 grid), computes the RoPE caches, slices the decoder to the last position and unties the LM head so it can be quantized; quantize.py, rechunk.py; and the parity scripts (reference.py, onnx_check.py, vision_*.py).
# custom terms: read the license before you download$ fw get onnx-community/d1-3B-ONNX
# manifest sha256 dcad425b8ef7… · 8.79 GB · 41 files$ fw verify ./d1-3B-ONNX onnx-community/d1-3B-ONNX
Terms that come with these files. LFM 1.0: commercial use only for organisations under US$10M annual revenue. Keep a copy of the license with the files.
Custom license (custom).Read the license text first. Open this panel to show the commands once you accept its terms.
fw.pyChecks the signature and every sha256, tries each source in order, resumes.