File size: 25,395 Bytes
be3ecc8 3b29689 be3ecc8 3b29689 be3ecc8 3b29689 be3ecc8 3b29689 be3ecc8 3b29689 be3ecc8 3b29689 be3ecc8 3b29689 be3ecc8 8db0fdb be3ecc8 8db0fdb be3ecc8 3b29689 be3ecc8 aa8c051 be3ecc8 aa8c051 be3ecc8 aa8c051 be3ecc8 aa8c051 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | {
"schema_version": "5.1",
"name": "clef",
"tt_metal_version": "0.65.2.dev10918",
"arch": "blackhole",
"device_count": 2,
"producer": {
"tt_kernel_version": "0.1.0",
"created_at": "2026-10-06T14:16:58.486489+00:00",
"hostname": "qb2-120-p11t02"
},
"weights": {
"repo_id": "Cloudflare/clef",
"revision": "2f3de3dd85f379784083b0814d997ab627200f0c",
"allow_patterns": null,
"ignore_patterns": null,
"repo_type": "model"
},
"mesh": null,
"entrypoint": null,
"resources": null,
"capabilities": null,
"env": {},
"bundled": null,
"deps": null,
"container": {
"image": {
"registry": "hf",
"repository": "clef",
"tag": "tt-model/clef:2241a811ee93",
"digest": "sha256:2241a811ee93f8543bc77dcdfeb02210bebcb4a112b07bd87bd7a9d2bc9d1310"
},
"kind": "tt-dit-server",
"runtime": {
"app": "models.autoports.cloudflare_clef.tt.server:app",
"mesh_shape_env": "CLEF_MESH_SHAPE",
"packages": [
"fastapi==0.142.2",
"uvicorn==0.54.0",
"pydantic==2.9.2",
"pillow==12.3.0",
"numpy==1.26.4",
"transformers==5.12.1",
"tokenizers==0.22.2",
"safetensors==0.8.0",
"huggingface_hub==1.16.1",
"tqdm==4.66.3",
"av==19.0.1",
"torchvision==0.26.0+cpu"
],
"lock": "requirements.lock"
},
"serve": {
"hardware": null,
"mesh_device": null,
"port": 8008,
"max_model_len": null,
"max_num_seqs": null,
"block_size": null,
"server_timeout": null,
"capabilities": null,
"additional_config": {},
"args": [],
"env": {
"CLEF_MAX_STATE": "16384",
"CLEF_PREFIX_CACHE": "4",
"CLEF_TRACED": "0",
"CLEF_PLANNER": "1"
}
},
"serve_profiles": [
{
"hardware": "p150x2",
"mesh_device": "P150x2",
"port": null,
"max_model_len": null,
"max_num_seqs": null,
"block_size": null,
"server_timeout": null,
"capabilities": null,
"additional_config": {},
"args": [],
"env": {},
"name": "p150x2",
"description": "Two p150-class Blackhole chips (two p150 boards, or one p300 board) opened as a 1x2 mesh, tensor parallel 2 (TP=2), one worker. CLEF_MESH_SHAPE is 1x2."
}
],
"default_profile": "p150x2",
"code_dir": "code",
"verify": [
"import models.autoports.cloudflare_clef.tt.server as s; assert s.app",
"from models.autoports.cloudflare_clef.tt.engine import ClefEngine; assert ClefEngine",
"from models.autoports.cloudflare_clef.tt.head import JointSchemaHead, load_head; assert JointSchemaHead and load_head",
"from models.autoports.cloudflare_clef.tt.loader import ClefModelArgs, LmHeadRows; assert ClefModelArgs and LmHeadRows",
"from models.autoports.cloudflare_clef.tt.encode import encode, split_for_cache, cache_key; assert encode and split_for_cache and cache_key",
"from models.autoports.cloudflare_clef.tt.server import parse_mesh_shape; assert parse_mesh_shape('1x2', 'P150x2') == (1, 2)",
"from models.autoports.cloudflare_clef.tt.server import parse_mesh_shape, mesh_plan; assert mesh_plan((1, 2), 2) == {'fabric': 'FABRIC_1D', 'open': (1, 2), 'submeshes': [], 'parent': None}; assert mesh_plan((1, 2), 4)['parent'] == '1x4'",
"from models.autoports.cloudflare_clef.tt import precision_defaults; assert precision_defaults.profile_name() == 'selected'; assert precision_defaults.profile()['QWEN36_MLP_GATE_UP_DTYPE'] == 'bfp8'",
"from models.demos.blackhole.qwen36.tt.vision.model import DropInVisionTransformer; from models.demos.blackhole.qwen36.tt.vision.vision_model_config import VisionModelArgs; assert DropInVisionTransformer and VisionModelArgs",
"from models.tt_dit.utils.tensor import prepare_for_fused_swiglu; assert prepare_for_fused_swiglu",
"from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor; assert Qwen3_5ForConditionalGeneration and AutoProcessor",
"from transformers.models.qwen3_vl.processing_qwen3_vl import Qwen3VLProcessor; from transformers.models.qwen2_vl.image_processing_qwen2_vl import Qwen2VLImageProcessor; from transformers.models.qwen3_vl.video_processing_qwen3_vl import Qwen3VLVideoProcessor; import torchvision, av, PIL; assert Qwen3VLProcessor and Qwen2VLImageProcessor and Qwen3VLVideoProcessor",
"from safetensors.torch import load_file; from huggingface_hub import snapshot_download; assert load_file and snapshot_download"
],
"built": {
"image": "tt-model/clef:2241a811ee93",
"repo": "tt-hous/clef",
"tt_model_version": "0.1.0",
"created_at": "2026-10-06T14:13:56+00:00",
"tt_metal": {
"sha": "c72c144e6e4d4cb1a29ee827cfb98d66b9883c30",
"describe": "v0.79.0-dev20260905-1214-gc72c144e6e",
"dirty": true,
"scm_version": "0.65.2.dev10918",
"mode": "local",
"remote": "git@github.com:housTT/tt-metal.git",
"branch": "hous/clef-bringup",
"pushed": true
},
"code_sha256": "f2f49abe472ac6d36f700fd779daab586ff01b9e979651917a57989025090a59",
"image_digest": "sha256:2241a811ee93f8543bc77dcdfeb02210bebcb4a112b07bd87bd7a9d2bc9d1310"
},
"card": {
"description": "Clef is a 27B-parameter multimodal decision model from Cloudflare: a Qwen3.8-27B backbone (64 layers, 48 Gated DeltaNet and 16 full-attention, hidden size 5120) with its 27-block vision tower, and a 65M-parameter joint schema head. It reads one state (text, JSON, images or video) and a schema of typed questions (choice, score, noul) and returns a probability for every allowed option of every question in one forward pass. It generates no text. This package serves it through the model's own FastAPI server, which implements the Jev/SystemOne API (`POST /v1/systemone`), so SystemOne clients work against it unchanged. The weights pointer covers everything the server loads: the backbone shards, the vision encoder, the joint schema head (`joint_head.safetensors`), the tokenizer and processor configuration, and the author's `joint_schema_model.py`.",
"attribution": "Serves [Cloudflare/clef](https://huggingface.co/Cloudflare/clef) by Cloudflare at revision 2f3de3dd, post-trained from [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B). See the original model card for training and evaluation details.",
"quickstart": "A browser demo and a command-line client ship in `code/models/autoports/cloudflare_clef/demo/` of this repo (inside the image at `/opt/tt-metal/models/autoports/cloudflare_clef/demo`). With the server up on the port your serve command reported:\n\n```bash\nhf download tt-hous/clef --include \"code/models/autoports/cloudflare_clef/demo/*\" --local-dir clef-pkg\ncd clef-pkg/code/models/autoports/cloudflare_clef/demo\nDEMO_BIND=0.0.0.0 ./run.sh http://<server-host>:<port>\n```\n\nOpen `http://<demo-host>:8080/#server=http://<server-host>:<port>`. The page sends `POST /v1/systemone` from the browser and draws every option probability: a support-triage preset, the invoice JSON state from the upstream card, a repeated-state preset that shows the prefix cache, two New Yorker cartoons and a synthetic receipt as image requests, and a replay of 24 labelled records (ARC-Challenge, BANKING77, New Yorker) with running accuracy. Against this package every preset answers (8 of 8) and the replay scores 22 of 24.\n\nThe CLI needs only Python 3: `python3 quickstart.py --all` sends every preset, `--replay` runs the labelled replay, `--preset \"<title>\"` sends one, `--show-request` prints the request bodies without sending them, and `--server` points it at another host. Presets live in `presets.json`, shared by the page and the CLI.",
"intended_use": "Typed decisions over a state of up to 16,384 tokens, with or without images (classification, routing, triage, intent detection, extraction choices, policy and eligibility checks, multiple-choice reading comprehension, judging an answer against stated criteria, matching a caption or label to an image), in workflows that act on confidence with thresholds set on a labelled sample of your own data.",
"usage": "### Request shape\n\nA request has `model`, `state` (any string or JSON value), `questions` (question id to question), and optional `images` and `videos`. A question has `type` (`noul`, `choice` or `score`), optional `instructions`, and `criteria` (a mapping of option id to description for `choice`, a list of ordered option descriptions for `score`, optional `true` and `false` descriptions for `noul`). Each image is base64-encoded image bytes (a bare string or a `data:image/...;base64,` URL) or an http(s) URL; each video is a list of frames in the same encodings. No API key is checked unless the server was started with `CLEF_API_KEY`.\n\nText example (the Jev/SystemOne example of the upstream model card), with `<port>` the port your serve command reported:\n\n```bash\ncurl -s http://127.0.0.1:<port>/v1/systemone -H 'content-type: application/json' -d '{\n \"model\": \"clef\",\n \"state\": \"Our checkout started returning errors and orders are blocked.\",\n \"questions\": {\n \"department\": {\"type\": \"choice\", \"instructions\": \"Which team should handle the message?\",\n \"criteria\": {\"billing\": \"Payments or invoices\", \"technical\": \"Bugs or outages\"}},\n \"urgency\": {\"type\": \"score\", \"criteria\": [\"Can wait\", \"This week\", \"Today\"]},\n \"outage\": {\"type\": \"noul\", \"instructions\": \"Is a service down?\"}\n }\n}'\n```\n\nThe same request, and an image request, from Python:\n\n```python\nimport base64\nimport requests\n\nURL = \"http://127.0.0.1:<port>/v1/systemone\"\n\ntext = requests.post(URL, timeout=300, json={\n \"model\": \"clef\",\n \"state\": \"Our checkout started returning errors and orders are blocked.\",\n \"questions\": {\n \"department\": {\"type\": \"choice\", \"instructions\": \"Which team should handle the message?\",\n \"criteria\": {\"billing\": \"Payments or invoices\", \"technical\": \"Bugs or outages\"}},\n \"urgency\": {\"type\": \"score\", \"criteria\": [\"Can wait\", \"This week\", \"Today\"]},\n \"outage\": {\"type\": \"noul\", \"instructions\": \"Is a service down?\"},\n },\n}).json()\nprint(text[\"answers\"][\"department\"][\"choice\"], text[\"answers\"][\"urgency\"][\"score\"], text[\"answers\"][\"outage\"][\"noul\"])\n\nwith open(\"receipt.jpg\", \"rb\") as f:\n image_b64 = base64.b64encode(f.read()).decode()\nimage = requests.post(URL, timeout=300, json={\n \"model\": \"clef\",\n \"state\": {\"task\": \"Review the attached receipt.\"},\n \"images\": [image_b64],\n \"questions\": {\"legible\": {\"type\": \"noul\", \"instructions\": \"Is the receipt total legible?\"}},\n}).json()\nprint(image[\"answers\"][\"legible\"][\"noul\"], image[\"usage\"][\"input_tokens\"], image[\"latency_ms\"])\n```\n\n### Response shape\n\nThe response body is the one the author's `joint_schema_model.systemone()` returns (`model`, `answers`, `usage`) plus `latency_ms`. Answer shapes follow the upstream `systemone()`: `choice` has `choice`, `confidence` and `probabilities`; `noul` has `noul` (the probability of true); `score` has `score`, `confidence`, `legend` and `probabilities`. For the text example above this package answers `department` = technical (probability 0.9138), `urgency` score 1.83 (`Today` at 0.8706) and `outage` noul 0.9011, with 300 input tokens and about 270 ms of model time; the author's code on CPU (bf16) answers technical (0.9155), 1.82 (`Today` at 0.8651) and 0.8995 with the same 300 input tokens.\n\n### Routes\n\n| Route | Body |\n|---|---|\n| `POST /v1/systemone` | `{\"model\", \"answers\", \"usage\": {\"input_tokens\", \"output_tokens\"}, \"latency_ms\"}` |\n| `GET /v1/models` | One entry per served name (`clef`) with the weights revision, device, engine mode, the limits and the prefix-cache counters. |\n| `GET /health`, `GET /v1/health` | `{\"status\": \"ok\", \"workers\", \"queued\"}`. Never behind the API key. |\n\nA state over `CLEF_MAX_STATE` tokens, or a schema over `CLEF_MAX_TAIL` tokens, returns 422 with the token count. A request whose questions have no criteria (other than `noul`) returns 422, as the upstream `systemone()` raises. In the traced opt-in mode (below) an image grid outside the warm list, or a request with more than one image or video, returns 422.\n\n### Server environment\n\nThe defaults below are the shipped configuration (eager engine, prefix planner on), the one every number under Expected performance was measured with. `tt-model serve` has no flag for extra environment variables; to change one, run the image with `docker run --env`.\n\n| Variable | Default | Meaning |\n|---|---|---|\n| `HF_MODEL` | `Cloudflare/clef` (set by tt-model) | Hub id or snapshot directory of the weights. |\n| `CLEF_REVISION` | `2f3de3dd85f379784083b0814d997ab627200f0c` | Revision used when the model id has no `@rev`. |\n| `HF_HUB_OFFLINE` | unset | `1` resolves Hub ids from the local cache only. |\n| `CLEF_MAX_STATE` | `16384` | Limit for the state piece (system prompt and media placeholder tokens included); the upstream `encode_record` limit. Longer states return 422. |\n| `CLEF_MAX_TAIL` | `4096` | Limit for the schema plus the suffix. Longer schemas return 422. |\n| `CLEF_TRUNCATE_STATES` | `0` | `1` keeps the first `CLEF_MAX_STATE` tokens instead of refusing, and marks the response. |\n| `CLEF_PREFIX_CACHE` | `4` | States kept in the prefix cache; `0` disables the cache. |\n| `CLEF_PLANNER` | `1` | The prefix planner picks the cached prefix length so a cache miss takes the fewest prefill passes; `0` restores the fixed 128-aligned rule. |\n| `CLEF_TRACED` | `0` | `0` is the shipped eager engine: any image grid, any number of images or videos per request. `1` is the traced opt-in for a fixed set of image grids: it needs `CLEF_VISION_WARM_GRID`, refuses an image or video whose grid is not in that list and a request with more than one image or video (422), and reserves `CLEF_TRACE_REGION` of DRAM. It gains 0 to 3 percent of latency. |\n| `CLEF_VISION_WARM_GRID` | unset (required when `CLEF_TRACED=1`) | `;`-separated `t,h,w` patch grids the traced server warms and then accepts, for example `1,16,20;1,22,38;1,26,36;1,28,36;1,28,38;1,40,50;2,16,20`. Ignored in eager mode. |\n| `CLEF_TRACE_REGION` | `1073741824` when `CLEF_TRACED=1`, else `0` | Trace region size for the device. |\n| `CLEF_API_KEY` | unset | Bearer key for `/v1/*` (health routes stay open). |\n| `CLEF_ALLOW_REMOTE_IMAGES` | `1` | `0` refuses http(s) image URLs with 422. Fetches use a 10 s timeout and a 20 MiB cap. |\n| `CLEF_MODEL_NAMES` | `clef` | Comma-separated names listed by `/v1/models` and accepted in `model`. |\n| `CLEF_WARMUP` | `1` | `0` skips the warmup request per worker at startup. |",
"performance": "### Evaluations\n\n| eval (test split) | this package | reference (Cloudflare/clef card) | items |\n|---|---:|---:|---|\n| ARC-Challenge, accuracy | 97.8 | 97.7 | 1,172 |\n| BANKING77, macro-F1 over 77 intents | 94.4 | 94.2 | 3,080 |\n| New Yorker caption matching (image, 5 captions), accuracy | 58.3 | 69.5 | 528 |\n\nPublic benchmarks rendered once to SystemOne requests (no prompt tuning, no option dropping) and run against this server on profile `p150x2`; coverage is complete on every file (0 rejected, 0 truncated, 0 unanswered). The reference figures are the Decision Index results on the Cloudflare/clef model card, whose request renderings are not public.\n\nThe same rendering on a stratified 100-item sample of each benchmark, this package against the author's own `joint_schema_model.py` on CPU in bf16 (same metric as above):\n\n| 100-item sample | this package | CPU bf16 |\n|---|---:|---:|\n| ARC-Challenge | 96.0 | 95.0 |\n| BANKING77 (macro-F1) | 91.1 | 91.1 |\n| New Yorker | 60.0 | 60.0 |\n\nOn ARC one argmax differs between the two (reference top-2 margin 0.37); on BANKING77 none (2 near ties).\n\nKev's labelled suites (`hard-v1`, `devtools-v1` and `documents-v1` test splits, SystemOne requests, `kev.benchmark --remote`, `clean` block): accuracy, Brier, and ECE (expected calibration error, 10 bins on the top probability); coverage complete. The Cloudflare/clef card publishes no figure for these suites.\n\n| suite (test split) | questions | accuracy | Brier | ECE | reference |\n|---|---:|---:|---:|---:|---:|\n| hard-v1 | 1,088 | 0.774 | 0.321 | 0.044 | \u2014 |\n| devtools-v1 | 1,073 | 0.741 | 0.399 | 0.143 | \u2014 |\n| documents-v1 | 936 | 0.893 | 0.169 | 0.044 | \u2014 |\n\nThe same requests against [tt-hous/kev-9b](https://huggingface.co/tt-hous/kev-9b) on one p150 score 0.826 / 0.787 / 0.896 accuracy (ECE 0.053 / 0.101 / 0.015); these suites are Kev-9B's own development distribution.\n\n### Latency\n\nProfile `p150x2` (the only profile). Latency is the server's `latency_ms`: the model section of the request on its worker thread (state prefill or cache restore, schema continuation, vision tower when images are present, joint schema head on the host), without queue wait and HTTP. \"New state\" is a prefix-cache miss; \"repeated state\" is a hit (the KV pages and the Gated DeltaNet state of the slot are restored, then the schema tail runs). A state under 128 tokens has no cached prefix, so the two are equal by construction for short states.\n\n| request | state | N | median, new state (ms) | median, repeated state (ms) | p95 (ms) |\n|---|---|---:|---:|---:|---:|\n| 6 questions | short (122 tokens with the system prompt) | 20 | 412.6 | 410.4 | \u2014 |\n| 5 questions | 2,200 tokens | 20 | 1,231.2 | 533.8 | \u2014 |\n| 3 questions | 346-token blog triage state | 20 | 268.2 | 265.0 | \u2014 |\n| 2 questions | short | 20 | 267.9 | 257.8 | \u2014 |\n| 5 questions | 370 tokens | 20 | 426.0 | 423.1 | \u2014 |\n| 1 image (320 patches) and 5 candidate captions | 330 tokens | \u2014 | 497.7 | 237.1 | \u2014 |\n\nA request costs about 220 ms of fixed work plus about 0.35 s per 1,024-token chunk of prefill; a 16,384-token state (the limit) takes 7,471.8 ms on a miss and 1,600.0 ms on a hit. Over the 8 reference image records (320 to 2,000 patches) the median is 551 ms. The largest image run end to end is 57,344 patches ((1, 224, 256), 3584 x 4096 pixels, 14,336 image tokens): 33.2 s per request warm; a 2048 x 2048 image (16,384 patches, 4,096 tokens) takes 5.7 s. Above 4,096 patches the vision tower time grows about quadratically.\n\nThroughput: 2.36 requests/s at 64 concurrent clients for the 6-question short-state case (256 requests over 64 distinct states per client level at 1, 8, 32 and 64 clients, two passes, the second timed); it is flat in the client count (2.35 to 2.36 requests/s) because requests are served one at a time, and the queue wait grows linearly with the clients. 64 distinct new 2,200-token states give 0.81 requests/s.\n\nMeasured on 2026 Oct 05 on two Blackhole chips of one p300 board (profile `p150x2`, the shipped configuration: eager engine, prefix planner on) with the port's `scripts/serving_bench_remote.py` over HTTP; latency rows are medians of 20 requests after 2 warm-up requests. Precision: bfp8 weights for the MLP gate and up projections and for the attention and Gated DeltaNet projections, bf16 MLP down weights, bf16 KV cache and embeddings, fp32 Gated DeltaNet recurrent state and decay gate, vision tower in bf16 with fp32 accumulation, joint schema head in fp32 on the host.\n\n### Parity against the author's CPU reference\n\nOver HTTP against the served package. Max dp is the largest absolute difference of an option probability; flips are argmax changes at a reference top-2 margin of at least 0.05.\n\n| set | questions | max dp | flips at margin | reference |\n|---|---:|---:|---:|---|\n| 16 reference text records | 27 | 0.072 (mean 0.011) | 0 | CPU bf16 |\n| same 16 records | 27 | 0.076 (mean 0.010) | 0 | CPU fp32 |\n| 8 reference image records | 8 | 0.046 (mean 0.020) | 0 | CPU bf16 (0.038 against fp32) |\n| 100 BANKING77 rows (1,824 to 1,871 tokens) | 100 | 0.110 | 0 (2 near ties) | CPU bf16 |\n| 8 long records, 2,637 to 16,384 tokens | 32 | 0.056 | 0 | CPU bf16 |\n| 64 development text records | 95 | 0.192 | 1 (margin 0.17, dp 0.10) | CPU bf16 |\n| 16 development image records | 16 | 0.175 | 0 | CPU bf16 |\n\nVision tower parity against the HF `model.visual` on CPU on the 4 reference images: merged-output PCC 0.99880, 0.99822, 0.99909 and 0.99898; the 4-frame video record 0.99839.",
"limitations": "- Tested on two Blackhole chips of one p300 board (profile `p150x2`, the only profile) only. English only: the benchmarks above are English and other languages were not evaluated. The Decision Index of the upstream card was not reproduced; its request data is not public.\n- Not for text generation, chat, summarisation or open-ended question answering: the model only scores the options it is given. Not for fully automated decisions with legal, medical, financial, employment or similar consequences for people without human review. The SystemOne `permute` and `separate` routes are not served.\n- Requests are served one at a time: 2.36 requests/s for short states and 0.81 for new 2,200-token states at any client count, and the queue wait grows linearly with the number of clients (27 s at 64 clients).\n- Startup takes 106 s on every start (mesh open 4 s, weights converted from the safetensors and the model built in 100.6 s, one warmup request); no tensor cache is written.\n- A state over `CLEF_MAX_STATE` tokens (16,384, the upstream `encode_record` limit) or a schema over `CLEF_MAX_TAIL` (4,096) returns 422 instead of the upstream silent truncation (`CLEF_TRUNCATE_STATES=1` opts into truncation). The 262,144-token context the HF config advertises is not served.\n- A few confident decisions per thousand move by up to 0.3 in probability against the author's CPU reference: on a 200-record development set 274 of 278 argmaxes agree and accuracy is within 0.36 pp, but two questions move by 0.33 and 0.47 while the reference is confident; over all parity sets there is one argmax flip at a reference margin of at least 0.05 (margin 0.17). One development image record moves by 0.175 with the argmax kept.\n- Images run through the on-device vision tower in bf16. The largest image run end to end is 57,344 patches (3584 x 4096 pixels, 14,336 image tokens, 33 s per request); above 4,096 patches the vision tower time grows about quadratically. The first image of a patch grid the box has not seen compiles once (1 to 2 s at up to 2,048 padded rows, 6 to 9 s at 4,096, 26 s at 57,344); the kernel cache under `~/.cache/tt-model/clef/cache` persists across container restarts. Images and videos are not accepted together in one request (one media kind per request).\n- Traced mode (`CLEF_TRACED=1`) needs `CLEF_VISION_WARM_GRID`, refuses image grids outside that list and more than one image or video per request (422), reserves a 1 GiB trace region, and gains 0 to 3 percent.\n- The prefix cache holds `CLEF_PREFIX_CACHE` states (4 at the 16,384-token limit); only the 128-aligned state prefix is cached, the schema always runs, and a state under 128 tokens is never cached. The joint schema head runs on the host CPU over every row of the record, so the host part grows with the state length (a 16,384-token cache hit takes 1,600 ms).\n- Option order can change an answer. Knowledge is set by the base model.\n- Calibrated probabilities can create unwarranted trust: measure accuracy and calibration on a labelled sample of your own data before setting thresholds, and monitor error rates in production.\n- The server is open unless `CLEF_API_KEY` is set and fetches http(s) image URLs unless `CLEF_ALLOW_REMOTE_IMAGES=0`; states, images and videos may contain personal or confidential data, so put the server behind your own access control and do not expose it to untrusted networks without a proxy.",
"licensing": "Cloudflare/clef (backbone, vision encoder, joint schema head and `joint_schema_model.py`) is released under Apache-2.0; its model card states the base model Qwen/Qwen3.8-27B is Apache-2.0. The serving code under `code/` is tt-metal (Apache-2.0) plus the Clef port under `models/autoports/cloudflare_clef` (Apache-2.0, see its NOTICE), which vendors the joint schema head classes from `joint_schema_model.py` and reuses serving code from the Apache-2.0 kev project. The browser demo (in `code/models/autoports/cloudflare_clef/demo`, also inside the image) ships ten New Yorker caption contest cartoons from the jmhessel/newyorker_caption_contest dataset under CC BY 4.0, as its NOTICE states.",
"related": "Upstream model card: https://huggingface.co/Cloudflare/clef. Announcement: https://blog.cloudflare.com/clef-decision-models. Decision Index leaderboard: https://clef-evals.workers-ai-mle.workers.dev. The smaller variant Cloudflare/clef-flash is not packaged. The same serving pattern on one Blackhole chip: [tt-hous/kev-9b](https://huggingface.co/tt-hous/kev-9b).",
"license": {
"id": "apache-2.0"
},
"pipeline_tag": "image-text-to-text",
"base_model": [
"Cloudflare/clef",
"Qwen/Qwen3.8-27B"
]
}
}
}
|