Clef: Cloudflare's open decision models for agent workflows

Cloudflare released Clef and Clef-flash under Apache 2.0: 27B and 9B decision models, post-trained from Qwen, that return a probability for each option you define instead of writing text.

  • New release
  • 2 min read
  • Published

Cloudflare announced Clef on 1 October 2026 and published two sets of weights on Hugging Face: Clef, with 27 billion parameters, and Clef-flash, with 9 billion. Both are decision models, a type that Typesafe AI’s Jev made popular a few weeks earlier. They are the first models trained by Cloudflare’s Workers AI team, and they carry the Apache 2.0 license.

What is new

A decision model does not write text. You send a situation, as text, JSON, images or video, plus typed questions: a true or false check, a choice among named options, or a score on an ordered scale. In one pass the model returns a probability for every allowed option, so your code can route a ticket, escalate or hand a case to a person. Cloudflare says its threat-intelligence team classifies website domains this way in 2.2 seconds, against 4.7 seconds for gpt-oss-120b in the same workflow.

Clef is post-trained from Qwen3.8-27B and Clef-flash from Qwen3.5-9B, with the vision encoder kept. Cloudflare froze the Qwen weights and trained a small joint head plus LoRA adapters, using synthetic data and a reinforcement-learning step it calls RLCD. Jev reads text only, while Clef also takes images and video, and its advertised context is 64K tokens against Jev’s 32K. The API is compatible with Jev’s and SystemOne’s.

Cloudflare’s own run of the Decision Index is mixed. By our count of the model card’s table, Clef beats Jev on 26 of 41 benchmarks and trails it on 15, with the widest gaps on GPQA Diamond, BBH and MMLU-Pro. Cloudflare reports a median latency on its hosted service of 209 ms for Clef and 39 ms for Clef-flash, against 524 ms for Jev.

Running it

The BF16 repositories are about 55 GB and 19 GB. The card’s PyTorch and Transformers code was tested on one H200, and SGLang has a dev image with launch commands for H200, B200 and B300. llama.cpp merged text-only support on 3 October, and ggml-org publishes GGUF files of 19.5 GB (Q4_K_M) for Clef and 6.7 GB for Clef-flash, served through the /v1/systemone endpoint. By our estimate a 4-bit Clef needs about 19 GB of memory and Clef-flash about 6.5 GB. The sample code’s default input limit is 16,384 tokens, so raise max_length for longer inputs.

License

Both repositories use Apache 2.0, following the Qwen base models, with no revenue cap, territory limit or naming rule. Cloudflare also hosts the models on Workers AI and offers fine-tuning through its engineers, with a self-serve platform planned, but the open weights are separate from those services.

Why it matters

Most open models in our catalog write text, so an agent step that needs a yes, a team name or a severity score has to ask a chat model and parse the reply. Clef shows the alternative: a scoring model with typed outputs and probabilities you can set thresholds on. It cannot explain itself, reasoning-heavy checks suit a larger model, and every benchmark and latency number is Cloudflare’s own, so test it on labeled examples from your own workflow. Our coding and agents list covers the chat models that sit around such a step.

Sources

Models in this story

Model Released Parameters Context License Smallest variant needs
Clef Cloudflare 9.41B – 27.4B 64K Apache 2.0 (Permissive) 6.49 GB Laptop or phone
Qwen3.8-27B Alibaba Qwen 27.8B 256K Apache 2.0 (Permissive) 19 GB Gaming GPU
Qwen3.5 Alibaba Qwen 873M – 403B 17B active 256K Apache 2.0 (Permissive) 0.602 GB Laptop or phone
gpt-oss OpenAI 21B – 117B 5.1B active 128K Apache 2.0 (Permissive) 15 GB Laptop or phone
DiffusionGemma Google DeepMind 25.2B 3.8B active 256K Apache 2.0 (Permissive) 17 GB Gaming GPU