Clef ships a decision model you can fine-tune
Cloudflare released Clef decision models with typed classification, open weights and a hands-on fine-tuning service.
Cloudflare has released two decision models, Clef and Clef-flash, on Workers AI and published their weights on Hugging Face under the Apache 2.0 license. The company is also offering customers a hands-on service to fine-tune Clef for specific workloads. A self-service training platform is planned for later.
A decision model sits at a narrow point in a workflow: it takes some state, evaluates a predefined schema, and returns typed choices with probabilities. A support system could submit a customer message and ask whether it is urgent, which team owns it, and how severe the impact is. Application code can then route the request, escalate it, or send it to a person.
That interface is the useful part. An agent often needs a bounded decision rather than another paragraph of generated text. Clef scores the valid choices in the supplied schema directly. According to Cloudflare, its inference path runs a prefill-only pass through a Qwen backbone, then evaluates the schema choices in parallel. The decision step is non-autoregressive, so the model does not spend time producing intermediate text token by token.
Cloudflare says Clef uses frozen Qwen3.8-27B as its backbone, while Clef-flash uses Qwen3.5-9B. The company trained a routing head and rank-256 low-rank adapters, using label-smoothed cross-entropy for valid schema outputs and Brier loss for probability calibration. Its Reinforcement Learning for Calibrated Decisions objective gives partial credit to adjacent ordinal choices, rewards precise record outputs, and applies a reference penalty intended to limit distribution shift.
Bounded output in the agent hot path
Clef is Jev API-compatible and produces strictly typed output. Clef is positioned as the higher-precision model; Clef-flash is intended for latency-sensitive decisions. Cloudflare says Clef has a 64k context window, compared with the 32k context it reports for Jev, and includes a vision encoder for classifying images.
Cloudflare tested Clef in a threat-intelligence workflow that used Browser Run to fetch and render a domain before classification. The model returned several category probabilities in 2.2 seconds. In the same workflow, Cloudflare says gpt-oss-120b took 4.7 seconds and returned two classifications. That is one vendor-run example, but it shows the intended deployment pattern: place a small, schema-bound evaluator where an agent needs to choose a route, then reserve a general model for open-ended reasoning, generation, or tool use.
Typed output removes a chunk of parsing and validation work. Authorization policy remains separate from a model’s probability. A production caller still needs thresholds, an abstention path, and ordinary policy enforcement around whatever action follows. For a security-sensitive route, log the model version, schema version, input provenance, returned probabilities, threshold, and resulting action. Those records make it possible to reproduce a decision and detect changes after a model or policy update.
The schema deserves the same care as an API contract. Overlapping choices produce ambiguous policy, and an exhaustive-looking list can hide the absence of a safe fallback. Evaluate the whole workflow on representative data, including adversarial and low-confidence inputs. Measure calibration as well as top-choice accuracy, because automation depends on whether a reported probability is useful at the threshold your code applies.
Fine-tuning is a service first
Cloudflare’s fine-tuning offer currently starts with its forward-deployed engineering team. That team will help customers fine-tune Clef for specific workloads. The planned self-service system is meant to cover data capture, training, and redeployment, but Cloudflare describes that platform as future work.
The proposed pipeline joins existing and work-in-progress Cloudflare services. AI Gateway captures request and response traffic into a dataset. Workers AI generates rollouts from the base model. Containers provide a sandbox for scoring and replaying actions. A new Trainer component updates the fine-tuned weights, and Workers AI with Bring Your Own Model redeploys them.
That pipeline makes data handling part of the model design. Training examples need stable labels, explicit retention rules, and review for secrets or customer data before captured traffic becomes a dataset. Split evaluation data from training data, preserve a base-model benchmark, and test the tuned model against the exact schemas used in production. Cloudflare notes that specialization can trade general-purpose performance for higher accuracy in one domain, so a tuned checkpoint should have a scoped deployment rather than silently replacing the generic model everywhere.
For hosted inference, Cloudflare says it does not read, store, or train on requests or responses unless the customer chooses the fine-tuning product. Teams that need another deployment boundary can run the Apache-licensed weights locally. Either route still needs an evaluation set drawn from the intended workload; benchmark leadership and vendor latency numbers cannot select an operating threshold for someone else’s traffic.
Keep Reading
NorthflankNorthflank Breach Exposes AI API Keys
Northflank warned customers to rotate stored secrets after a breach led to reported unauthorized use of AI API keys.
decision modelsClef classifies a domain in 2.2 seconds, and its weights are public
Cloudflare's open-weight Clef decision model classifies a domain in 2.2 seconds, and open weights hand its evaluation function to whoever you're classifying.
AI agentsYour decisioning problem isn't accuracy.
Ollaya shows why agent decision models should be selected by calibration, latency, error costs and deployment constraints, not accuracy alone.
Latest on the Wire
Full wire →- Anthropic's 2028 Power Mix: 87% Gas, 11% CoalHacker News
- Cleverbridge Data Breach Exposes Payment Card Details, CVVsBleepingComputer
- Fast-Anything: Port only slow code to Rust for performance gainsHacker News
- FBI investigates apparent breach of criminal databaseHacker News
New signal daily · RSS
Stay in the loop
New writing delivered when it's ready. No schedule, no spam.