Skip to content

Quick start

Flide serves decision models. A request holds a state, such as an agent's trajectory or a document, and typed questions about it. Flide forks the state into all of its questions inside one forward pass, so the state is read once and every question gets the answer it would get if it were asked alone. Answers come back as probabilities through the /v1/systemone API.

1. Install

uv venv -p 3.12 && source .venv/bin/activate
uv pip install flide torchvision

2. Start a server

Any chat model on Qwen3.5 or Gemma 4 serves as it is and answers through its next token.

flide serve --model Qwen/Qwen3.5-4B

OneJev models read their answers their own way, and Flide serves them as they are too.

flide serve --model OmniJev/OneJev1.6-0.8B

An Open-Jev release is an adapter on a Qwen3.5 base. Merge it into a checkpoint once, then serve that.

python -m flide_open_jev.prepare ZefanCai/Open-Jev-2B open-jev-2b
flide serve --model open-jev-2b

flide serve listens on all interfaces at port 8000; pass --host 127.0.0.1 to keep it local.

3. 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?"}
  }
}'

Every answer carries the probability of each option, ready for a threshold.

OneJev models also read images. Put <image:1> where the photo belongs in the state and send the photo in media.

IMG=$(base64 -w0 photo.jpg)
curl http://localhost:8000/v1/systemone -H "Content-Type: application/json" -d @- <<EOF
{
  "state": {"ticket": "Order #1182 arrived with a cracked screen. The customer asks for a refund.", "photo": "<image:1>"},
  "media": [{"type": "image", "data": "data:image/jpeg;base64,$IMG"}],
  "questions": {
    "cracked": {"type": "noul", "instructions": "The photo shows 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

Chat models take images too; Qwen3.5 and Gemma 4 show how.

Next steps