> ## 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-3B

> 3B parameter multimodal decision model for text and images, built on LFM2.5-VL-3B

<a href="/lfm/models/decision-models" className="back-button">← Back to Decision Models</a>

d1-3B is a 3.1B parameter decision model built on [LFM2.5-VL-3B](/lfm/models/lfm25-vl-3b). It evaluates text, JSON, images, or a mix and returns calibrated Noul, Choice, and Score answers in one forward pass with zero output tokens.

<div style={{display: 'flex', gap: '0.5rem', margin: '0.5rem 0 1.5rem 0'}}>
  <a href="https://huggingface.co/LiquidAI/d1-3B" style={{padding: '0.35rem 0.7rem', borderRadius: '4px', fontSize: '0.85rem', fontWeight: 600, textDecoration: 'none', backgroundColor: '#fbbf24'}}><span style={{color: '#000'}}>HF</span></a>
  <a href="https://huggingface.co/LiquidAI/d1-3B-GGUF" style={{padding: '0.35rem 0.7rem', borderRadius: '4px', fontSize: '0.85rem', fontWeight: 600, textDecoration: 'none', backgroundColor: '#60a5fa'}}><span style={{color: '#000'}}>GGUF</span></a>
</div>

## Specifications

| Property | Value |
| - | - |
| Parameters | 3.12B |
| Context Length | 32K tokens |
| Architecture | LFM2.5-VL (Dense) — LFM2.5-2.6B backbone + SigLIP2 NaFlex 400M vision encoder |

<div className="use-cases">
  <CardGroup cols={3}>
    <Card title="Multimodal" icon="images">
      Text and images in the same state
    </Card>

    <Card title="Zero Output Tokens" icon="gauge-high">
      Answers read from the distribution, no generation
    </Card>

    <Card title="Fast" icon="bolt">
      Single forward pass, no autoregressive generation
    </Card>
  </CardGroup>
</div>

## Quick Start

<Tabs>
  <Tab title="Transformers">
    **Install:**

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

    **Text input:**

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

    model_id = "LiquidAI/d1-3B"
    model = AutoModel.from_pretrained(model_id, trust_remote_code=True, dtype="bfloat16", device_map="auto")

    state = "I was charged twice this month, please refund one of them."
    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"]},
    }
    output = model.system_one(state, questions)
    print(output)
    ```

    **Image input:**

    ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    import io
    import urllib.request

    from PIL import Image
    from transformers import AutoModel

    model_id = "LiquidAI/d1-3B"
    model = AutoModel.from_pretrained(model_id, trust_remote_code=True, dtype="bfloat16", device_map="auto")

    url = "http://images.cocodataset.org/val2017/000000039769.jpg"
    photo = Image.open(io.BytesIO(urllib.request.urlopen(url).read()))

    questions = {"cats": {"type": "choice", "instructions": "How many cats are there?",
                          "criteria": {"one": "One", "two": "Two", "more": "Three or more"}}}
    output = model.system_one(None, questions, images=[photo])
    print(output)
    ```
  </Tab>

  <Tab title="llama.cpp">
    **Start the server:**

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    llama-server -hf LiquidAI/d1-3B-GGUF:Q8_0
    ```

    **Text input:**

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl http://127.0.0.1:8080/v1/systemone -H "Content-Type: application/json" -d '{
      "state": "I was charged twice this month, please refund one of them.",
      "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"]}
      }
    }'
    ```

    **Image input:**

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl -sL -o cats.jpg http://images.cocodataset.org/val2017/000000039769.jpg

    curl http://127.0.0.1:8080/v1/systemone -H "Content-Type: application/json" -d @- <<JSON
    {
      "images": ["data:image/jpeg;base64,$(base64 < cats.jpg | tr -d '\n')"],
      "questions": {
        "cats": {"type": "choice", "instructions": "How many cats are there?",
                 "criteria": {"one": "One", "two": "Two", "more": "Three or more"}}
      }
    }
    JSON
    ```
  </Tab>
</Tabs>


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