---
title: "D1 2B — Decision (1.7B) | Xybrid"
description: "Run D1 2B on-device with Xybrid. Liquid d1-2B - decision model: typed choice, yes/no and score answers with probabilities over text or JSON, no generated text (16 languages) Available for iOS, Android, macOS, and more."
url: "https://www.xybrid.ai/models/d1-2b"
---

# D1 2B

Decision · Liquid AI

Liquid d1-2B - decision model: typed choice, yes/no and score answers with probabilities over text or JSON, no generated text (16 languages)

Model ID: `d1-2b`

## Make it part of your app.

One model. Your language.

### Rust (main.rs)

```rust
use xybrid::{decode_decision_request, ModelLoader};
use xybrid::ir::Envelope;

// Decision models need the llama.cpp backend: features = ["llm-llamacpp"]
let model = ModelLoader::from_registry("d1-2b").load()?;

// Ask typed questions about a state: a choice, a yes/no or a score
let request = decode_decision_request(r#"{
  "state": "I was charged twice this month, please refund one of them.",
  "questions": {
    "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}
  }
}"#)?;
let result = model.run(&Envelope::decision_request(request), None)?;

// One answer per question, in order, with its probabilities; no text is generated
let decisions = result.decisions().ok_or("expected decisions")?;
println!("{} answers", decisions.answers().len());
```

### Flutter (main.dart)

```dart
import 'package:xybrid_flutter/xybrid_flutter.dart';

await Xybrid.init();

// Load the decision model
final model = await Xybrid.model('d1-2b').load();

// Ask typed questions about a state: a choice, a yes/no or a score
const request = '''{
  "state": "I was charged twice this month, please refund one of them.",
  "questions": {
    "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}
  }
}''';
final result = await model.run(XybridEnvelope.decisionRequestJson(request));

// One answer per question, in order, with its probabilities; no text is generated
final answers = result.decisions?.answers;
```

### Kotlin (Main.kt)

```kotlin
Xybrid.init(context)

// Load the decision model
val model = Xybrid.model("d1-2b").load()

// Ask typed questions about a state: a choice, a yes/no or a score
val request = """{
  "state": "I was charged twice this month, please refund one of them.",
  "questions": {
    "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}
  }
}"""
val result = model.run(Envelope.decisionRequestJson(request))

// One answer per question, in order, with its probabilities; no text is generated
val answers = result.decisions?.answers
```

### Swift (main.swift)

```swift
import Xybrid

Xybrid.initialize()

// Load the decision model
let model = try await Xybrid.model("d1-2b").load()

// Ask typed questions about a state: a choice, a yes/no or a score
let request = #"""
{
  "state": "I was charged twice this month, please refund one of them.",
  "questions": {
    "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}
  }
}
"""#
let result = try model.run(envelope: Envelope.decisionRequestJson(request))

// One answer per question, in order, with its probabilities; no text is generated
let answers = result.decisions?.answers
```

### Unity (Example.cs)

```csharp
using Xybrid;

XybridClient.Initialize();

// Load the decision model
using var model = XybridClient.LoadModel("d1-2b");

// Ask typed questions about a state: a choice, a yes/no or a score
var request = @"{
  ""state"": ""I was charged twice this month, please refund one of them."",
  ""questions"": {
    ""refund"": {""type"": ""noul"", ""instructions"": ""Is the customer asking for a refund?""}
  }
}";
using var envelope = Envelope.DecisionRequestJson(request);
using var result = model.Run(envelope);

// One answer per question, in order, with its probabilities; no text is generated
var answers = result.Decisions?.Answers;
```

### CLI (terminal)

```bash
# Ask typed questions about a state: a choice, a yes/no or a score
cat > request.json <<'JSON'
{
  "state": "I was charged twice this month, please refund one of them.",
  "questions": {
    "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}
  }
}
JSON
xybrid run --model d1-2b --decision-request request.json
```

[Quickstart](https://docs.xybrid.dev/en/docs/quickstart)

## Available variants

| Variant | Format | Quantization | Size |
| --- | --- | --- | --- |
| [android](https://huggingface.co/LiquidAI/d1-2B-GGUF) (default) | GGUF | q4_k_m | 1.0 GB |
| [darwin](https://huggingface.co/LiquidAI/d1-2B-GGUF) | GGUF | q4_k_m | 1.0 GB |
| [linux](https://huggingface.co/LiquidAI/d1-2B-GGUF) | GGUF | q4_k_m | 1.0 GB |
| [windows](https://huggingface.co/LiquidAI/d1-2B-GGUF) | GGUF | q4_k_m | 1.0 GB |

## The essentials

- Task: Decision
- Lab: Liquid AI
- Parameters: 1.7B
- Format: GGUF
- Quantization: `q4_k_m`
- Model file size: 1.0 GB
- Default variant: `android`

[View on Hugging Face](https://huggingface.co/LiquidAI/d1-2B-GGUF)

Ready to build? [Read the documentation](https://docs.xybrid.dev)
