Cloudflare releases open-source Clef models: 98.5% on BFCL and 38.8 ms

Cloudflare has released two in-house decision models, Clef and Clef-flash. They run on Workers AI and are compatible with the Jev API from Typesafe AI. The weights are published on Hugging Face under Apache 2.0. Clef leads the Jev Decision Index. The model does not generate text. In a single prefill pass, it scores the candidate answers and returns typed probabilities. Clef-flash has a median latency of 38.8 ms, versus 524.1 ms for Jev. In Threat Intelligence, Clef classifies a domain in 2.2 s, while gpt-oss-120b takes 4.7 s. • 64k context versus 32k for Jev, plus a vision encoder • Built on Qwen3.8-27B and Qwen3.5-9B with LoRA rank-256 • An RL fine-tuning service is launching, run by an FDE team

AI-processed from Cloudflare AI Blog; edited by Hamidun News
Cloudflare releases open-source Clef models: 98.5% on BFCL and 38.8 ms
Source: Cloudflare AI Blog. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceCloudflare AI Blog ↗
Editor-in-Chief
Key metric #164k context versus 32k for Jev, plus a vision encoder
Key metric #2Built on Qwen3.8-27B and Qwen3.5-9B with LoRA rank-256
Key metric #3An RL fine-tuning service is launching, run by an FDE team

Cloudflare has entered the decision-model market. The company released Clef and Clef-flash, two in-house models that skip reasoning and text generation and return strictly typed answers with probabilities. Both are available on Workers AI and compatible with the Jev API from Typesafe AI, and the weights are on Hugging Face under the Apache 2.0 license. According to Cloudflare, Clef currently leads the Jev Decision Index. The company is also launching an RL fine-tuning service: first run by hand by FDE engineers, later as a self-serve platform.

A decision instead of reasoning

A decision model takes a state as input (for example, a support message) and a set of questions: is it urgent, which team should handle it, how serious is the impact. The output is typed JSON with probabilities, which code uses to route the ticket, raise an escalation, or hand the task to a human. The model works with an arbitrary set of categories without retraining for each new one.

Inside Cloudflare, the Threat Intelligence team is already testing Clef for domain classification. Through Browser Run, the model receives a page, renders it, and returns a set of categories: say, 95% fashion, 85% e-commerce, under 1% phishing. The whole cycle takes 2.2 s. The company's fastest general-purpose LLM, gpt-oss-120b, took 4.7 s in the same scenario and returned only two categories.

How Clef is built and how it differs from Jev

The base is a frozen Qwen model: Qwen3.8-27B for Clef and Qwen3.5-9B for Clef-flash. A routing head and low-rank rank-256 adapters are trained on top. Inference consists of a single prefill pass, after which the valid schema options are scored in parallel. Decoding is non-autoregressive: tokens are not generated one at a time, which is where the speed gain comes from. The answer options first gather relevant context, then the fields cross-attend to one another and to the input data, and only then does scoring happen.

Training uses label-smoothed cross-entropy and Brier loss to calibrate probabilities on internal synthetic data with permuted fields, prompts, and schemas. The second stage is RLCD (Reinforcement Learning for Calibrated Decisions): partial credit for neighboring ordinal options, a reward for fully exact records, and a penalty for deviating from the reference.

There are three differences from Jev:

  • a vision encoder, meaning image classification (Jev still works with text only);
  • 64k context versus 32k;
  • public weights under Apache 2.0 and hosting on Cloudflare's GPUs at the network edge.

Benchmark numbers

Values are given in the order Clef / Clef-flash / Jev:

  • BFCL (case exact): 98.47 / 98.76 / 95.75
  • ToolRet (nDCG@10): 69.19 / 66.43 / 65.28
  • API-Bank (accuracy): 91.93 / 93.11 / 88.19
  • Home appliances (case exact): 82.95 / 97.73 / 52.27
  • When2Call (accuracy): 72.37 / 65.58 / 80.97
  • BANKING77 (macro-F1): 94.20 / 90.93 / 79.74
  • CLINC150+OOS (macro-F1): 97.43 / 66.77 / 89.27
  • BRIGHT (nDCG@10): 45.91 / 39.26 / 47.52
  • Amazon ESCI (macro-F1): 57.48 / 57.39 / 55.21
  • PhishNChips (accuracy): 79.60 / 75.05 / 62.55

