Cloudflare has unveiled Clef and Clef-flash, its inaugural artificial intelligence models developed by the Workers AI team. These distinct models are engineered as decision engines, diverging from the more common generative chatbot paradigm. Instead of producing open-ended text, Clef and Clef-flash analyze input states and predefined schemas of questions, subsequently returning a probability for each permissible answer.
Both models are released under an Apache 2.0 open-weight license, making their underlying architecture accessible for broader use and self-hosting. They are also fully compatible with TypeSafe AI's Jev API, a standard for 'System One' models, allowing for straightforward integration into existing infrastructures.
Differentiating Decision Models from Large Language Models
Unlike traditional Large Language Models (LLMs) that generate output tokens sequentially and require post-processing, decision models are built to address a fixed set of questions based on a given input. This focused approach ensures structured, quantifiable results. Clef supports three primary question formats:
- Yes/No (Noul): This type provides the probability of an affirmative response.
- Choice: For scenarios requiring selection from named options, this format offers individual probabilities for each choice, alongside an overall confidence score.
- Score: When evaluating against an ordered rubric, the model returns a probability-weighted score, enabling nuanced assessments.
Through Cloudflare's Workers AI platform, a single request can incorporate up to 64 questions and process as many as four images simultaneously, highlighting the models' versatility.
Under the Hood: Architecture and Training
Clef is a post-trained derivative of Qwen3.8-27B, while Clef-flash originates from Qwen3.5-9B. Both maintain the foundational backbone's vision encoder, allowing for multimodal input processing. The inference process occurs in two stages: initially, the backbone executes a single prefill pass over the input state and questions. Subsequently, a compact transformer, termed the joint schema head, processes the final hidden states, directing evidence to each question, enabling cross-attention between fields, and jointly scoring all potential options. Logits are then converted into probabilities via a per-question softmax function.
During training, the core backbones remained frozen. Optimization focused on the routing head, enhanced with rank-256 low-rank adapters. The training loss combined label-smoothed cross-entropy with a Brier loss for improved calibration. An additional objective, Reinforcement Learning for Calibrated Decisions (RLCD), was implemented to provide partial credit for closely related ordinal choices, further refining accuracy.
Performance Benchmarks and Real-World Impact
In Cloudflare’s internal Decision Index 0.2.1 suite, Clef models demonstrated superior performance across seven of ten benchmark tests. For instance, Clef achieved 94.20 on BANKING77 (macro-F1) compared to Jev's 79.74, and 97.43 on CLINC150+OOS (macro-F1) versus Jev's 89.27. Clef-flash also posted a remarkable 97.73 on home appliance case exact evaluations, significantly outpacing Jev's 52.27.
However, Jev maintains a clear lead in knowledge-intensive assessments, such as GPQA Diamond (78.3 vs. Clef's 48.0), MMLU-Pro (82.7 vs. 65.9), and BBH (92.9 vs. 73.7). In TypeSafe’s workflow evaluations, Clef models slightly edged out Jev in three of four categories, including invoice processing, customer service, and security incident management, while Jev led in agent trace observability.
Crucially, Clef exhibited significantly faster processing times. In a Cloudflare threat intelligence scenario, Clef classified a domain in 2.2 seconds, nearly halving the 4.7 seconds taken by gpt-oss-120b. It is important to note that all reported performance figures are vendor-provided and await independent verification.
Deployment Options and Fine-Tuning Services
These new models can be accessed via the Workers AI binding (env.AI.run()), the REST API, or the AI Gateway. For organizations preferring to host models internally, weights are available on Hugging Face, with compatibility confirmed on single H200 GPUs using BF16 weights.
Cloudflare also announced an upcoming reinforcement learning service designed for fine-tuning Clef models using proprietary data. This service will initially be offered through Cloudflare's forward-deployed engineers, with plans for a self-serve platform in the future. The underlying pipeline integrates AI Gateway, Workers AI, Containers, and a new Trainer component, offering a robust solution for customization. Interested teams can apply to participate through a design partner program.
This article is a rewritten summary based on publicly available reporting. For the original story, visit the source.
Source: MarkTechPost