File size: 11,057 Bytes
001e792
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
---



license: apache-2.0
base_model: Cloudflare/clef
tags:
- auto-round
- gptq
- compressed-tensors
- clef
- cloudflare
- systemone
- qwen3.8
- post-train
- image-text-to-typed-output
- multimodal
- structured-output
- classification
- custom-code
pipeline_tag: image-text-to-text

---


# Clef-W4A16-AutoRound-LLM-Compressor

Quantized **W4A16** (4-bit weights, 16-bit activations) release of [Cloudflare/Clef](https://huggingface.co/Cloudflare/Clef) using **Intel AutoRound**.

`Clef` is a 9B multimodal decision model post-trained from Qwen3.5 that evaluates structured schemas (text, JSON, image, video) and returns calibrated probability distributions across typed questions in a single forward pass without autoregressive token generation.

---

## Quantization Details

* **Method:** Intel AutoRound W4A16 (`sym=True`, `group_size=64`)
* **Vision Tower:** Preserved in native **BF16** (ensures zero OCR/visual degradation)
* **Joint Schema Head (`joint_head.safetensors`):** Preserved in native **BF16**

* **Linear Convolutions:** Preserved in native **BF16** to prevent drift in Qwen3.5 linear attention layers

* **Accuracy:** Zero loss observed across text, JSON state, and multimodal test suites compared to the base checkpoint.



---



## Quickstart





## vLLM Serving (`/v1/systemone`)



Requires `vllm > v0.31.0` or `vllm/vllm-openai:nightly`.



### 1. Launch Server



```bash

docker run --gpus all -p 8000:8000 --ipc=host vllm/vllm-openai:nightly \

  vllm serve OpenTensorLab/clef-W4A16-AutoRound \

    --port 8000 --host 0.0.0.0 \

    --max-model-len 32k --max-num-batched-tokens 32k --max-num-seqs 128 \

    --kv-cache-dtype fp8 --gpu-memory-utilization 0.90 \

    --enable-prefix-caching --enable-chunked-prefill \

    --trust-remote-code --dtype bfloat16



```



### 2. Client Example (`typesafe_sdk`)



```bash

pip install typesafe_sdk



```



```python

from typesafe_sdk import Choice, TypeSafeClient



with TypeSafeClient(

    api_key="EMPTY",

    base_url="http://localhost:8000/v1",  # or your proxy URL

    model="OpenTensorLab/clef-W4A16-AutoRound-GPTQ",

) as client:

    res = client.system_one(

        state="Checkout throwing 504 Gateway Timeouts. Database latency at 4,000ms.",

        questions={

            "severity": Choice(

                instructions="Assess severity",

                criteria={"sev1": "Total outage", "sev2": "Degraded", "sev3": "Minor"},

            ),

            "team": Choice(

                instructions="Route to team",

                criteria={"sre": "Infrastructure", "billing": "Payments"},

            ),

        },

    )



    for k, v in res.choices.items():

        print(f"{k}: {v.choice} ({v.confidence:.1%})")



```



### Installation



```bash

pip install torch transformers huggingface_hub pillow



```



### Usage (`systemone` API)



```python

import sys

from huggingface_hub import snapshot_download



# Download repo and load custom joint schema model

repo_id = "OpenTensorLab/clef-W4A16-AutoRound-GPTQ"  # or auto-gptq / llm-compressor variant

model_path = snapshot_download(repo_id)

sys.path.insert(0, model_path)



from joint_schema_model import load_release_model, systemone



model, processor = load_release_model(model_path, device="cuda")



# 1. Text / JSON Decision Example

response = systemone(model, processor, {

    "model": "clef",

    "state": "Prod database latency spiked to 4,000ms. Checkout failing with 504 Gateway Timeouts.",

    "questions": {

        "severity": {

            "type": "choice",

            "instructions": "Determine incident severity level",

            "criteria": {

                "SEV_1": "Critical revenue outage",

                "SEV_2": "Major feature degradation",

                "SEV_3": "Minor issue"

            }

        },

        "urgency": {

            "type": "score",

            "instructions": "Urgency rating",

            "criteria": ["Low", "Medium", "Immediate page"]

        },

        "rollback": {

            "type": "noul",

            "instructions": "Should a rollback be initiated?"

        }

    }

})



print(response["answers"])



```



### Multimodal (Image) Evaluation



```python

from PIL import Image



response = systemone(model, processor, {

    "model": "clef",

    "state": "Review the uploaded invoice receipt.",

    "images": [Image.open("receipt.png")],

    "questions": {

        "legible": {"type": "noul", "instructions": "Is the receipt text clear and legible?"},

        "amount_exceeds_1000": {"type": "noul", "instructions": "Is total > $1000 USD?"}

    }

})



print(response["answers"])



```





### Installation



```bash

pip install torch transformers huggingface_hub pillow



```



### Usage (`systemone` API)



```python

import sys

from huggingface_hub import snapshot_download



# Download repo and load custom joint schema model

repo_id = "OpenTensorLab/Clef-W4A16-AutoRound"  # or auto-gptq / llm-compressor variant

model_path = snapshot_download(repo_id)

sys.path.insert(0, model_path)



from joint_schema_model import load_release_model, systemone



model, processor = load_release_model(model_path, device="cuda")



# 1. Text / JSON Decision Example

response = systemone(model, processor, {

    "model": "Clef",

    "state": "Prod database latency spiked to 4,000ms. Checkout failing with 504 Gateway Timeouts.",

    "questions": {

        "severity": {

            "type": "choice",

            "instructions": "Determine incident severity level",

            "criteria": {

                "SEV_1": "Critical revenue outage",

                "SEV_2": "Major feature degradation",

                "SEV_3": "Minor issue"

            }

        },

        "urgency": {

            "type": "score",

            "instructions": "Urgency rating",

            "criteria": ["Low", "Medium", "Immediate page"]

        },

        "rollback": {

            "type": "noul",

            "instructions": "Should a rollback be initiated?"

        }

    }

})



print(response["answers"])



```



### Multimodal (Image) Evaluation



```python

from PIL import Image



response = systemone(model, processor, {

    "model": "Clef",

    "state": "Review the uploaded invoice receipt.",

    "images": [Image.open("receipt.png")],

    "questions": {

        "legible": {"type": "noul", "instructions": "Is the receipt text clear and legible?"},

        "amount_exceeds_1000": {"type": "noul", "instructions": "Is total > $1000 USD?"}

    }

})



print(response["answers"])



```



---



## Formats Available



| Repository | Format | Engine Target |

| --- | --- | --- |

| `OpenTensorLab/Clef-W4A16-AutoRound` | AutoRound / AutoGPTQ | Transformers / Native Python |

| `OpenTensorLab/Clef-W4A16-AutoRound-GPTQ` | AutoGPTQ Standard | Transformers / ExLlama / AutoGPTQ |

| `OpenTensorLab/Clef-W4A16-AutoRound-LLM-Compressor` | Compressed-Tensors | vLLM / SGLang |



---



### 🚀 Deploy on RunPod



One-click launch environments pre-configured with PyTorch, CUDA, and dependencies for fine-tuning or quantization.



> 🎁 **Need GPU compute?** Sign up via [RunPod](https://runpod.io?ref=iabrlp7z) and get **$5–$500 in free credits** when you add your first $10.



#### PyTorch 2.15



| Template | CUDA Version | Docker Image | Template ID | Deploy |

| :--- | :--- | :--- | :--- | :--- |

| **PyTorch 2.15 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.15-runpod` | `0rsw686010` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=0rsw686010&ref=iabrlp7z) |

| **PyTorch 2.15 (CUDA 13.4)** | 13.4 | `vishva123/cuda-13.4-pytorch-2.15-runpod` | `0s0rhdfaqy` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=0s0rhdfaqy&ref=iabrlp7z) |



#### PyTorch 2.14



| Template | CUDA Version | Docker Image | Template ID | Deploy |

| :--- | :--- | :--- | :--- | :--- |

| **PyTorch 2.14 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.14-runpod` | `d7lxsa4w9m` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=d7lxsa4w9m&ref=iabrlp7z) |

| **PyTorch 2.14 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.14-runpod` | `yk0y6j6rpg` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=yk0y6j6rpg&ref=iabrlp7z) |

| **PyTorch 2.14 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.14-runpod` | `gsp4gwx0nw` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=gsp4gwx0nw&ref=iabrlp7z) |



