
Introducing Clef and Clef-flash: Cloudflare's open-source decision models
Cloudflare announces Clef and Clef-flash, its first in-house trained decision models, now hosted on Workers AI and open-sourced under Apache 2.0 on Hugging Face. Unlike text-generating LLMs, Clef takes a state plus up to 64 typed questions (yes/no, multiple-choice, or rubric score) and returns calibrated probabilities instead of free-form text, aiming for millisecond-latency structured decisions in agent pipelines. Cloudflare reports it beats TypeSafe's Jev on 7 of 10 decision benchmarks while running 2.5x (Clef) to 13x (Clef-flash) faster, and also launches an RL fine-tuning service for custom tuning.
What it claims
Cloudflare's first in-house models, @cf/cloudflare/clef and @cf/cloudflare/clef-flash, are decision models. They return a probability per allowed answer instead of generated text. Across 43 benchmark runs, Clef is 2.5x faster than Typesafe's Jev at the median and Clef-flash is 13x faster. Across 10 decision benchmarks, "a Clef model" scores highest on 7. On Typesafe's own workflow evals, Clef beats Jev in 3 of 4 areas: invoice processing, customer service and security incidents. Unlike text-only decision models, Clef has a vision encoder.
Evidence
- Speed: 2.5x (Clef) and 13x (Clef-flash) faster than Jev, measured at the median over 43 benchmark runs. The page does not give the hardware, batch size or question count.
- Accuracy: a Clef variant leads on 7 of 10 decision benchmarks, ahead of Jev and "other open decision models". The page does not name the benchmarks or say which variant won each one. Full results are said to be on the Hugging Face model card.
- Typesafe workflow evals: Clef wins 3 of 4 areas. The fourth area is not named.
- End-to-end example: paired with Browser Run, Clef fetched, rendered and classified a domain in 2.2 s. The same workflow took 4.7 s with gpt-oss-120b.
How to use it
- Access: use the Workers AI binding (
env.AI.run()) or the REST endpoint/ai/run. Both also work through AI Gateway. - Weights: both models are on Hugging Face under Apache 2.0.
- Migrating from Jev: Clef follows the System One API, so an existing Jev integration switches over by changing the endpoint and the model name.
- Request shape: one input state, optionally with up to 4 images, plus up to 64 questions per request. Each question has one of three types:
noul: a yes/no question. Returns P(yes).choice: pick one option from a set you define. Returns the chosen option, a probability per option and a confidence value.score: rate against an ordered rubric. Returns a probability-weighted score and a probability per level.- Suggested placement: put Clef in the agent's request path for the decision, such as routing, blocking, escalating or a "should I call this tool?" guardrail in tens of milliseconds. Then hand off to an LLM on Workers AI for the action.
- Named use cases: support triage, website category classification, policy-rubric scoring for trust and safety, agent guardrails, and image classification.
- RL fine-tuning service: design-partner sign-up only, not generally available.
Limits
- The page gives no parameter counts, context length or architecture for either model beyond the vision encoder.
- Pricing is referenced but not stated.
- Benchmark detail is thin:
- The 10 benchmarks are not named.
- Clef does not lead on 3 of the 10.
- It loses one of the four Typesafe areas, which is unnamed.
- The "7 of 10" result counts either variant, so Clef-flash's own accuracy is not separated out.
- The latency multiples are medians with no stated setup. Absolute millisecond figures are given only as "milliseconds" and "tens of milliseconds".
- Check the model card before relying on these numbers for your task.
- The Browser Run comparison is against a general-purpose LLM, not against another decision model.
Organisations named here
- Cloudflare
- TypeSafe
- Hugging Face
- Jev
Technologies named here
- Clef
- Workers AI
- AI Gateway
- Clef-flash
- Browser Run
- Jev
- Hugging Face
- gpt-oss-120b
- System One API
- Cloudflare
Techniques named here
- Decision model inference
- Typed question answering
- Reinforcement learning fine-tuning
Related in models


