> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liquid.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# d1-omni-2B

> 2.17B parameter decision model for text, pictures, and audio, built on LFM3-Omni-2B

[← Back to Decision Models](https://docs.liquid.ai/lfm/models/decision-models.md)

d1-omni-2B is a 2.17B parameter decision model for text, pictures, and audio, built on [LFM3-Omni-2B](https://docs.liquid.ai/lfm/models/lfm3-omni-2b). It returns calibrated answers in one forward pass, without generating tokens. Clips and spoken questions go through the same pass as text and pictures, so a voice request can be routed, checked, or answered just like a typed one.

[HF](https://huggingface.co/LiquidAI/d1-omni-2B)
GGUF · coming soon

## Specifications

| Property | Value |
| - | - |
| Parameters | 2.17B |
| Context Length | 128K tokens |
| Architecture | LFM3-Omni — LFM3 backbone, 24 layers (13 gated short convolution + 5 sliding-window attention + 6 global attention) |
| Languages | English, Arabic, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish, Vietnamese, Thai, Indonesian, Hindi, Russian, Polish. Speech covers the same languages except Hindi, Thai, Vietnamese, and Indonesian. |
| License | [LFM Open License v1.0](https://docs.liquid.ai/lfm/help/model-license.md) |

> **Native Audio**
>
> Audio clips and spoken questions in the same pass

> **Typed Answers**
>
> Values with their span, boxes, and estimates with an interval

> **Zero Output Tokens**
>
> No generated tokens, transcript, or speech

d1-omni-2B is designed for decisions that depend on what is heard, such as call and voice-message routing and sound events, and it handles the same text and picture decisions as [d1-2B](https://docs.liquid.ai/lfm/models/d1-2b). It is not a chat model and writes no transcript or speech. Without audio, use d1-2B: it is stronger on text and single boxes, reports missing values more often, and is better calibrated.

## Quick Start

**Transformers**

**Install:**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
pip install "transformers>=5.19" torch torchvision pillow
```

**Text input:**

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import torch
from transformers import AutoModel

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

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", "shipping": "Delivery and parcels",
                          "technical": "App or site faults"}},
    "topics": {"type": "choice", "multiple": True, "instructions": "Which topics does the message raise?",
               "criteria": {"billing": "Payments and charges", "delivery": "Shipping and parcels",
                            "login": "Signing in to the account"}},
}
output = model.system_one("I was charged twice and my parcel never arrived. Please refund one charge.", questions)
a = output["answers"]
print(round(a["refund"]["noul"], 2), a["team"]["choice"], a["topics"]["choices"])
# 0.94 billing ['billing', 'delivery']
```

**Audio input:**

A clip from a file is `{"type": "audio", "path": "call.wav"}` (16-bit PCM WAV, resampled to 16 kHz), or a waveform under `"audio"` with its `"sampling_rate"`:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import numpy as np

# A recording: three short beeps over quiet noise, 16 kHz mono
rate = 16000
clip = np.random.default_rng(0).normal(0, 0.003, 4 * rate).astype(np.float32)
for start in (0.5, 1.5, 2.5):
    clip[int(start * rate):int(start * rate) + 3200] += 0.3 * np.sin(2 * np.pi * 880 * np.arange(3200) / rate)

output = model.system_one(None, {
    "beeps": {"type": "number", "instructions": "How many beeps are there?", "range": [0, 10], "step": 1},
    "speech": {"type": "noul", "instructions": "Does someone speak in the recording?"},
}, media=[{"type": "audio", "audio": clip, "sampling_rate": rate}])
a = output["answers"]
print(a["beeps"]["number"], a["speech"]["noul"] > 0.5)
# 3.0 False
```

A spoken question takes a clip as its instructions: `{"type": "noul", "instructions": {"type": "audio", "path": "question.wav"}}`.

**Image input:**

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from transformers.image_utils import load_image

image = load_image("http://images.cocodataset.org/val2017/000000039769.jpg")
output = model.system_one(None, {
    "cats": {"type": "number", "instructions": "How many cats are there?", "range": [0, 10], "step": 1},
    "remote": {"type": "box", "instructions": "Where is the remote control on the left?"},
    "every_cat": {"type": "boxes", "instructions": "Every cat.", "max": 4},
}, media=[image])
a = output["answers"]
print(a["cats"]["number"], a["every_cat"]["count"], {k: round(v, 2) for k, v in a["remote"]["box"].items()})
# 2.0 2 {'top': 0.15, 'bottom': 0.24, 'left': 0.06, 'right': 0.27}
```

**llama.cpp**

GGUF checkpoints for llama.cpp are coming soon. llama.cpp supports Noul, Choice, and Score questions; for typed answers, use Transformers.

## Typed Answers

Besides Noul, Choice, and Score, d1-omni-2B answers typed questions. Each question in `questions` has a `type` and `instructions`:

| Type | Question | Answer |
| - | - | - |
| `choice` with `multiple: True` | Any of the options `criteria` names | `choices`, `probabilities` (each option's own P(yes)) |
| `text`, `number`, `date` | A value to read from the state | The field of its type (a number with its unit, a date in ISO 8601), `span`, `found` |
| `number` with `range` | An estimate, `step` apart | `number` (the median), `interval` (p10, p90) |
| `box`, `boxes` | One object, or every instance (16 at most, or `max`), in the one picture | `box` (top, bottom, left, right as fractions of the picture), `found`, `confidence`, or `boxes` and `count` |

A value or a box is missing when `found` is under 0.5, and it is then `None`. Calibrate any decision threshold on data from your own use. See [Typed Answers](https://docs.liquid.ai/lfm/models/decision-models.md#typed-answers) for every question and answer field.

Typed answers run in Transformers. llama.cpp supports Noul, Choice, and Score questions only.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.