
Clef: What Cloudflare's 27B Decision Model Actually Is
- MoonshotNEWMoonshotAI: Kimi K3.1 Pro2026-10-24$2.00 / $10.00 per 1M tokens · 51 tok/s
- OrcaNEWOrcaCyber: DeepSeek V4.1 Flash Abliterated2026-10-23$0.70 / $1.60 per 1M tokens · 197 tok/s
- OrcaNEWOrca: OrcaCyber Ultra 1.02026-10-17$5.00 / $10.00 per 1M tokens · 14 tok/s
- deepseekNEWDeepSeek: DeepSeek V4.1 Flash 10172026-10-1745Intelligence
- DeepSeekNEWDeepSeek: DeepSeek V4.1 Flash2026-10-1740Intelligence
- OrcaOrca: OrcaCyber Zero 1.52026-10-10$3.00 / $7.50 per 1M tokens · 149 tok/s
- openaiOpenAI: GPT-6.1 Sol2026-09-2952Intelligence
- anthropicAnthropic: Claude Sonnet 5.52026-09-2856Intelligence
- typesafeTypeSafe: Jev 1.132026-09-24$0.04 / $0.00 per 1M tokens · 1063 tok/s
- OpenAIOpenAI: GPT-6 Luna2026-09-2238Intelligence
- OpenAIOpenAI: GPT-6 Sol2026-09-2248Intelligence
- AnthropicAnthropic: Claude Opus 5.52026-09-2258Intelligence
- xAIGrok 4.72026-09-2146Intelligence
- OrcaOrca: OrcaCyber Zero 1.02026-09-17$3.00 / $7.50 per 1M tokens · 159 tok/s
- OrcaOrca: OrcaVerify Text 1.02026-09-16$2.00 / $0.00 per 1M tokens · 1906 tok/s
- OpenAIOpenAI: GPT-6 Astra2026-09-0453Intelligence77Coding
- GoogleGoogle: Gemini 3.8 Flash2026-09-0241Intelligence76Coding
- AlibabaQwen: Qwen3.8 Max (0902)2026-09-0245Intelligence76Coding
- AnthropicAnthropic: Claude Fable 5.12026-09-0153Intelligence82Coding
- TencentTencent: Hy4 preview2026-08-28$0.83 / $2.50 per 1M tokens · 48 tok/s
Clef is a 27-billion-parameter multimodal decision model published by Cloudflare. You give it a state — a string, a JSON object, an image, a video clip — plus a schema of up to 64 typed questions, and it returns a probability for every allowed option of every question in a single forward pass. There is no text generation anywhere in the pipeline and no output parsing: the model emits one logit per allowed option, you softmax per question, and you are done. The weights are Apache-2.0 and live in the Cloudflare/clef repository on Hugging Face; Cloudflare also serves the model from its own Workers AI platform.
Two dates matter for orientation, and neither of them is why this page exists. The weights were published on 30 September 2026 and Cloudflare's announcement post is dated 1 October 2026, which makes Clef twelve days old on the day this was written — old enough that it is not news, and this page does not treat it as news. It exists because "clef" is a query people actually type, and until now nothing on this blog answered it. The launch is how the model gets dated; the reference material below is the point.
The size question, settled from the publisher
Two parameter counts are circulating next to each other and only one of them belongs to this model.
• Clef is 27B. Cloudflare's own model page describes it as "a 27B multimodal decision model," and the Hugging Face model card says the same in its opening line: "Clef is a 27B multimodal model that turns a state and a schema of typed questions into decisions."
• 9B is a different model, not a second size of this one. The 9B checkpoint is Clef Flash, a separate sibling with its own repository and its own model page. Anyone who searched for a 9B Clef was looking for Clef Flash. They are not interchangeable and the numbers do not trade.
• There is a third member too. Clef Omni, announced on 9 October 2026, is a 30B mixture-of-experts model with 3B active parameters, built on a different backbone. It reads audio as well. If you have seen "30B" attached to Clef, that is Clef Omni, not Clef.
So the size of the model on this page is 27B, full stop, and the repository ships it in BF16 safetensors. The published file set comes to roughly 55 GB across twenty-five files, which is the number that matters if you intend to self-host rather than call it.
How Clef relates to Clef Flash
Cloudflare shipped Clef as a family, and the family structure is the useful part rather than an aside. Clef and Clef Flash share a recipe: freeze a Qwen3.8-27B backbone for the larger model and a Qwen3.5-9B backbone for the smaller one, keep the vision encoder, and train a small joint schema head on top plus low-rank adapters. Same output contract, different capacity and a very different latency profile.
That shared contract is the reason both models are worth understanding together: a schema written for one is a schema for the other, and swapping which one answers is a model identifier rather than a rewrite. The trade is speed against capability, and Cloudflare's own 9 October post made the trade sharper by cutting Clef Flash's hosted price to $0.038 per million input tokens while leaving Clef at $0.24 per million input tokens. Note what that post also did: it reduced the hosted context window of Clef Flash to 24,000 tokens, down from the 64,000 that had previously been advertised for it, while Clef itself stayed at 64,000.
Architecture: a frozen backbone plus a scoring head
Clef is not a language model wearing a classifier hat. The design is worth stating precisely because it explains almost every other property of the model.
• Backbone — Qwen3.8-27B including its vision encoder, carried over and frozen, stored as ordinary sharded safetensors.
• Joint schema head — a small transformer head that reads the backbone's final hidden states, routes evidence from the state to each question, and scores all options of all questions jointly rather than one question at a time.
• Training — rank-256 low-rank adapters, label-smoothed cross-entropy plus a Brier loss for calibration, and Cloudflare's "Reinforcement Learning for Calibrated Decisions" loop.
• Output — one logit per allowed option, per question. Softmax per question gives you probabilities. Nothing else comes out.
The joint scoring is the part that separates Clef from a stack of independent classifiers. Because all questions are scored against the same hidden state in one pass, the questions can inform each other, and the whole thing is non-autoregressive — there is no decode loop, which is where the latency numbers come from. Cloudflare describes the inference as a prefill-only pass.
Context, limits, and what comes in
On context and modality the vendor's material is specific, and where it is silent that silence is worth recording rather than papering over.
• Context window — 65,536 tokens on Cloudflare's hosted Workers AI endpoint, per the model page. That is the figure Cloudflare's launch post contrasts with the 32,000-token window it attributes to TypeSafe's Jev.
• Self-hosted context — Cloudflare's 9 October post says the Hugging Face weights were trained to support a 256,000-token window if you run them yourself. The bundled encoder in that repository defaults to max_length=16,384, which is a default rather than a ceiling but is what you get if you use the loader as shipped.
• Maximum output — not published. There is no token budget to publish: the model returns a fixed probability vector per question, so the natural cap is the schema (1 to 64 questions, each with 2 to 26 options) rather than a length in tokens.
• Input modalities — text, JSON, images and video. The Workers AI page marks vision as supported and accepts PNG, JPEG or WebP images, up to four per request. Clef Omni, separately, adds audio; Clef itself does not.
• Output modality — probabilities. Clef cannot draft a reply, summarise a thread, or produce a sentence, and it will not invent a category you did not declare.
• Licence — Apache-2.0, following the Qwen3.8-27B base checkpoint. Cloudflare's model page links to the licence file rather than naming it in the page text; the licence file itself is Apache-2.0.
One implementation detail is documented as a trap and it is worth repeating: the confidence field reports how concentrated the probabilities are, not the probability that the answer is right. A well-calibrated model can return a low-confidence correct answer and a high-confidence wrong one.


