d1-3B / README.md
Aurelien-Lac's picture
Card: point at LiquidAI/d1-3B, date the 0.2.1 claim
5d691c7 verified
|
Raw History Blame
10.2 kB
metadata
library_name: transformers
license: other
license_name: lfm1.0
license_link: LICENSE
language:
  - ar
  - zh
  - en
  - fr
  - de
  - hi
  - id
  - it
  - ja
  - ko
  - pl
  - pt
  - ru
  - es
  - th
  - vi
pipeline_tag: image-text-to-text
base_model: LiquidAI/LFM2.5-VL-3B
tags:
  - liquid
  - lfm2.5
  - edge
  - decision
  - classification
  - calibration
  - system-one
  - multimodal
Liquid AI
Try LFM • Docs • Discord

d1-3B

d1-3B is a 3B parameter decision model built on LFM2.5-VL-3B. You give it a state (text, JSON, images, or a mix) and a set of named questions. It returns calibrated, typed answers in one forward pass with zero output tokens: every answer is read directly from the model's distribution over the options, with no generation and no parsing.

  • Best decision model under 10B on the Decision Index 0.2.1 (leaderboard of 2026-09-28): 47.12, ahead of every 4B and 9B model and level with Decider 35B-A3B (47.11).
  • Multimodal: images and text in the same state. It scores 73.7 on 11 public image benchmarks (LFM2.5-VL-3B: 73.9).
  • Fast: 8 ms a decision on an NVIDIA RTX 4090, 9 ms on an AMD MI325X, 30 ms on an Apple M5 Pro.

Decision Index against model size

💻 Demos: Try d1-3B in a Hugging Face space without any setup: TODO: add demo

🗒️ Model Details

Model Parameters Description
LFM2.5-VL-3B 3.1B General-purpose vision-language model (base)
d1-3B 3.1B Post-trained for single-pass, calibrated decisions

d1-3B is a multimodal decision model with the following features:

  • Total parameters: 3.12B
  • LM backbone: LFM2.5-2.6B, 30 layers (22 double-gated short convolution blocks + 8 GQA)
  • Vision encoder: SigLIP2 NaFlex shape-optimized 400M
  • Context length: 32,768 tokens
  • Vocabulary size: 128,000
  • Output: no generated tokens. Each answer is a probability distribution over the question's options.

We recommend d1-3B wherever a pipeline needs a yes/no, a pick from named options, or a rating: routing and triage, moderation, intent and topic classification, extraction checks, reranking, LLM-as-a-judge scoring, agent guardrails, and visual inspection. It is not a chat model and does not write text.

🏃 How to use

Install the dependencies (requires transformers>=5.14):

pip install "transformers>=5.14" torch torchvision pillow

The model ships its own code, so load it with trust_remote_code=True:

import io
import urllib.request

import torch
from PIL import Image
from transformers import AutoModel

device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
model = AutoModel.from_pretrained("LiquidAI/d1-3B", trust_remote_code=True,
                                  dtype=torch.float32 if device == "cpu" else torch.bfloat16).to(device)

# Several named questions over one text 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"]},
}
print(model.system_one("I was charged twice this month, please refund one of them.", questions))

# An image as the whole state
url = "http://images.cocodataset.org/val2017/000000039769.jpg"  # two cats on a sofa
photo = Image.open(io.BytesIO(urllib.request.urlopen(url).read()))
print(model.system_one(None, {"cats": {"type": "choice", "instructions": "How many cats are there?",
                                       "criteria": {"one": "One", "two": "Two", "more": "Three or more"}}},
                       images=[photo]))

# Many requests, packed together with no padding
tickets = ["Where is my parcel? It was due Monday.", "The app crashes when I open settings."]
print(model.system_one_batch([(t, {"team": questions["team"]}) for t in tickets]))
call
system_one(state, questions, images=None) Named questions over one state, in one pass. The state and its images are read once for all questions.
system_one_batch([(state, questions[, images]), ...]) Many requests, packed with no padding.

A state is a string, any JSON value, or None when the images are the whole state.

Questions and answers

Questions follow the Decision Index schema: type, instructions, and criteria.

type criteria answer fields
noul: yes or no optional: {"true": "...", "false": "..."} to define each side noul: P(yes)
choice: one of named options {name: description} choice, confidence, probabilities
score: 2 to 10 ordered levels a list of level descriptions, lowest first score (the expected level), confidence, probabilities, legend

Each call returns {"answers": {name: answer}, "usage": {"input_tokens": n, "output_tokens": 0}}.

⚡ Speed

Warm calls in bf16, median of 20 runs:

one question 3 questions, one pass 3.4k-token state 384 px image 64 states, packed
NVIDIA RTX 4090 8.0 ms 21 ms 102 ms 17 ms 475 / s
AMD MI325X 9.2 ms 14 ms 44 ms 18 ms 1,106 / s
Apple M5 Pro (mps) 30 ms 41 ms 0.64 s 62 ms 78 / s

On NVIDIA GPUs, model.compile(mode="reduce-overhead") runs single questions as CUDA graphs. The RTX 4090 row uses it; without it a single question takes 16 ms. The first call with a new shape pays for kernel selection or compilation, so warm up the shapes you serve.

📊 Performance

All results are on public benchmarks.

Decision Index 0.2.1

The Decision Index casts 38 public benchmarks as 120,226 typed decisions, scored as chance-corrected skill. We scored d1-3B with the official scorer; it is not a leaderboard submission. All other rows come from the public leaderboard (snapshot 2026-09-28). Sizes are served parameters.

Model Size Decision Index Knowledge Language Retrieval Tools Arts
Winnow-12B 12B 50.02 33.8 56.0 54.0 71.0 30.0
d1-3B 3B 47.12 27.8 53.5 52.2 66.7 34.6
Decider 35B-A3B 36B 47.11 31.8 55.5 54.7 56.5 32.6
JPT-9B 9.7B 46.89 31.7 56.7 44.6 67.0 28.6
Decision 1.0 Lux 9.7B 43.49 30.9 48.0 50.0 57.2 26.4
JPT-4B 4.7B 43.04 28.7 52.5 45.0 57.2 25.8
Jet v6.2 4.7B 42.60 28.7 43.9 48.2 62.9 27.0
Decider 4B 4.7B 40.70 25.7 46.0 44.7 58.6 25.0
Winnow-E4B 8.0B 39.89 22.3 45.1 43.8 62.5 22.8
Decider 2B 2.3B 28.97 14.9 32.6 37.3 42.4 14.6

Benchmarks as decisions

Evaluation splits are cast as typed decisions, with the same rows for every model. These scores follow the decision protocol, not each benchmark's own.

Benchmark d1-3B Decider 4B Decider 2B
SQuAD 2.0 83.3 76.0 67.7
Civil Comments 93.3 92.8 93.6
MASSIVE intent 86.9 88.3 81.1
HelpSteer2 38.0 42.0 32.0
PubMedQA 68.3 63.3 65.7
BoolQ 86.3 89.0 87.3
XNLI 85.6 88.6 85.0
PAWS-X 76.4 69.8 59.5
Mean 77.3 76.2 71.5

d1-3B also scores 69.5 on DecisionBench (eng v1, all 23,900 rows) and 68.8 on Fast Decisions (dev split).

Vision

Eleven public image benchmarks, read as decisions over each benchmark's options (at most 1,000 rows each), compared with the base model:

Benchmark d1-3B LFM2.5-VL-3B
AI2D 80.1 80.9
BLINK 58.2 58.7
CV-Bench 82.7 87.6
HallusionBench 63.8 65.0
MMBench 84.3 84.3
MME 81.7 82.4
MMStar 59.4 61.2
MMVP 76.3 73.7
POPE 88.5 90.1
VisualWebBench 71.6 78.3
VL-RewardBench 63.6 50.9
Mean 73.7 73.9
ImajevBench (dev and calibration, 253 rows) 66.8 66.8

With the images removed, the same questions score 45.1, so the answers come from the images.

⚠️ Limitations

  • Knowledge-heavy questions: larger models stay ahead on hard knowledge (for example MMLU-Pro and GPQA).
  • Thresholds: calibrate any threshold on data from your own deployment before gating on it.
  • No text output: d1-3B answers questions over fixed options. Use LFM2.5-VL-3B for open-ended generation.

📬 Contact

Citation

@article{liquidai2025lfm2,
  title   = {LFM2 Technical Report},
  author  = {Liquid AI},
  journal = {arXiv preprint arXiv:2511.23404},
  year    = {2025}
}