Clef: Open-weight decision models, and new RL fine-tuning platform
TL;DR Highlight
Cloudflare releases Jev-compatible decision models Clef and Clef-flash, claiming the top Jev Decision Index spot
Who Should Read
Backend or agent developers who want a cheap classification step ahead of LLM calls for ticket routing or content filtering
Core Mechanics
- A decision model returns classifications with probabilities
- You pass inputs and questions and get typed answers with probabilities.
- Your code uses them to route tickets, escalate, or defer to a human.
- Clef and Clef-flash are Jev API compatible
- Both are hosted on Workers AI and open-weighted on Hugging Face under Apache 2.0.
- Clef is the precision model and Clef-flash is for latency-critical decisions.
- Differences from Jev: images and 64k context
- Clef has a vision encoder and can classify images.
- Its context window is 64k versus Jev's 32k.
- Benchmarks claimed ahead of Jev
- BFCL case exact is 98.47 for Clef versus 95.75 for Jev.
- Clef beat Jev in 3 of 4 areas on Typesafe's own eval suite.
- On When2Call accuracy, Jev leads 80.97 versus Clef's 72.37.
- Faster than gpt-oss-120b on domain classification
- In the Threat Intelligence workflow, Clef took 2.2s to fetch, render and classify.
- gpt-oss-120b took 4.7s in the same workflow and returned only two classifications.
- It scores choices directly instead of generating text
- A Qwen backbone does a prefill-only pass, then scores the valid schema choices in parallel.
- Qwen3.8-27B (Clef) and Qwen3.5-9B (Clef-flash) are frozen, and a routing head plus rank-256 LoRA adapters are trained.
- Fine-tuning starts with hands-on FDE help
- First it is offered with Cloudflare's forward-deployed engineer team.
- A self-serve RL fine-tuning platform comes later.
Community Reactions
- Opinion that it costs more than Jev
- Commenters calculate $0.24 per million input tokens for Clef, about 6x Jev's $0.042.
- Clef-flash at $0.09 is seen as far more competitive.
- Experience that it was slower than Jev
- One test showed clef-flash at 661ms median versus 230ms for Jev.
- A knowledge-base write review test showed hosted p50 of about 850ms for Clef versus about 110ms for Jev, with similar quality (recall 0.98 vs 1.00).
- Experience that quality fell short too
- For hate speech filtering, one user found Clef 2-3x slower and catching less than Jev.
- On coin image classification, an 8-bit quantized Clef scored about 41% versus 53% for local gemma4:27b, which ran 4x faster.
- Open weights, not open source
- One comment says data and training pipeline are not published.
- Another comment says Jev-style models are of little use without fine-tuning because priors can't be passed in.
How to Apply
- Compare Clef latency against your current LLM classifier
- Pick one classification call, such as routing or moderation, and send the same 100 inputs to Clef, Clef-flash and your current model.
- Compare median and p95 latency and accuracy.
- Put the cheap classifier first and the LLM second
- Handle the request directly when the probability is above a threshold and defer to an LLM or a human otherwise.
- Log the fallback rate and error rate to tune the threshold.
- Calculate cost with your own traffic
- Multiply input tokens per call by the price to get the monthly cost.
- If traffic is high, compare against self-hosting the Hugging Face weights.
Try It
# Paste into a shell (based on the article's curl example; fill in your account ID and token)
export CLOUDFLARE_ACCOUNT_ID={{account_id}}
export CLOUDFLARE_AUTH_TOKEN={{token}}
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/cloudflare/clef \
-X POST \
-H "Authorization: Bearer $CLOUDFLARE_AUTH_TOKEN" \
-d '{"model":"clef","state":"Checkout has been failing for every customer for the last hour.","questions":{"urgent":{"type":"noul","instructions":"Is this support request urgent?"},"team":{"type":"choice","instructions":"Which team should handle this request?","criteria":{"billing":"Payments, invoices, and refunds","technical":"Outages, errors, and configuration","sales":"Plans and upgrades"}},"severity":{"type":"score","instructions":"How severe is the customer impact?","criteria":["No impact","Minor","Major","Critical"]}}}'
# Next: replace state with a real inquiry from your service and switch "model" to clef-flash to compare latency.Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls