Update weights and benchmark numbers

#4
README.md CHANGED
@@ -31,7 +31,6 @@ tags:
31
  - calibration
32
  - system-one
33
  - multimodal
34
- - decision-model
35
  ---
36
 
37
  <div align="center">
@@ -50,18 +49,19 @@ tags:
50
  # d1-3B
51
 
52
  d1-3B is a 3B parameter **decision model** built on [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B).
53
- You give it a state (text, JSON, images, or a mix) and a set of questions. It returns calibrated,
54
- typed answers in **one forward pass with zero output tokens**.
 
55
 
56
- - **Best decision model under 10B on the Decision Index 0.2.1**: 48.57, ahead of every 4B and 9B model
57
- and of Decider 35B-A3B (47.11).
58
  - **Multimodal**: images and text in the same state. It scores 74.1 on 11 public image benchmarks
59
  (LFM2.5-VL-3B: 73.9).
60
  - **Fast**: 8 ms a decision on an NVIDIA RTX 4090, 9 ms on an AMD MI325X, 30 ms on an Apple M5 Pro.
61
 
62
- Find more information about open d1 in our [blog post](https://www.liquid.ai/blog/open-d1).
63
 
64
- ![image](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/r2H7UlZ_m48SYAhZWIHiu.png)
65
 
66
  > [!NOTE]
67
  > 💻 **Demos**: Try d1-3B in a Hugging Face space without any setup:
@@ -78,9 +78,11 @@ Find more information about open d1 in our [blog post](https://www.liquid.ai/blo
78
  d1-3B is a multimodal decision model with the following features:
79
 
80
  - **Total parameters**: 3.12B
 
81
  - **Vision encoder**: SigLIP2 NaFlex shape-optimized 400M
82
  - **Context length**: 32,768 tokens
83
  - **Vocabulary size**: 128,000
 
84
 
85
  We recommend d1-3B wherever a pipeline needs a yes/no, a pick from named options, or a rating:
86
  routing and triage, moderation, intent and topic classification, extraction checks, reranking, LLM-as-a-judge
@@ -97,47 +99,36 @@ pip install "transformers>=5.14" torch torchvision pillow
97
  The model ships its own code, so load it with `trust_remote_code=True`:
98
 
99
  ```python
 
 
 
100
  import torch
 
101
  from transformers import AutoModel
102
- from transformers.image_utils import load_image
103
 
104
  device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
105
- dtype = torch.float32 if device == "cpu" else torch.bfloat16
106
- model = AutoModel.from_pretrained("LiquidAI/d1-3B", trust_remote_code=True, dtype=dtype).to(device)
107
 
108
- # Text: several named questions over one state, answered in one pass
109
  questions = {
110
- "refund": {
111
- "type": "noul",
112
- "instructions": "Is the customer asking for a refund?",
113
- },
114
- "team": {
115
- "type": "choice",
116
- "instructions": "Which team should handle this?",
117
- "criteria": {
118
- "billing": "Charges, refunds, invoices",
119
- "technical": "App or site faults",
120
- "fraud": "Suspected unauthorised use",
121
- },
122
- },
123
- "urgency": {
124
- "type": "score",
125
- "instructions": "How urgent is this?",
126
- "criteria": ["Can wait", "Today", "Blocking the customer now"],
127
- },
128
  }
129
  print(model.system_one("I was charged twice this month, please refund one of them.", questions))
130
 
131
- # Image: the photo is the whole state
132
- image = load_image("http://images.cocodataset.org/val2017/000000039769.jpg") # two cats on a sofa
133
- cats = {
134
- "type": "choice",
135
- "instructions": "How many cats are there?",
136
- "criteria": {"one": "One", "two": "Two", "more": "Three or more"},
137
- }
138
- print(model.system_one(None, {"cats": cats}, images=[image]))
139
 
140
- # Batch: many requests, packed together with no padding
141
  tickets = ["Where is my parcel? It was due Monday.", "The app crashes when I open settings."]
142
  print(model.system_one_batch([(t, {"team": questions["team"]}) for t in tickets]))
143
  ```
@@ -163,32 +154,16 @@ Each call returns `{"answers": {name: answer}, "usage": {"input_tokens": n, "out
163
 
164
  ## ⚡ Speed
165
 
166
- Warm calls, one request at a time: a single question, three questions over one state, a 3.4k-token
167
- state and a 384 px image. The last column is throughput with 64 states packed into one pass.
168
-
169
- ### Edge Inference
170
-
171
- We measure latency on an Apple M5 Pro and, in collaboration with NVIDIA, on an NVIDIA Jetson AGX Thor,
172
- a Jetson AGX Orin 64 GB and a Jetson Orin Nano.
173
-
174
- | | one question | 3 questions, one pass | 3.4k-token state | 384 px image | 64 states, packed |
175
- |---|---:|---:|---:|---:|---:|
176
- | Apple M5 Pro (`mps`) | 30 ms | 41 ms | 640 ms | 62 ms | 78 / s |
177
- | NVIDIA Jetson AGX Thor | 16 ms | 20 ms | 220 ms | 35 ms | 262 / s |
178
- | NVIDIA Jetson AGX Orin 64 GB | 26 ms | 35 ms | 560 ms | 83 ms | 110 / s |
179
- | NVIDIA Jetson Orin Nano | 50 ms | 73 ms | 1640 ms | 202 ms | 38 / s |
180
-
181
- ### GPU Inference
182
-
183
- We measure latency on an NVIDIA RTX 4090 and an AMD MI325X, in bf16, median of 20 runs.
184
 
185
  | | one question | 3 questions, one pass | 3.4k-token state | 384 px image | 64 states, packed |
186
  |---|---:|---:|---:|---:|---:|
187
- | NVIDIA RTX 4090 | 8 ms | 21 ms | 102 ms | 17 ms | 475 / s |
188
- | AMD MI325X | 9 ms | 14 ms | 44 ms | 18 ms | 1,106 / s |
 
189
 
190
- On NVIDIA GPUs, `model.compile(mode="reduce-overhead")` runs single questions as CUDA graphs (the RTX 4090
191
- row uses it). Without it, a single question takes 16 ms. The first call with a new shape pays for kernel
192
  selection or compilation, so warm up the shapes you serve.
193
 
194
  ## 📊 Performance
@@ -197,7 +172,10 @@ All results are on public benchmarks.
197
 
198
  ### Decision Index 0.2.1
199
 
200
- We scored d1-3B with the official scorer (not a leaderboard submission). All other rows come from the public leaderboard v0.2.1.
 
 
 
201
 
202
  | Model | Size | Decision Index | Knowledge | Language | Retrieval | Tools | Arts |
203
  |---|---:|---:|---:|---:|---:|---:|---:|
@@ -214,7 +192,8 @@ We scored d1-3B with the official scorer (not a leaderboard submission). All oth
214
 
215
  ### Benchmarks as decisions
216
 
217
- Besides the Decision Index, we added a few other internal evaluations based on public benchmarks.
 
218
 
219
  | Benchmark | d1-3B | Decider 4B | Decider 2B |
220
  |---|---:|---:|---:|
@@ -255,6 +234,13 @@ compared with the base model:
255
 
256
  With the images removed, the same questions score 45.1, so the answers come from the images.
257
 
 
 
 
 
 
 
 
258
  ## 📬 Contact
259
 
260
  - Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai)
@@ -268,7 +254,7 @@ With the images removed, the same questions score 45.1, so the answers come from
268
  title = {Open d1: Edge decision models for text, vision, and audio},
269
  journal = {Liquid AI Blog},
270
  year = {2026},
271
- note = {https://www.liquid.ai/blog/d1-open},
272
  }
273
  ```
274
 
@@ -279,4 +265,4 @@ With the images removed, the same questions score 45.1, so the answers come from
279
  journal = {arXiv preprint arXiv:2511.23404},
280
  year = {2025}
281
  }
282
- ```
 
31
  - calibration
32
  - system-one
33
  - multimodal
 
34
  ---
35
 
36
  <div align="center">
 
49
  # d1-3B
50
 
51
  d1-3B is a 3B parameter **decision model** built on [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B).
52
+ You give it a state (text, JSON, images, or a mix) and a set of named questions. It returns calibrated,
53
+ typed answers in **one forward pass with zero output tokens**: every answer is read directly from the
54
+ model's distribution over the options, with no generation and no parsing.
55
 
56
+ - **Best decision model under 10B on the Decision Index 0.2.1** (leaderboard of 2026-09-28): 48.57, ahead
57
+ of every 4B and 9B model and of Decider 35B-A3B (47.11).
58
  - **Multimodal**: images and text in the same state. It scores 74.1 on 11 public image benchmarks
59
  (LFM2.5-VL-3B: 73.9).
60
  - **Fast**: 8 ms a decision on an NVIDIA RTX 4090, 9 ms on an AMD MI325X, 30 ms on an Apple M5 Pro.
61
 
62
+ Find more information about open d1 in our [blog post](www.liquid.ai/blog/open-d1).
63
 
64
+ ![image](https://cdn-uploads.huggingface.co/production/uploads/644249b08443bce4c9890a0f/ZNvmQHJ0IRhO9Gvg52jPr.png)
65
 
66
  > [!NOTE]
67
  > 💻 **Demos**: Try d1-3B in a Hugging Face space without any setup:
 
78
  d1-3B is a multimodal decision model with the following features:
79
 
80
  - **Total parameters**: 3.12B
81
+ - **LM backbone**: LFM2.5-2.6B, 30 layers (22 double-gated short convolution blocks + 8 GQA)
82
  - **Vision encoder**: SigLIP2 NaFlex shape-optimized 400M
83
  - **Context length**: 32,768 tokens
84
  - **Vocabulary size**: 128,000
85
+ - **Output**: no generated tokens. Each answer is a probability distribution over the question's options.
86
 
87
  We recommend d1-3B wherever a pipeline needs a yes/no, a pick from named options, or a rating:
88
  routing and triage, moderation, intent and topic classification, extraction checks, reranking, LLM-as-a-judge
 
99
  The model ships its own code, so load it with `trust_remote_code=True`:
100
 
101
  ```python
102
+ import io
103
+ import urllib.request
104
+
105
  import torch
106
+ from PIL import Image
107
  from transformers import AutoModel
 
108
 
109
  device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
110
+ model = AutoModel.from_pretrained("LiquidAI/d1-3B", trust_remote_code=True,
111
+ dtype=torch.float32 if device == "cpu" else torch.bfloat16).to(device)
112
 
113
+ # Several named questions over one text state, answered in one pass
114
  questions = {
115
+ "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"},
116
+ "team": {"type": "choice", "instructions": "Which team should handle this?",
117
+ "criteria": {"billing": "Charges, refunds, invoices", "technical": "App or site faults",
118
+ "fraud": "Suspected unauthorised use"}},
119
+ "urgency": {"type": "score", "instructions": "How urgent is this?",
120
+ "criteria": ["Can wait", "Today", "Blocking the customer now"]},
 
 
 
 
 
 
 
 
 
 
 
 
121
  }
