---
title: clef-OptiQ-4bit
canonical_url: "https://www.modelscope.cn/models/mlx-community/clef-OptiQ-4bit"
md_url: "https://www.modelscope.cn/models/mlx-community/clef-OptiQ-4bit.md"
repository: mlx-community/clef-OptiQ-4bit
last_updated: 2026-10-23
license: apache-2.0
pipeline_tag: text-classification
tasks:
  - text-classification
model_type:
  - qwen3_5
architectures:
  - Qwen3_5ForConditionalGeneration
base_model:
  - Cloudflare/clef
base_model_relation: quantized
parameters: 5.7B
tensor_type:
  - BF16
  - U32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 37
stars: 0
tags:
  - mlx
  - optiq
  - quantized
  - mixed-precision
  - 4bit
  - apple-silicon
  - clef
  - decision-model
  - systemone
  - typed-decisions
---

# clef-OptiQ-4bit

> clef-OptiQ-4bit - mlx-community 在 ModelScope 开源的模型。mlx-community/clef-OptiQ-4bit

mlx-community/clef-OptiQ-4bit 是 ModelScope 魔搭社区上的 5.7B 参数text-classification模型，采用 apache-2.0 许可，基于 Cloudflare/clef 构建。

- **Repository**: mlx-community/clef-OptiQ-4bit
- **License**: apache-2.0
- **Tasks**: text-classification
- **Parameters**: 5.7B
- **Base model**: Cloudflare/clef
- **Tags**: mlx, optiq, quantized, mixed-precision, 4bit, apple-silicon, clef, decision-model, systemone, typed-decisions
- **Downloads**: 37
- **Stars**: 0
- **Last updated**: 2026-10-23

Source: https://www.modelscope.cn/models/mlx-community/clef-OptiQ-4bit

---

# mlx-community/clef-OptiQ-4bit

> **Built with [mlx-optiq](https://mlx-optiq.com)**, the MLX-native toolkit to quantize, fine-tune and serve models on Apple Silicon. [Decision models guide](https://mlx-optiq.com/docs/decision-models) · [All OptiQ quants](https://mlx-optiq.com/models)

A 4-bit mixed-precision MLX quant of [Cloudflare/clef](https://huggingface.co/Cloudflare/clef), Cloudflare's 27B decision model. A decision model reads a piece of state and a set of typed questions (yes/no, choice, score) and returns a probability for every option of every question in one forward pass. There is no generated text and nothing to parse. The request and response match the Jev / SystemOne API.

The backbone is quantized with per-layer bit-widths: sensitive layers at 8-bit, the rest at 4-bit. The joint schema head and the vision tower are kept at full precision. Size on disk is about 20.6 GB.

## Typed Decisions result

Scored on the full 400-case [Typed Decisions](https://huggingface.co/datasets/LocalLLaMA/typed-decisions) test split (2,000 decisions) with the benchmark's own metrics, text only, MLX on an Apple M3 Max. The comparison is the stock uniform 4-bit quant of the same model, [mlx-community/clef-4bit](https://huggingface.co/mlx-community/clef-4bit), scored the same way.

| | Accuracy | KL from gold (lower is better) | Brier (lower is better) | ECE (lower is better) |
|---|---:|---:|---:|---:|
| This quant | 0.719 | 0.1885 | 0.1015 | 0.1181 |
| Uniform 4-bit | 0.7185 | 0.1987 | 0.106 | 0.1185 |

The probabilities sit a little closer to the reference answers (lower KL and Brier). Accuracy is the same within noise. The gain over uniform 4-bit is small; the point of this quant is that it loses nothing and runs through OptiQ's decision endpoint.

## Use

Serve it with OptiQ and the decision endpoint turns on by itself:

```bash
pip install mlx-optiq
optiq serve --model mlx-community/clef-OptiQ-4bit
```

```bash
curl http://127.0.0.1:8080/v1/systemone -d '{
  "model": "clef",
  "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"}}
  }
}'
```

Or from Python:

```python
from optiq.decision import DecisionModel

model = DecisionModel.load("mlx-community/clef-OptiQ-4bit")
print(model.predict({
    "state": "Checkout has been failing for every customer for the last hour.",
    "questions": {"urgent": {"type": "noul", "instructions": "Is this urgent?"}},
}))
```

Text input only for now: a request that carries images or video is refused with a clear error rather than answered without them. The [decision models guide](https://mlx-optiq.com/docs/decision-models) covers the three question types, errors, context length and training your own with `optiq lora train`.

## Quantization details

| Property | Value |
|---|---|
| Predominant precision | 4-bit |
| Layers at 8-bit (sensitive) | 261 |
| Layers at 4-bit | 237 |
| Group size | 64 |
| Joint schema head | full precision, unchanged from the base |
| Vision tower | bf16, in `optiq/`, unchanged from the base |

The bit allocation reuses the measured recipe of the Qwen3.8-27B OptiQ quant, the backbone this model was post-trained from.

See also [clef-flash-OptiQ-4bit](https://huggingface.co/mlx-community/clef-flash-OptiQ-4bit) (Clef-Flash, 9B).

## License

Apache-2.0, as the base model. Clef is by Cloudflare; see the [base model card](https://huggingface.co/Cloudflare/clef) for how it was trained and evaluated.
