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.
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
Mercury 3: Diffusion at scale
Scaling diffusion LLM 40x gives Mercury 3: 4–8x faster than speed-tier models, similar quality
Timestral: Mistral's time-series foundation models
A 209M time-series model ranks first on three benchmarks and runs on CPU.
DeepSeek V4.1 Flash 1017 (Max)
DeepSeek V4.1 Flash 1017 Max scores 45 on the Intelligence Index at 211 tok/s and $0.30 input.
If you don't run your own LLM proxy, how do you know whats going on?
Running your own LLM proxy shows which keys, models, and cache misses drive your usage.
DeepSeek: DeepSeek v4.1 Flash 1017
DeepSeek V4.1 Flash 1017: $0.05/M input, 1M context, built for agents
DeepSeek-v4.1-Flash-1017
DeepSeek V4.1 Flash minor update lifts coding and agent benchmarks while cutting run time and output length
Show HN: Llmspeed – feel how fast a local LLM runs before you buy the hardware