Cloudflare open-sources Clef: fast, cheap Apache-2.0 decision models

Two open models that classify instead of chatting—27B and 9B, Jev-API compatible, from $0.09/M on Workers AI, plus an RL fine-tune path.

Nowline OCT 6 9:00 PM banner

Top AI stories from the last hour

Top AI stories from the last hour

Copy markdown

  • A decision model, not a chatbot

    Clef takes a state plus a schema of typed questions—yes/no, multiple-choice, or 1–N scores—and returns calibrated probabilities over your options, with no free-form text to parse. For routing, triage, or classification inside an agent, you get a structured answer you can branch on directly, over a 64k context and up to 4 images per request.

  • Two sizes, cents on the million

    Clef is 27B (Qwen3.8 backbone); Clef-flash is 9B (Qwen3.5). On Workers AI they run $0.24/M and $0.09/M input with output not billed, and Clef-flash clocks ~39ms median latency. Both ship Apache-2.0 weights on Hugging Face, so you can self-host on a single GPU instead.

  • It speaks Jev's API

    Clef adopts Jev/SystemOne's API format, so code written against Jev ports over with only minor changes (responses wrap under a `result` field). It beats Jev on classification—94.2 vs 79.7 macro-F1 on BANKING77—but trails on reasoning, 65.9 vs 82.7 on MMLU-Pro. Treat it as a fast classifier, not a reasoner.

  • Fine-tune it on your own traffic—with an asterisk

    Cloudflare paired the release with an RL platform that tunes a decision model on your own data, wiring AI Gateway for collection, Workers AI for inference, and Containers for scoring. Today it's a hands-on design-partner engagement with their engineers; self-serve is only 'planned,' so don't architect around it yet.

  • Build it this weekend

    Pull the weights and serve them with vLLM or SGLang for an OpenAI-compatible endpoint, or load them in Transformers for local hacking. Swap your brittle 'ask an LLM for JSON and pray' router for one call that returns probabilities—cheaper and far faster than a frontier model doing the same triage.