alt.freeweights.text / clef-flash-4bit
From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.textSubject:

clef-flash-4bit

Date: 2026-11-15Commit: b5adbe2Signed: 2DC28CC7B26A283B ✓

Zero shot classification model with 9.4B parameters. Safetensors weights, 6.21 GB in all. Published by mlx-community under Apache-2.0.

9.4B params6.21GBclef-flash-4bitsafetensorspermissive
FactsParams9.4BSize6.21 GBFormatssafetensorsTaskzero shot classificationLicenseApache-2.0From sourcepermissive
$ fw get mlx-community/clef-flash-4bit
# manifest sha256 327585128f05… · 6.21 GB · 17 files
$ fw verify ./clef-flash-4bit mlx-community/clef-flash-4bit
From sourceHosted (signed)mlx-community/clef-flash-4bitLast check: 2026-11-15 04:56 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of clef-flash.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
6.21 GB
Weights
6.19 GB (safetensors)
Parameters
9.4B
Formats
safetensors
Task
zero shot classification
License
Apache-2.0 (permissive)
Files
17, each with a sha256
Publisher
mlx-community
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Base model: Cloudflare/clef-flash

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:56 UTCpassed

Model card

From the publisher at commit b5adbe2. Shown as plain text with links; images open at the publisher.

mlx-community/clef-flash-4bit#

Cloudflare/clef-flash converted to MLX (4-bit) for Apple Silicon.

Clef turns a state (text, JSON, images, or video) plus a schema of typed questions into a probability for every allowed option, in a single forward pass. It is not a chat model — mlx_vlm.generate, mlx_lm.generate, and LM Studio will load the backbone but produce meaningless text. Use the bundled clef_mlx.py loader, which runs the backbone and the joint schema head.

Which variant fits your Mac?#

VariantBaseDownloadPeak memory (1k / 4k / 16k tokens)Latency (1k / 16k tokens)Minimum Mac RAM
clef-flash-4bit (this repo)9B6.2 GB7.0 / 7.2 / 8.6 GB0.31 s / 7.0 s16 GB
clef-flash-8bit9B10.7 GB11.4 / 11.6 / 13.0 GB0.34 s / 7.7 s24 GB (16 GB for short prompts)
clef-4bit27B16.3 GB17.1 / 17.5 / 19.6 GB1.4 s / 26.0 s32 GB
clef-8bit27B29.8 GB30.5 / 30.8 / 33.0 GB1.5 s / 32.0 s48 GB

Measured on an M5 Max with text input. macOS lets the GPU use only about 70–75% of RAM by default, so the minimum RAM is higher than the peak. The 9B variants are much faster; the 27B variants score higher (see the quality check below).

Usage#

pip install "mlx-vlm>=0.7.4,<0.8" huggingface_hub   # no torch needed

Tested with mlx 0.32.3, mlx-lm 0.32.0 and mlx-vlm 0.7.4. clef_mlx.py uses mlx-vlm internals, so it warns if you load it with an untested mlx-vlm minor version.

import sys
from huggingface_hub import snapshot_download

path = snapshot_download("mlx-community/clef-flash-4bit")
sys.path.insert(0, path)
import clef_mlx

model = clef_mlx.load(path)
response = model.systemone({
    "model": "clef-flash",
    "state": "Our checkout started returning errors and orders are blocked.",
    "questions": {
        "department": {
            "type": "choice",
            "instructions": "Which team should handle the message?",
            "criteria": {"billing": "Payments or invoices", "technical": "Bugs or outages"},
        },
        "urgency": {"type": "score", "criteria": ["Can wait", "This week", "Today"]},
        "outage": {"type": "noul", "instructions": "Is a service down?"},
    },
})
print(response["answers"])

Images (PIL) and videos (frame arrays) go in images / videos, as in the original:

from PIL import Image
model.predict({
    "state": {"task": "Review the attached receipt."},
    "images": [Image.open("receipt.jpg")],
    "questions": {"legible": {"type": "noul", "instructions": "Is the receipt total legible?"}},
})

See the original model card for the input format, question types, and benchmarks.

Try it from the command line#

