Clef
multimodal model for automated business decision-making
2 min read
Clef is a 27-billion-parameter multimodal model built on Qwen/Qwen3.8-27B. It takes text, JSON, images, or video along with a schema of typed questions and outputs probabilities for each valid option in a single pass. A key feature of the model is that it skips free-form text generation and response parsing. It is designed to automate business workflows, process invoices, handle customer support, and triage incidents.
Key features
- Built on the capable Qwen/Qwen3.8-27B model with a built-in vision encoder.
- Uses a dedicated joint schema head transformer module to score options.
- Supports text, JSON, image, and video inputs for situational analysis.
- Fully compatible with the Jev and SystemOne APIs for workflow integration.
What you can do
- Automate customer support by classifying incoming messages and rating urgency.
- Process invoices and receipts by checking their statuses and extracting key data.
- Analyze security reports and incidents to take rapid action.
- Run inference with SGLang on modern hardware like the H200.
Example
import torch
from huggingface_hub import snapshot_download
path = snapshot_download("Cloudflare/clef")
from joint_schema_model import load_release_model, encode_record, collate_records
model, processor = load_release_model(path, device="cuda")
record = {
"state": {"invoice": {"vendor": "Acme", "total": 1250.0, "currency": "USD", "status": "overdue"}},
"questions": {
"status": {
"type": "choice",
"instructions": "What is the invoice status?",
"criteria": {"paid": "Invoice is paid.", "overdue": "Invoice is past due."},
}
}
}
encoded = encode_record(processor.tokenizer, record, processor=processor)
batch = collate_records([encoded], processor.tokenizer.pad_token_id, torch.device("cuda"))
with torch.inference_mode():
logits = model(batch)[0]
Read more
Details• Architecture: 27.36B parameters, Apache-2.0 license.
• Requirements: tested with torch 2.11 and transformers 5.10.2 on an H200 GPU.
• Performance: median latency on H200 is about 209.3 ms.
• Training details: post-trained on Qwen/Qwen3.8-27B.










Comments