122
  print(model.system_one("I was charged twice this month, please refund one of them.", questions))
123
 
124
+ # An image as the whole state
125
+ url = "http://images.cocodataset.org/val2017/000000039769.jpg" # two cats on a sofa
126
+ photo = Image.open(io.BytesIO(urllib.request.urlopen(url).read()))
127
+ print(model.system_one(None, {"cats": {"type": "choice", "instructions": "How many cats are there?",
128
+ "criteria": {"one": "One", "two": "Two", "more": "Three or more"}}},
129
+ images=[photo]))
 
 
130
 
131
+ # Many requests, packed together with no padding
132
  tickets = ["Where is my parcel? It was due Monday.", "The app crashes when I open settings."]
133
  print(model.system_one_batch([(t, {"team": questions["team"]}) for t in tickets]))
134
  ```
 
154
 
155
  ## ⚡ Speed
156
 
157
+ Warm calls in bf16, median of 20 runs:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  | | one question | 3 questions, one pass | 3.4k-token state | 384 px image | 64 states, packed |
160
  |---|---:|---:|---:|---:|---:|
161
+ | NVIDIA RTX 4090 | **8.0 ms** | 21 ms | 102 ms | 17 ms | 475 / s |
162
+ | AMD MI325X | 9.2 ms | 14 ms | 44 ms | 18 ms | 1,106 / s |
163
+ | Apple M5 Pro (`mps`) | 30 ms | 41 ms | 0.64 s | 62 ms | 78 / s |
164
 
165
+ On NVIDIA GPUs, `model.compile(mode="reduce-overhead")` runs single questions as CUDA graphs. The RTX 4090
166
+ row uses it; without it a single question takes 16 ms. The first call with a new shape pays for kernel
167
  selection or compilation, so warm up the shapes you serve.
168
 
169
  ## 📊 Performance
 
172
 
173
  ### Decision Index 0.2.1
174
 
175
+ The [Decision Index](https://huggingface.co/spaces/multimodalart/jev-decision-index) casts 38 public
176
+ benchmarks as 120,226 typed decisions, scored as chance-corrected skill. We scored d1-3B with the official
177
+ scorer; it is not a leaderboard submission. All other rows come from the public leaderboard
178
+ (snapshot 2026-09-28). Sizes are served parameters.
179
 
180
  | Model | Size | Decision Index | Knowledge | Language | Retrieval | Tools | Arts |
181
  |---|---:|---:|---:|---:|---:|---:|---:|
 
192
 
193
  ### Benchmarks as decisions
194
 
195
+ Evaluation splits are cast as typed decisions, with the same rows for every model. These scores follow the
196
+ decision protocol, not each benchmark's own.
197
 
198
  | Benchmark | d1-3B | Decider 4B | Decider 2B |
199
  |---|---:|---:|---:|
 
234
 
235
  With the images removed, the same questions score 45.1, so the answers come from the images.
236
 
237
+ ## ⚠️ Limitations
238
+
239
+ - **Knowledge-heavy questions**: larger models stay ahead on hard knowledge (for example MMLU-Pro and GPQA).
240
+ - **Thresholds**: calibrate any threshold on data from your own deployment before gating on it.
241
+ - **No text output**: d1-3B answers questions over fixed options. Use [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B)
242
+ for open-ended generation.
243
+
244
  ## 📬 Contact
245
 
246
  - Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai)
 
254
  title = {Open d1: Edge decision models for text, vision, and audio},
255
  journal = {Liquid AI Blog},
256
  year = {2026},
257
+ note = {www.liquid.ai/blog/open-d1},
258
  }
259
  ```
260
 
 
265
  journal = {arXiv preprint arXiv:2511.23404},
266
  year = {2025}
267
  }
268
+ ```
assets/d1-3b-smash.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08f69b1a67bf32cd18fad32b5872519b580be9e94bafbe26a13d5cf0aaa49c1f
3
+ size 53062187
assets/di_pareto.png ADDED

Git LFS Details

  • SHA256: 62e7f5907b765063a710291d273f33d622d9bcff3efc74f3343d4dbdb469d73f
  • Pointer size: 131 Bytes
  • Size of remote file: 146 kB
assets/ood_tasks.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b491dfa851157e12ba2bee33a394c9565408247cf0004e493730622c62878e42
3
+ size 8931625