clef_mlx.py runs on its own. From the downloaded repo it uses that repo by default; elsewhere pass --model mlx-community/clef-flash-4bit.

cd "$(hf download mlx-community/clef-flash-4bit --quiet)"
python clef_mlx.py predict \
  --state "Checkout has been failing for every customer for the last hour." \
  --questions '{"urgent": {"type": "noul", "instructions": "Is this urgent?"},
               "team": {"type": "choice", "criteria": {"billing": "Payments", "technical": "Outages and errors"}}}'

--questions takes JSON, a .json file, or - for stdin; --request takes a whole request body instead; --image photo.jpg attaches an image (repeatable). The output is the SystemOne response as JSON.

Run a local SystemOne server#

python clef_mlx.py serve --port 8000          # http://127.0.0.1:8000, local only by default
curl http://127.0.0.1:8000/v1/systemone -H "Content-Type: application/json" -d '{
  "model": "clef-flash",
  "state": "Checkout has been failing for every customer for the last hour.",
  "questions": {"urgent": {"type": "noul", "instructions": "Is this urgent?"}}
}'
  • POST /v1/systemone takes the same request body as the Jev/SystemOne API and returns the same response (plus usage.latency_ms), so existing SystemOne clients can point at your laptop. GET /health and GET /v1/models are also available.
  • Images go in images as data URLs, base64, or http(s) URLs. Videos aren't supported over HTTP.
  • Errors return JSON: 400 for invalid requests, 413 with "maximum context length" for inputs that don't fit. Add "truncate": false to a request (or start with --no-truncate) to get the 413 instead of truncation.
  • Requests run one at a time on the GPU. There is no authentication: keep the default 127.0.0.1 binding unless you put your own proxy in front.
  • For the Decision Index, start with --no-truncate and use its http engine: python -m decision_index run --engine http --option base_url=http://127.0.0.1:8000.

Limitations#

  • Not a chat model. Text generation tools (mlx_lm.generate, mlx_vlm.generate, LM Studio, Ollama) load the backbone but give meaningless output. Only clef_mlx.py runs the decision head.
  • Long inputs are truncated by default, exactly like the reference implementation: the state is cut so the whole prompt fits in 16,384 tokens. Pass truncate=False to predict()/systemone() to get a clef_mlx.ContextTooLong error instead, or raise max_length (the head was trained at 16k).
  • One record per call. There is no batching; requests run one after another.
  • Images or videos, not both in one record. Several images, or several videos, are fine.
  • Speed depends heavily on the chip. Latencies above are from an M5 Max; long prompts on base M-series chips will be several times slower.
  • Custom code. Like the original release, this repo ships Python (clef_mlx.py) that you import and run. Read it before use if that matters in your environment.

Conversion#

  • Backbone: mlx_vlm.convert -q --q-bits 4 --q-group-size 64 (vision tower kept in bf16).
  • Joint schema head: joint_head.safetensors copied unchanged (bf16) and run by clef_mlx.py.
  • processor_config.json is the original from Cloudflare/clef-flash; prompt/token layout matches the reference joint_schema_model.py exactly (images and video).

Parity vs. official PyTorch implementation (bf16)#

InputsTop answer agreesMax abs Δprob
Text (4 records, 10 questions)10/100.029
Images + video (5 records, 9 questions)9/90.119

Measured on an M5 Max (128 GB). Small spot-check, not a full benchmark run.

Quality check: Decision Index (sampled)#

Decision Index (sample)Same top answer as bf16Mean max abs ΔpMedian latency
This model (4-bit)54.6596.4% (15,915 answers)0.040311 ms
MLX bf16, same rows55.63——339 ms
Cloudflare published (full suite)57.07

4-bit costs about 1 index point vs bf16 on identical rows. Most of the remaining gap to the published score is already present in bf16 (sample noise and harness differences), not quantization. Agreement is lowest on low-chance many-option tasks (POP909, GPQA, CLINC150).

