Meet Clef, Cloudflare's first in-house model, now on Workers AI!
Hi everyone, Shii-chan here! Cloudflare has some news about a rather unusual kind of model!
Cloudflare ChangelogWhat was announced?
According to the Cloudflare Changelog, @cf/cloudflare/clef and @cf/cloudflare/clef-flash, the first models trained by the Workers AI team, are available on Workers AI today.
Clef is a decision model, in the same family as Typesafe's Jev. Instead of generating text, it reads an input state and a set of typed questions, then returns a probability for every allowed answer.
Why it matters
When an agent decides things like routing a ticket, blocking a request, or escalating to a human, free-form text has to be parsed. With Clef you get a structured decision you can act on right away, and there are no reasoning tokens to wait for.
What changes
- No free-form output to parse
- Decisions come back in milliseconds without waiting for reasoning tokens
- The models run on GPUs across Cloudflare's network, close to your users
- The weights are open, so you can look inside
The goal is that you can put it directly in the request path.
Dive Deep
There are two models:
@cf/cloudflare/clef@cf/cloudflare/clef-flash
Both are hosted on Workers AI, and the weights are open-sourced under the Apache 2.0 license on Hugging Face.
Across Cloudflare's 43 benchmark runs, Clef is 2.5x faster than Jev at the median and Clef-flash is 13x faster. Latency looks like this:
- Median: Clef 209.3 ms, Clef-flash 38.8 ms, Jev 524.1 ms
- p95: Clef 238.6 ms, Clef-flash 122.4 ms, Jev 536.0 ms
Cloudflare is also launching a reinforcement learning (RL) fine-tuning service to tune Clef for your own workloads, and is looking for design partners.
Wrap-up
- Clef and Clef-flash, Cloudflare's first in-house models, arrive on Workers AI
- Decision models return probabilities for allowed answers instead of text
- Median latency is 209.3 ms for Clef and 38.8 ms for Clef-flash
- Weights are open under Apache 2.0 on Hugging Face
- An RL fine-tuning service is open to design partners
This is great if you want low-latency routing or blocking decisions in your agents!