What Cloudflare claims, and what has actually been measured
This is the section to read carefully, because the gap between the two halves of the heading is wide.
Every performance figure attached to Clef comes from Cloudflare. The model card publishes a forty-plus-row table from what it describes as "our internal run of the Decision Index 0.2.1 suite," and that leaderboard is hosted by Cloudflare. The workflow evaluations underneath it are drawn from TypeSafe's public eval set, but the run is still Cloudflare's. As of today I can find no independent, third-party reproduction of either table — no outside lab, no neutral leaderboard, no published replication. Treat the numbers as the supplier's best case, not as measurements.
The pattern inside those numbers is more informative than any single cell. Clef's strongest results are on classification-shaped tasks: on Cloudflare's run it reports 94.2 macro-F1 on BANKING77 intent against 79.7 for Jev, and 97.4 macro-F1 on CLINC150 with out-of-scope handling against 89.3. The out-of-scope figure is the operationally interesting one, because declining to classify is the hard half of routing. It also reports 98.5 case-exact on BFCL and 86.7 on CRUXEval.
The losses point the same way, consistently. On the same table Clef reports GPQA Diamond at 48.0 against Jev's 78.3, MMLU-Pro at 65.9 against 82.7, and BBH at 73.7 against 92.9. Those are the three largest gaps in the table and they all describe the same weakness: reasoning outside the shapes the model was trained on. On the four end-to-end workflow evaluations the two models are close enough that the ordering is not a finding.
Latency is the one place where the advantage is structural rather than marginal, and therefore the one most likely to survive contact with production. Cloudflare reports a median of 209.3 ms and a p95 of 238.6 ms for Clef against 524.1 ms and 536.0 ms for Jev. That ordering falls out of the non-autoregressive design rather than out of a benchmark's quirks — but the absolute milliseconds were measured on Cloudflare's own hardware and mean little on their own.
Worth noting for anyone who has already read a Clef benchmark table on this blog: the serving numbers moved on 9 October. Cloudflare moved Clef to SGLang for serving and contributed the work upstream, reporting median speedups of 1.7× at roughly 800 input tokens and 2.0× at roughly 3,400 tokens. Those are serving-layer changes, not new weights, and the model itself is unchanged. If you are quoting a pre-9-October latency figure, it is stale.

