How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf LiquidAI/d1-2B-GGUF:
# Run inference directly in the terminal:
llama cli -hf LiquidAI/d1-2B-GGUF:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf LiquidAI/d1-2B-GGUF:
# Run inference directly in the terminal:
llama cli -hf LiquidAI/d1-2B-GGUF:
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf LiquidAI/d1-2B-GGUF:
# Run inference directly in the terminal:
./llama-cli -hf LiquidAI/d1-2B-GGUF:
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf LiquidAI/d1-2B-GGUF:
# Run inference directly in the terminal:
./build/bin/llama-cli -hf LiquidAI/d1-2B-GGUF:
Use Docker
docker model run hf.co/LiquidAI/d1-2B-GGUF:
Quick Links

d1-2B-GGUF

GGUF version of d1-2B for local inference on CPUs and GPUs.

d1-2B is a decision model for text, pictures, and video, built on LFM3-VL-2B. It returns calibrated answers in one forward pass, without generating tokens.

Find architecture and usage details in the original model card.

Use with llama.cpp


Supported in llama.cpp b11960 (v0.8.0) and newer.

llama.cpp answers noul, choice and score questions over a state (text or JSON), pictures or a video. Video input needs ffmpeg in PATH. Multiple choice ("multiple": true), extraction, estimates and boxes are not supported yet.

llama-server -hf LiquidAI/d1-2B-GGUF:Q8_0 -b 8192 -ub 8192

A question is read in one batch, so -b and -ub must hold its state and media. A picture takes at most half of -ub: 8192 keeps the full budget of 4096 tokens per picture, smaller values lower it.

Then send questions to the /v1/systemone endpoint.

Text

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 + Text

curl -sL -o cats.jpg http://images.cocodataset.org/val2017/000000039769.jpg  # two cats on a sofa

curl http://127.0.0.1:8080/v1/systemone -H "Content-Type: application/json" -d @- <<JSON
{
  "state": "Photo attached to a pet-sitting request.",
  "images": ["data:image/jpeg;base64,$(base64 < cats.jpg | tr -d '\n')"],
  "questions": {
    "pet":  {"type": "choice", "instructions": "Which animals are in the photo?",
             "criteria": {"cats": "Cats", "dogs": "Dogs", "birds": "Birds"}},
    "sofa": {"type": "noul", "instructions": "Are the animals on a sofa?"}
  }
}
JSON

Video + Text

curl -sL -o reading.mp4 https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/4cba700bd771f44d72b549253da025c32e944d42/sample_demo_1.mp4  # a child reading a book

curl http://127.0.0.1:8080/v1/systemone -H "Content-Type: application/json" -d @- <<JSON
{
  "state": null,
  "files": ["data:video/mp4;base64,$(base64 < reading.mp4 | tr -d '\n')"],
  "questions": {
    "activity": {"type": "choice", "instructions": "What is the child doing?",
                 "criteria": {"reading": "Reading a book", "eating": "Eating", "sleeping": "Sleeping"}},
    "glasses":  {"type": "noul", "instructions": "Is the child wearing glasses?"}
  }
}
JSON

The state can be null when the pictures or the video are the whole state.

Downloads last month
1,101
GGUF
Model size
2B params
Architecture
lfm3
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for LiquidAI/d1-2B-GGUF

Finetuned
LiquidAI/d1-2B
Quantized
(6)
this model