Cloudflare’s Clef gives typed probabilities for better decisions

Many teams building AI‑enabled services hit the same wall: large language models give fluent text but force you to parse free‑form answers, add latency, and make it hard to guarantee a specific output shape. When you need a reliable yes/no, a single choice from a list, or a scored rating tied to a rubric, the extra parsing step becomes a source of bugs and slows down decision loops. Teams also struggle with model licensing, deployment complexity, and the need to keep data private while still benefiting from a strong foundation model.

Cloudflare’s Clef and Clef‑flash solve exactly those problems. They are decision‑model checkpoints that take an input state and a typed schema of questions and return a probability for every allowed answer—no free‑form generation, no token‑by‑token sampling. The model works in a single forward pass: a frozen Qwen backbone encodes the state and questions once, then a tiny joint schema head routes evidence, scores all options jointly, and applies a per‑question softmax. The result is a set of calibrated probabilities you can threshold, route on, or escalate immediately.

Because the backbones are frozen and only a low‑rank adapter is trained, the files are small enough to run on Cloudflare Workers AI today, and the weights are openly available on Hugging Face under an Apache 2.0 license. Switching from another System‑One model such as TypeSafe AI’s Jev is as simple as changing the endpoint and model name—your existing Jev‑compatible code keeps working. On Workers AI you can bundle up to 64 questions and four images in a single request, giving you sub‑200 ms latency for Clef‑flash and deterministic, type‑safe outputs without any extra parsing code.

If you need reliable, fast, and easy‑to‑host decision models that fit directly into existing type‑safe pipelines, Clef gives you a drop‑in replacement that removes parsing overhead, lowers latency, and lets you keep full control over deployment. #AI #Product #MLOps #DecisionModels #Cloudflare #WorkersAI