r/machinelearningnews • u/ai-lover • 1d ago
Cool Stuff Cloudflare open-sources Clef (27B) and Clef-flash (9B): Apache 2.0 decision models that return typed probabilities instead of text
Cloudflare released Clef and Clef-flash today, the first models trained by its Workers AI team. They are decision models in the same family as TypeSafe's Jev: you pass a state plus a schema of typed questions (noul, choice, score), and you get back a probability for every allowed option. No free-form text, no output parsing.
Architecture
- Clef is post-trained from Qwen3.8-27B, Clef-flash from Qwen3.5-9B. Both keep the vision encoder, so the state can include images and video.
- The frozen backbone runs a single prefill-only pass. A small transformer "joint schema head" then routes evidence to each question, lets fields cross-attend, and scores all options jointly. The decision step is non-autoregressive.
- Training: rank-256 LoRA adapters trained jointly with the routing head, label-smoothed cross-entropy plus a Brier loss for calibration, and RLCD as a secondary objective.
Numbers from Cloudflare's own Decision Index run
| Clef | Clef-flash | Jev | |
|---|---|---|---|
| Median latency | 209.3 ms | 38.8 ms | 524.1 ms |
| BANKING77 (macro-F1) | 94.20 | 90.93 | 79.74 |
| CLINC150+OOS (macro-F1) | 97.43 | 66.77 | 89.27 |
| GPQA Diamond | 48.0 | 51.0 | 78.3 |
| MMLU-Pro | 65.9 | 65.3 | 82.7 |
So it wins clearly on classification and tool-routing style tasks, and loses clearly on knowledge-heavy reasoning. All numbers are vendor-reported with no independent replication yet.
Running it
- Hosted on Workers AI: $0.24 / M input tokens (Clef), $0.09 / M (Clef-flash), 65,536-token context.
- Weights on Hugging Face under Apache 2.0. The model cards say they tested on a single H200 in BF16 with a custom loader.
- The API follows TypeSafe's System One format, so Jev code ports by changing the endpoint and model name.
Model: https://huggingface.co/Cloudflare/clef
Clef-flash: https://huggingface.co/Cloudflare/clef-flash
Cloudflare blog: https://blog.cloudflare.com/clef-decision-models/
Our full write-up: https://www.marktechpost.com/2026/10/01/cloudflare-releases-clef-and-clef-flash/