Cloudflare open-sources Clef, a decision model that returns typed probabilities instead of text
Start with what Cloudflare itself confirmed. Per Cloudflare's official blog (October 1, 2026), the company released two in-house decision models, Clef and Clef-flash, hosted on Workers AI and fully open-sourced under Apache 2.0 on Hugging Face. Cloudflare says Clef currently leads when evaluated against the Jev Decision Index, and that both models are fully API-compatible with Jev, making the swap trivial. In the same post, Cloudflare debuted a new reinforcement-learning fine-tuning product.
To understand the launch, start with a counterintuitive definition: a decision model does not write text. Cloudflare's own example — you pass in a customer support message (inputs) and ask whether it is urgent and which team should handle it; the model returns typed answers with probabilities (outputs) that your code uses to route the ticket, trigger an escalation or defer to a human. Cloudflare makes the implication explicit: a human no longer necessarily needs to be in the loop for agentic decisions, and agents can gather context, decide and act programmatically, deferring to a human only when needed. That is the boundary with general LLMs — the LLM handles open-ended reasoning and generation, while the decision model makes the 'pick one' step cheap, fast and consistent without retraining every time a category is added.
Cloudflare's measured example comes from its own Threat Intelligence team classifying website domains. Given a domain (with Browser Run), Clef quickly identifies the categories it falls under — Cloudflare's illustration being a 95% chance it is a fashion site, 85% ecommerce, under 1% phishing. The comparison Cloudflare reports: Clef took 2.2 seconds to fetch, render and classify, while its fastest general LLM, gpt-oss-120b, took 4.7 seconds in the same workflow and returned only two classifications. Cloudflare extrapolates that combination of halved latency and fuller results to any use case needing quick programmatic decisions, describing it as unlocking agentic workflows that can autonomously decide, reason and execute.
Cloudflare lists three differentiators. First, Clef has a vision encoder, so it can take in images and classify visual content — Cloudflare says Jev is text-only today. Second, a 64k context window versus what Cloudflare says is Jev's 32k, letting users squeeze in more input state to classify against. Third, competitive scores across quality benchmarks; Cloudflare publishes the full table covering BFCL, ToolRet, API-Bank, Home appliances, When2Call, BANKING77, CLINC150+OOS, BRIGHT, Amazon ESCI and PhishNChips, and says that across the 43 eval benchmarks it ran, Clef models generally beat comparable decision models on latency — the one exception being Laya, which Cloudflare describes as very fast but trading off quality. On the latency table, the medians Cloudflare reports are Clef 209.3 ms, Clef-flash 38.8 ms, Jev 524.1 ms, DiffusionGemma Jev 84.4 ms, Kev-9B 51.4 ms and Laya 5.8 ms; p95 is Clef 238.6 ms, Clef-flash 122.4 ms and Jev 536.0 ms.
Cloudflare also goes deep on training: the backbone is a Qwen model, with Qwen3.8-27B frozen for Clef and Qwen3.5-9B for Clef-flash, jointly optimizing a routing head alongside rank-256 low-rank adapters. At inference, Clef runs a prefill-only pass through Qwen, then scores all valid schema choices in parallel; the decision step is non-autoregressive, so there is no intermediate text generated token by token, making it significantly faster than autoregressive LLMs. Training uses label-smoothed cross-entropy paired with a Brier loss to calibrate probabilities, plus a reinforcement-learning objective called RLCD (Reinforcement Learning for Calibrated Decisions). On deployment, Cloudflare says the models are hosted on Workers AI and run on its edge GPUs, fit for the agent hot path, and that enterprise customers get the guarantee that Cloudflare does not read, store or train on requests or responses unless they opt into fine-tuning. Fine-tuning runs through AI Gateway to capture data, Workers AI for rollouts, Containers as the RL sandbox, a new Trainer to update weights, and redeployment back onto Workers AI.
🤔 Frequently Asked Questions
How is a 'decision model' different from an ordinary classifier?
Cloudflare's definition: a decision model makes classifications based on probabilities to help agents decide how to act; it takes a state plus questions and returns typed answers with probabilities, enough to work over any set of inputs without retraining for each new category. Cloudflare also contrasts it with LLMs, which are largely non-deterministic but more open-ended at reasoning and generation.
Is it open source, and where can I get it?
Cloudflare says both models are fully open-sourced under Apache 2.0 on Hugging Face (huggingface.co/Cloudflare/clef) for local use, and also hosted on Workers AI with developer documentation. Cloudflare says they are fully Jev-API compatible, so switching means changing the endpoint and model name.
How much faster is it, exactly?
Cloudflare's reported medians: Clef 209.3 ms, Clef-flash 38.8 ms, Jev 524.1 ms, Kev-9B 51.4 ms and Laya 5.8 ms; p95 is Clef 238.6 ms, Clef-flash 122.4 ms and Jev 536.0 ms. These are vendor-reported figures and may not be directly comparable across harnesses.
Can I fine-tune it on my own data?
Cloudflare says yes, alongside a new reinforcement-learning fine-tuning product: initially hands-on with its forward-deployed engineer team, later a self-serve platform. The default enterprise guarantee is that Cloudflare does not read, store or train on requests and responses — the exception being when you opt into the fine-tuning product.
🛠️ Recommended Tools
- JSON FormatterClef's selling point is strictly typed output, and Cloudflare's own example is one long JSON payload. When iterating on schemas and checking returned fields, formatting first and then verifying structure beats eyeballing a minified blob.
- Word CounterCloudflare says Clef's context window is 64k, and its input is a state — a ticket, a page, an agent trace. Measuring the text before you classify keeps you from blowing the window and getting a half answer.
- Regex TesterDecision models often replace a pile of hand-written rules. During migration you will be comparing old rules against new model output, so tune the regex first — then a diff across the same sample tells you whether the model changed or the rule was wrong.
Summary
Per Cloudflare's official blog (October 1, 2026): Cloudflare released two in-house decision models, Clef and Clef-flash, hosted on Workers AI and fully open-sourced under Apache 2.0 on Hugging Face, fully Jev-API compatible. A decision model does not generate text; it takes a state plus questions and returns typed answers with probabilities so agents can route, escalate or defer to a human — which Cloudflare says removes the need for a human in the agentic decision loop. Cloudflare says Clef currently leads on the Jev Decision Index. Two differentiators: a vision encoder for images (Cloudflare says Jev is text-only today) and a 64k context window (Cloudflare says Jev is 32k). In Cloudflare's own Threat Intelligence domain-classification workflow, Clef took 2.2 seconds to fetch, render and classify while gpt-oss-120b took 4.7 seconds and returned only two classifications. Reported medians are Clef 209.3 ms, Clef-flash 38.8 ms and Jev 524.1 ms; p95 is Clef 238.6 ms, Clef-flash 122.4 ms and Jev 536.0 ms. The backbone is Qwen (Qwen3.8-27B frozen for Clef, Qwen3.5-9B for Clef-flash), trained with label-smoothed cross-entropy plus a Brier loss and an RLCD objective, alongside a new reinforcement-learning fine-tuning product and a default guarantee of not reading, storing or training on customer data. Every fact comes from the official sources below, with no speculation added.
Sources: "Cloudflare Blog: Introducing Clef — our open-source decision models, and new RL fine-tuning platform"
"Hugging Face: Cloudflare/clef (Apache 2.0 model weights)"