Calling Clef, and getting the Cloudflare relationship right
There are two ways to run it, and neither is mysterious.
The first is Cloudflare's own endpoint. Clef is served from Workers AI, Cloudflare's own inference platform, at $0.24 per million input tokens with no charge for output tokens — which follows from there being no output tokens. Media inputs are converted to tokens and billed at the same input rate. This is the publisher hosting its own model, and that is the whole of the relationship: the searches that pair this model's name with Cloudflare are not pointing at a third-party host that happened to add it. Cloudflare built it.
The second is your own hardware. The weights are on Hugging Face under Apache-2.0, so self-hosting is permitted without a commercial conversation. Cloudflare's own testing used torch 2.11 and transformers 5.10.2 on a single H200, with pillow needed for image and video input. If you have read that Clef also runs on SGLang, that is accurate as of the 9 October serving change; the upstream work is slated for release in SGLang 0.5.22.
The API shape is deliberately not novel. Clef's request and response bodies are compatible with TypeSafe's SystemOne format, so a pipeline already wired to a decision model of that shape can point at Clef by changing a URL and a model string. That is a real switching-cost argument and it cuts in both directions, which is the honest way to read it: because the interface is the same, adopting Clef is cheap, and abandoning it is equally cheap. The sensible posture for a team with a decision endpoint already in production is to run both against your own traffic rather than to migrate. If you route through OrcaRouter, TypeSafe's Jev 1.13 is a listed model on our catalogue, so an A/B between the incumbent and whatever you self-host sits behind one key rather than two contracts — 200-plus models, provider list price passed through at no per-token markup, and failover handled for you.
One thing this page will not tell you is whether Clef is available through us. Cloudflare publishes it on Workers AI and on Hugging Face, and I have not verified a route through our own model list, so there is nothing to claim.
What is still unresolved
The single most useful thing that could happen to Clef is an outside replication of the Decision Index. The suite is public and Cloudflare describes the evals as reproducible, so a third-party run is the difference between a vendor's table and a fact. Until that exists, the honest summary of Clef's published profile is that it is a very strong constrained classifier with a fast, non-autoregressive design, and a substantially weaker general reasoner than the model it was benchmarked against.
Three specific things would change that reading. A neutral reproduction of the BANKING77 and CLINC150 out-of-scope numbers, because a thirty-point gap over the incumbent is either the whole story or an artefact. A p95 figure under real concurrency, because a 209 ms median measured on one H200 says nothing about a hot path under load. And a fine-tuned Clef that beats the base on a task the base was never trained for, which Cloudflare's RL fine-tuning platform is designed to produce but has not yet demonstrated with a customer result.
Until then, what a reader can rely on is the shape of the thing: 27B parameters, a frozen Qwen3.8-27B backbone with its vision encoder, a joint schema head, 65,536 tokens of hosted context, text and JSON and images and video in, probabilities out, Apache-2.0. That is enough to decide whether the architecture fits your problem. The question it cannot answer yet is whether the vendor's own scoreboard is right about the model, and nobody outside Cloudflare has checked.
