TrevorJS / clef-flash-mlx-4bit

huggingface.co
Total runs: 214
24-hour runs: 0
7-day runs: 137
30-day runs: 214
Model's Last Updated: 2026年10月2日
text-classification

Introduction of clef-flash-mlx-4bit

Model Details of clef-flash-mlx-4bit

clef-flash-mlx-4bit

Cloudflare/clef-flash converted to MLX for Apple Silicon, with the backbone quantized to 4-bit. Clef-Flash is a decision model: given a state and a schema of typed questions ( choice , score , noul ), it returns a probability for every allowed option of every question from one prefill pass, with no text generation.

This is an unofficial conversion. It is not made or endorsed by Cloudflare. All credit for the model goes to the Clef authors; see the announcement .

What is in this repo
File Contents
model*.safetensors , config.json Qwen3.5-9B backbone from Clef-Flash, converted with mlx_lm.convert (affine, 4-bit, group size 64). Vision encoder dropped.
joint_head.safetensors , joint_head_config.json Clef's joint schema head, unchanged from the original release (bf16)
clef_mlx.py MLX port of the release's joint_schema_model.py (record encoding and joint schema head); the head runs in float32
tokenizer, chat template, LICENSE From the original release

Text only. The vision encoder is not included, so image and video inputs are not supported.

Usage
pip install mlx-lm huggingface_hub
import sys
from huggingface_hub import snapshot_download

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

clef = load(path)
print(decide(clef, {
    "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?"},
    },
}))
# {'department': {'billing': 0.043, 'technical': 0.957}, 'urgency': {'0': 0.096, '1': 0.072, '2': 0.832},
#  'outage': {'true': 0.818, 'false': 0.182}}   (4-bit output)

decide takes the same record shape as the original encode_record / systemone (state as text or JSON, questions keyed by ID) and returns {question_id: {option_id: probability}} . All questions in a record are scored jointly.

Verification
  • Head: on identical inputs, clef_mlx.JointSchemaHead matches the release's torch JointSchemaHead to within 4e-6 on the logits.
  • Encoding: clef_mlx.encode_record produces the same token IDs, spans and option IDs as the release's encode_record on 11 of 11 sampled records.
  • Backbone: quantization is the only source of drift. No bf16 reference was run, so the end-to-end check is task accuracy and the agreement between the two quantizations (below).

JevBench public items (231 items, pinned commit bb05a335 ), scored by this repo's code on an Apple M2 (24 GB):

Variant All Easy Standard Hard Peak memory Median latency (M2)
8-bit 188/231 48/48 71/72 69/111 10.1 GB 4.8 s
4-bit 182/231 48/48 68/72 66/111 5.9 GB 2.9 s

The two variants pick the same option on 216 of 231 items (median max per-option probability difference 0.011). Latency is for one M2 and reflects that machine, not the model on a GPU server.

Other variant: TrevorJS/clef-flash-mlx-8bit .

Conversion

mlx-lm 0.31.3 , mlx 0.32.3 :

python -m mlx_lm convert --hf-path Cloudflare/clef-flash --mlx-path clef-flash-mlx-4bit -q --q-bits 4 --q-group-size 64

then joint_head.safetensors , joint_head_config.json and LICENSE copied from the original repo.

License

Apache-2.0, following Cloudflare/clef-flash and its base model Qwen/Qwen3.5-9B. clef_mlx.py is a port of Cloudflare's Apache-2.0 joint_schema_model.py .

Runs of TrevorJS clef-flash-mlx-4bit on huggingface.co

214
Total runs
0
24-hour runs
13
3-day runs
137
7-day runs
214
30-day runs

More Information About clef-flash-mlx-4bit huggingface.co Model

More clef-flash-mlx-4bit license Visit here:

https://choosealicense.com/licenses/apache-2.0

clef-flash-mlx-4bit huggingface.co

clef-flash-mlx-4bit huggingface.co is an AI model on huggingface.co that provides clef-flash-mlx-4bit's model effect (), which can be used instantly with this TrevorJS clef-flash-mlx-4bit model. huggingface.co supports a free trial of the clef-flash-mlx-4bit model, and also provides paid use of the clef-flash-mlx-4bit. Support call clef-flash-mlx-4bit model through api, including Node.js, Python, http.

clef-flash-mlx-4bit huggingface.co Url

https://huggingface.co/TrevorJS/clef-flash-mlx-4bit

TrevorJS clef-flash-mlx-4bit online free

clef-flash-mlx-4bit huggingface.co is an online trial and call api platform, which integrates clef-flash-mlx-4bit's modeling effects, including api services, and provides a free online trial of clef-flash-mlx-4bit, you can try clef-flash-mlx-4bit online for free by clicking the link below.

TrevorJS clef-flash-mlx-4bit online free url in huggingface.co:

https://huggingface.co/TrevorJS/clef-flash-mlx-4bit

clef-flash-mlx-4bit install

clef-flash-mlx-4bit is an open source model from GitHub that offers a free installation service, and any user can find clef-flash-mlx-4bit on GitHub to install. At the same time, huggingface.co provides the effect of clef-flash-mlx-4bit install, users can directly use clef-flash-mlx-4bit installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

clef-flash-mlx-4bit install url in huggingface.co:

https://huggingface.co/TrevorJS/clef-flash-mlx-4bit

Url of clef-flash-mlx-4bit

clef-flash-mlx-4bit huggingface.co Url

Provider of clef-flash-mlx-4bit huggingface.co

TrevorJS
ORGANIZATIONS

Other API from TrevorJS

huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:2023年9月18日