Method: Decision Index 0.2.1 kit (suite rebuilt byte-identical), stratified 2,000-request sample across all 44 benchmarks (suite sample --n 2000), engine = clef_mlx.py with max_length=16384 and no truncation (over-length requests are refused and count as wrong; 15 of 2,000, mostly BRIGHT). The index is computed from each benchmark's native metric on the sampled rows with the kit's chance correction and weights; HLE and iSarcasmEval are set to 0 to match how Cloudflare's published run is scored. With ~40 rows per benchmark, per-benchmark numbers are noisy (±10+ pts) — only the index is meaningful.

License#

Apache-2.0, following Cloudflare/clef-flash.

Files

17 files · 6.21 GBWeights 6.19 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 17 files with their sha256
FileSizesha256
.eval_results/typed-decisions.yaml2.04 KB54479463696b2c6a49bb5bb4d163443f16450410aac35f582cf303006ad45f8d
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
LICENSE11.5 KBbbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a
README.md8.41 KB98c3712a002afd107eaad221499d9c086bd106445757fbfcd96d17bbf03daa1e
__pycache__/clef_mlx.cpython-312.pyc38.5 KB3ee6eb0a9a50e9d04f6c1ae5d6914823e50b1a02795505be3578962b124f1c1f
chat_template.jinja7.76 KBa4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715
clef_mlx.py33.7 KB852223c944819a32fad5cf798d9d1dff30419820eaf5ad1f10cb9698afec97d5
config.json3.72 KBc323f36eb35fb9349b2bde60b3e16ee3d86316e20a5166c91f4a0585286f0ec1
generation_config.json116 B45707f8467bf4e54e112c6095a1b2d1f2d63651cf86816344cfff21f02dda0d4
joint_head.safetensors244 MB19cdcec8c81dc9212be320fff47462ab342fbc1278be4368fb3da71241cf5ba0
joint_head_config.json119 B77efe959a38b5b17b241543e129e695f3c77465ece55a25985279bd8176279a0
model-00001-of-00002.safetensors5.35 GB39894f085d844004c8e5c2394e45b5ab66bce4637ecdf23d92bf7c85cb66238f
model-00002-of-00002.safetensors600 MB40258d3d4f7225a0acbb45f4d34693465b98c8e2c0a4b0a512e536750379fcf3
model.safetensors.index.json124 KB4518e4d98baed265cb25c5adb45839d5b69e0b9700f4bd573533392097bbb874
processor_config.json1.19 KBd89ef49ce9cd37fbf510158e13c1ef063d9286411c1ec9049932dbe0487143b1
tokenizer.json20.0 MBa5cd9732badce41de57e6efce8302930ded1c1188c5f81feb2bd6c24c4a1941f
tokenizer_config.json1.19 KB7d884d6eaf8142a3343a933ca5ab6ccc2fa93d52591cdbbe2ea33559bb2b503a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
b5adbe2c3a pinned now2026-11-15 04:56 UTC17 files · 6.21 GB

Use it

$ fw get mlx-community/clef-flash-4bit
# manifest sha256 327585128f05… · 6.21 GB · 17 files
$ fw verify ./clef-flash-4bit mlx-community/clef-flash-4bit
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/mlx-community/clef-flash-4bit.json --dir ./clef-flash-4bit $ python3 fw.py verify ./clef-flash-4bit ./mlx-community__clef-flash-4bit.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/clef-flash-4bit --revision b5adbe2c3a95200d4bf04a0727c8ec457157d5e1 --local-dir ./clef-flash-4bit

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.textSubject: clef-flash-4bitDate: 2026-11-15Commit: b5adbe2Signed: 2DC28CC7B26A283B ✓
Upstream
mlx-community/clef-flash-4bit
Pinned commit
b5adbe2c3a95200d4bf04a0727c8ec457157d5e1
Manifest
clef-flash-4bit.json · .minisig
Manifest sha256
327585128f05727ac672a941885d534af567c969117848d000606bb051ef23a1
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:56 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/mlx-community/clef-flash-4bit.json $ curl -O https://freeweights.allternit.com/manifests/mlx-community/clef-flash-4bit.json.minisig $ minisign -Vm clef-flash-4bit.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

Cloudflare/clef-flash · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/clef-flash-4bit
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. clef-flash-4bit.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B