d1¶
| Checkpoints | Inputs |
|---|---|
| LiquidAI/d1-2B | text, images |
| LiquidAI/d1-3B | text, images |
d1 models are LiquidAI's decision models. d1-3B runs on LFM2-VL, whose layers are short convolutions and attention. Flide asks it with the release's own prompt: the state, then each question with its options and a reply line in one chat turn, read at the start of the reply. Each option scores the best of its token forms (yes, Yes and YES; a choice's code with and without a leading space; a score's digit), and the answer is the softmax over the options. Flide computes the state once and reads every question from it.
d1-2B runs on LFM3, whose layers are short convolutions, full attention and sliding-window attention. Its release packs up to 16 questions after the state in one sequence: in the full-attention layers the state sees every question and each question sees the state and itself, while the other layers read the sequence in order. Flide reads it the same way, every question at its last token, and adds what the release does: the reply opens with an empty thinking block, past 26 options a choice is coded AA, AB and so on, every score is divided by the checkpoint's calibrated temperature, and a score answers its median level. Its pictures go through its own LFM3-VL processor and head the state, as the release does.
Speed¶
d1-3B: on one H200, one request at a time, Flide answers 1.1 to 2.3 times faster than d1's own engine on transformers. Each workload is 32 requests, each run once on both sides before timing, and the table gives the median latency of a request.
| Workload | Flide | Release | Speedup |
|---|---|---|---|
| Decision Index | 8.7 ms | 14.4 ms | 1.7× |
| RACE | 6.0 ms | 13.6 ms | 2.3× |
| MultiRC | 30.4 ms | 42.1 ms | 1.4× |
| QuALITY long | 48.2 ms | 52.4 ms | 1.1× |
| GQA (images) | 21.2 ms | 32.0 ms | 1.5× |
d1-2B: Flide answers 1.1 to 1.7 times faster than d1's own engine compiled with its own compile(), on torch 2.14.1
and transformers 5.19.0, measured the same way.
| Workload | Flide | Release | Speedup |
|---|---|---|---|
| Decision Index | 5.0 ms | 8.2 ms | 1.6× |
| RACE | 3.6 ms | 6.1 ms | 1.7× |
| MultiRC | 26.0 ms | 33.4 ms | 1.3× |
| QuALITY long | 26.9 ms | 31.9 ms | 1.2× |
| GQA (images) | 18.7 ms | 20.1 ms | 1.1× |
Start a server¶
flide serve --model LiquidAI/d1-3B
flide serve --model LiquidAI/d1-2B
Send a request¶
curl http://localhost:8000/v1/systemone -H "Content-Type: application/json" -d '{
"state": "Order #1182 arrived with a cracked screen. The customer asks for a refund and attached two photos.",
"questions": {
"action": {"type": "choice", "instructions": "What should support do next?",
"criteria": {"refund": "refund the order", "replace": "send a replacement", "escalate": "ask a human"}},
"urgent": {"type": "noul", "instructions": "Does this need a reply within the hour?"}
}
}'
d1-3B reads images. They go in images, as data URLs or plain base64, as for the chat models.
IMG=$(base64 -w0 photo.jpg)
curl http://localhost:8000/v1/systemone -H "Content-Type: application/json" -d @- <<EOF
{
"state": "Order #1182 arrived with a cracked screen. The customer asks for a refund. A photo is attached.",
"images": ["data:image/jpeg;base64,$IMG"],
"questions": {
"cracked": {"type": "noul", "instructions": "Does the photo show a cracked screen?"},
"action": {"type": "choice", "instructions": "What should support do next?",
"criteria": {"refund": "refund the order", "replace": "send a replacement", "escalate": "ask a human"}}
}
}
EOF