#### PyTorch 2.13



| Template | CUDA Version | Docker Image | Template ID | Deploy |

| :--- | :--- | :--- | :--- | :--- |

| **PyTorch 2.13 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.13-runpod` | `gmlupxnxfk` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=gmlupxnxfk&ref=iabrlp7z) |

| **PyTorch 2.13 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.13-runpod` | `y3j8xvk4f4` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=y3j8xvk4f4&ref=iabrlp7z) |

| **PyTorch 2.13 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.13-runpod` | `vigpissn5w` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=vigpissn5w&ref=iabrlp7z) |



#### PyTorch 2.12



| Template | CUDA Version | Docker Image | Template ID | Deploy |

| :--- | :--- | :--- | :--- | :--- |

| **PyTorch 2.12 (CUDA 12.6)** | 12.6 | `vishva123/cuda-12.6-pytorch-2.12-runpod` | `ctmz86zmf0` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=ctmz86zmf0&ref=iabrlp7z) |

| **PyTorch 2.12 (CUDA 13.0)** | 13.0 | `vishva123/cuda-13.0-pytorch-2.12-runpod` | `qjko5yiwzi` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=qjko5yiwzi&ref=iabrlp7z) |

| **PyTorch 2.12 (CUDA 13.2)** | 13.2 | `vishva123/cuda-13.2-pytorch-2.12-runpod` | `ifg6xmye0f` | [![Deploy to RunPod](https://img.shields.io/badge/RunPod-Deploy%20Pod-purple?logo=runpod&logoColor=white)](https://runpod.io/console/deploy?template=ifg6xmye0f&ref=iabrlp7z) |



---



## Acknowledgements



* Base model by [Cloudflare](https://huggingface.co/Cloudflare/Clef).

* Quantization powered by [Intel AutoRound](https://github.com/intel/auto-round).