On Typesafe's own test set, Clef beat Jev in three of four areas: invoice processing (64.7 versus 61.8), customer support (76.3 versus 76.0), and security incidents (62.9 versus 61.7). In agent-trace observability, Jev is ahead: 71.6 versus 68.5 for Clef and 69.8 for Clef-flash. Note that Jev also wins on When2Call and BRIGHT, so this is not a complete rout.

On latency across 43 benchmarks, Clef's median was 209.3 ms (p95 238.6 ms), Clef-flash came in at 38.8 ms (p95 122.4 ms), and Jev measured 524.1 ms (p95 536.0 ms). For DiffusionGemma Jev, the figures are 84.4 and 211.2 ms, for Kev-9B 51.4 and 187.9 ms, and for Laya 5.8 and 222.5 ms. Laya is the fastest by median but loses noticeably on quality: for example, 38.13 on BFCL.

The RL platform and where this is heading

The company is assembling a pipeline from existing building blocks. AI Gateway logs traffic and turns it into a dataset, Workers AI generates rollouts on the base Clef, Containers serve as a sandbox for scoring and replaying agent actions, a new Trainer component updates the weights, and Workers AI with Bring Your Own Model (Cog, a legacy of the Replicate acquisition) rolls the result back out. For now, the service runs through a team of forward-deployed engineers, and the self-serve platform will come later.

Internal use cases already exist: assessing Trust & Safety reports, triaging support requests, and deciding in Bot products whether a crawler is good or bad. Cloudflare has accumulated more than 15 years of labeled network data for these tasks.

For agent developers, the practical takeaway is simple: if your pipeline has a fork like "urgent or not," "which department," or "phishing or legitimate site," it is cheaper to put a decision model on the hot path and call an LLM only for the action itself. Migrating from Jev comes down to swapping the model in the request, the weights can be downloaded and run locally, and companies with a large volume of labeled decisions should consider fine-tuning. Cloudflare does not read, store, or use customer data for training, except when the customer uses the fine-tuning service itself.

Story

Key Questions Answered

What are the key details on A decision instead of reasoning?

A decision model takes a state as input (for example, a support message) and a set of questions: is it urgent, which team should handle it, how serious is the impact. The output is typed JSON with probabilities, which code uses to route the ticket, raise an escalation, or hand the task to a human. The model works with an arbitrary set of categories without retraining for each new one. Inside Cloudflare, the Threat Intelligence team is already testing Clef for domain classification. Through Browser Run, the model receives a page, renders it, and returns a set of categories:

How Clef is built and how it differs from Jev?

The base is a frozen Qwen model: Qwen3.8-27B for Clef and Qwen3.5-9B for Clef-flash. A routing head and low-rank rank-256 adapters are trained on top. Inference consists of a single prefill pass, after which the valid schema options are scored in parallel. Decoding is non-autoregressive: tokens are not generated one at a time, which is where the speed gain comes from. The answer options first gather relevant context, then the fields cross-attend to one another and to the input data, and only then does scoring happen. Training uses label-smoothed cross-entropy and Brier loss

What are the key details on Benchmark numbers?

Values are given in the order Clef / Clef-flash / Jev: BFCL (case exact): 98.47 / 98.76 / 95.75 ToolRet (nDCG@10): 69.19 / 66.43 / 65.28 API-Bank (accuracy): 91.93 / 93.11 / 88.19 Home appliances (case exact): 82.95 / 97.73 / 52.27 When2Call (accuracy): 72.37 / 65.58 / 80.97 BANKING77 (macro-F1): 94.20 / 90.93 / 79.74 CLINC150+OOS (macro-F1): 97.43 / 66.77 / 89.27 BRIGHT (nDCG@10): 45.91 / 39.26 / 47.52 Amazon ESCI (macro-F1): 57.48 / 57.39 / 55.21 PhishNChips (accuracy): 79.60 / 75.05 / 62.55 On Typesafe's own test set, Clef beat Jev in three of four areas: invoice process

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…