Introducing Clef: Our open-source decision models, and new RL fine-tuning platform

Cloudflare announced the release of Clef and Clef-flash, two decision models the company trained itself and now hosts on Workers AI. Alongside the models, Cloudflare is open-sourcing the weights on Hugging Face under an Apache 2.0 license and debuting a reinforcement learning (RL) product that lets customers fine-tune Clef for their own workloads. Clef is positioned as Cloudflare's answer to Typesafe AI's Jev System One, and Cloudflare says it currently leads when evaluated against the Jev Decision Index.
A decision model, in Cloudflare's framing, does not generate prose. It takes inputs and returns typed, structured answers with probabilities attached. The company's example: hand it a customer support message, ask whether the request is urgent and which team should own it, and get back typed fields your code can act on directly — routing a ticket, triggering an escalation, or deferring to a human. That makes the model useful in the hot path of an agentic workflow where an LLM would be too slow or too unpredictable.
Clef builds on the same broad idea as Jev, but Cloudflare claims three distinguishing properties. It includes a vision encoder, so it can classify images as well as text; Jev, by contrast, is described as text-only today. Its context window is 64k, twice Jev's stated 32k, which allows more input state to be classified at once. And Cloudflare reports competitive benchmark accuracy across a range of decision-making tasks.
The published benchmark table pits Clef and Clef-flash against Jev, DiffusionGemma Jev, Kev 9B, and Laya. On BFCL case exact, Clef scores 98.47 and Clef-flash 98.76 against Jev's 95.75. On ToolRet nDCG@10, Clef gets 69.19, Clef-flash 66.43, Jev 65.28. API-Bank accuracy is 91.93 for Clef, 93.11 for Clef-flash, 88.19 for Jev. On Home appliances case exact, Clef-flash stands out at 97.73 versus Jev's 52.27. Other rows favor competitors: When2Call accuracy is 72.37 for Clef, 65.58 for Clef-flash, and 80.97 for Jev; BRIGHT nDCG@10 is 45.91, 39.26, and 47.52 respectively; and PhishNChips accuracy is 79.60 for Clef, 75.05 for Clef-flash, and 62.55 for Jev, with DiffusionGemma Jev higher at 85.35. On Typesafe's own eval suite, Cloudflare says its models beat Jev in three of four areas, with a notable showing from Clef-flash given its speed.
Latency is where Cloudflare stakes a large part of its case. Across the 43 eval benchmarks it ran, Cloudflare says Clef beat competing decision models on latency, with Laya the exception — Laya is very fast but trades off quality on the accuracy benchmarks. Median latency is 209.3 ms for Clef, 38.8 ms for Clef-flash, 524.1 ms for Jev, 84.4 ms for DiffusionGemma Jev, 51.4 ms for Kev-9B, and 5.8 ms for Laya. At p95 the numbers are 238.6 ms, 122.4 ms, 536.0 ms, 211.2 ms, 187.9 ms, and 222.5 ms in the same order. Because the models are hosted on Cloudflare's edge GPUs, the company says network latency is also reduced.
A concrete internal test frames the pitch. Cloudflare ran Clef on its Threat Intelligence team to classify website domains, pairing it with Browser Run. Clef assigned probabilistic categories to a domain — for example 95% fashion, 85% ecommerce, under 1% phishing — and took 2.2 seconds to fetch, render, and classify. The fastest general LLM Cloudflare had available, gpt-oss-120b, took 4.7 seconds in the same workflow and returned only two classifications. Cloudflare describes that as roughly a 2x latency saving.
The models match Jev's structured-output API, so swapping providers is meant to be close to a drop-in change. A single REST call to the Workers AI run endpoint carries a state string and a questions object describing typed fields: a noul (boolean-like) question, a choice question with named criteria, and a score question with an ordered criteria list. Clef also produces strictly typed outputs like Jev. Cloudflare positions the larger Clef model as the precision option and Clef-flash as the choice for latency-critical decisions. The hosted models carry a guarantee that Cloudflare does not read, store, or train on request or response data, with the exception of the fine-tuning product.
On the training side, Cloudflare says Clef uses Qwen as its backbone rather than the DiffusionGemma line it experimented with earlier. The base models are Qwen3.8-27B for Clef and Qwen3.5-9B for Clef-flash, both frozen. Inference does a prefill-only pass and then scores valid schema choices in parallel; the decision step is non-autoregressive, so no intermediate text is generated token by token. A two-stage attention routing process lets each valid choice extract prompt-relevant context and lets field parameters cross-attend with other fields and back to the original payload before scoring. A lexical prior is used to preserve semantic intent across options. Training jointly optimized a routing head and rank-256 low-rank adapters, with label-smoothed cross-entropy for valid schema outputs and a Brier loss to calibrate probabilities, over internal synthetic datasets that permuted field orders, prompts, and schema structures. Cloudflare also describes Reinforcement Learning for Calibrated Decisions (RLCD), which grants partial credit to adjacent ordinal choices, rewards fully precise record outputs, and applies a reference penalty to limit distribution shift.
This suggests the interesting technical claim is not the benchmark table but the architecture: constraining a model to emit scores over a known schema turns a generation problem into a scoring problem, which removes the token-by-token decode loop that dominates LLM latency. A likely trade-off is flexibility — a decision model is only as expressive as the schema you hand it, which is why Cloudflare pairs Clef with a general Workers AI LLM for the actual action-taking step.
The new RL service is the other half of the announcement. Cloudflare is initially offering fine-tuning as a hands-on engagement with its forward-deployed engineer (FDE) team, with a self-serve platform to follow that would let customers capture data, fine-tune, and redeploy the model on Cloudflare. Internally, Cloudflare cites three candidate workloads: evaluating Trust and Safety submissions, triaging Cloudflare Support requests, and classifying crawlers as good or bad bots inside its Bot products. The stated rationale is that years of labelled decisions and more than 15 years of network data make a domain-specific classifier both more accurate and faster than the generic Clef, at the cost of some general-purpose performance.
The RL loop is assembled from existing Cloudflare primitives: AI Gateway captures AI traffic to build a dataset of requests for your use case, Workers AI generates rollouts against base Clef, Containers provide an RL sandbox for scoring and replaying agent actions, a new Trainer component updates the weights of the fine-tuned Clef model, and Workers AI plus Bring Your Own Model redeploys it. Cloudflare notes the BYO Model work has progressed since its acquisition of Replicate.
Why it matters: teams building agent workflows now have a hosted option whose whole purpose is making cheap, typed, low-latency decisions rather than generating text, and it is API-compatible with Jev, so evaluating it is a small change. The open-sourced Apache 2.0 weights also mean the architecture can be inspected or run locally instead of taken on trust, which should appeal to teams wary of locking a hot path into a single vendor. The fine-tuning path is still an FDE-led service rather than self-serve, so product teams with domain-specific classification needs should treat the self-serve platform as a roadmap item, not something available today.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
We are introducing Clef and Clef-flash, open-source decision models hosted on Workers AI for high-speed classification and agentic workflows. Also launching: a new reinforcement learning platform that allows developers to fine-tune decision models using their own data.