Text Generation
MLX
Safetensors
qwen3_5_moe
mlx-lm
qwen3.6
Mixture of Experts
modelopt
quantized
nvfp4
fp4
fp8
lora
merged
antidoom
conversational
Instructions to use mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 9,952 Bytes
c179c12 | 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 | ---
library_name: mlx
license: apache-2.0
license_link: https://huggingface.co/Qwen/Qwen3.6-35B-A3B/blob/995ad96eacd98c81ed38be0c5b274b04031597b0/LICENSE
base_model:
- nvidia/Qwen3.6-35B-A3B-NVFP4
- N8Programs/Qwen3.6-35B-A3B-AntiLoop
pipeline_tag: image-text-to-text
tags:
- mlx
- mlx-vlm
- image-text-to-text
- qwen3.6
- moe
- modelopt
- quantized
- nvfp4
- fp4
- fp8
- lora
- merged
- antidoom
---
# Qwen3.6-35B-A3B-AntiLoop-NVFP4 for MLX-VLM


This is the Apple-silicon MLX-VLM conversion of
[`N8Programs/Qwen3.6-35B-A3B-AntiLoop-NVFP4`](https://huggingface.co/N8Programs/Qwen3.6-35B-A3B-AntiLoop-NVFP4).
It supports both text and vision inputs, including Qwen thinking controls.
The conversion does not re-quantize the mixed NVIDIA ModelOpt language
checkpoint. Its FP8 and NVFP4 payloads and scales are re-expressed for MLX's
native MXFP8/NVFP4 kernels, while the source tensor-level scales are applied by
the included runtime. Activations remain in the model dtype. The vision tower
is the original BF16 data, byte-for-byte rather than quantized.
- 1,808 tensors across 42 safetensors shards
- 130 scaled MXFP8 dense modules
- 121 scaled NVFP4 dense modules
- 120 scaled NVFP4 expert projections
- 333 BF16 vision tensors (893,142,496 tensor-data bytes)
The checkpoint was converted and smoke-tested with `mlx==0.31.2`,
`mlx-lm==0.31.3`, and `mlx-vlm==0.6.4`.
## Use with MLX-VLM
Install MLX-VLM and download the repository:
```bash
pip install -U "mlx-vlm==0.6.4"
hf download mlx-community/Qwen3.6-35B-A3B-AntiLoop-NVFP4 \
--local-dir Qwen3.6-35B-A3B-AntiLoop-NVFP4
cd Qwen3.6-35B-A3B-AntiLoop-NVFP4
```
Image + text generation:
```bash
python run_mlx_vlm.py \
--model . \
--trust-remote-code \
--image /path/to/image.png \
--prompt "Describe this image." \
--max-tokens 256
```
Text-only generation with thinking enabled:
```bash
python run_mlx_vlm.py \
--model . \
--trust-remote-code \
--enable-thinking \
--prompt "Solve: 27 * 43" \
--max-tokens 512
```
For programmatic loading from the downloaded repository:
```python
from mlx_vlm_model_file_loader import load
model, processor = load(".")
```
MLX-VLM 0.6.4 does not yet natively consult a model-local
`vlm_model_file`. `run_mlx_vlm.py` installs that single lookup inside the
current process without modifying the installed package. The local runtime is
executed only when `--trust-remote-code` (or `trust_remote_code=True`) is
explicitly enabled. Review the included Python files before trusting them.
An HTTP server can be started similarly:
```bash
python run_mlx_vlm_server.py \
--model . \
--trust-remote-code \
--enable-thinking
```
## Original model card
This is a mixed-precision NVIDIA ModelOpt deployment checkpoint for
[`Qwen3.6-35B-A3B-AntiLoop`](https://huggingface.co/N8Programs/Qwen3.6-35B-A3B-AntiLoop),
a narrow fine-tune intended to recover from pathological self-verification and
enumeration loops while preserving ordinary long-form reasoning.
No PEFT adapter is required at inference time. The MLX conversion retains the
upstream multimodal architecture, tokenizer, chat template, and 262,144-token
native context configuration. It does not include the source checkpoint's MTP
draft weights.
## Training data
The exact 178 masked supervised targets used for the final AntiLoop training
round are published in the
[`Qwen3.6-35B-A3B-AntiLoop-SFT` dataset](https://huggingface.co/datasets/N8Programs/Qwen3.6-35B-A3B-AntiLoop-SFT).
The dataset preserves each `loss_start_char` boundary so the pathological loop
prefix remains conditioning context rather than a supervised target. It
intentionally excludes the separately generated KL-regularization anchors.
## Training procedure
The AntiLoop adapter was trained on the 178 masked supervised targets using a
standard supervised fine-tuning procedure, but regularized via KL-loss on separately generated non-loop anchors from the base model on everyday prompts.
## Benchmark results
### LoopHard
**LoopHard** is our held-out set of 285 enumeration prompts designed to elicit
futile recall, recounting, and self-verification loops. The primary metric is
**judged loops**: whether the model's reasoning trace remains stuck in a futile
cycle when generation ends.
| Model | Judged loops | Loop rate |
|---|---:|---:|
| NVIDIA NVFP4 | 72 / 285 | 25.26% |
| **AntiLoop NVFP4** | **10 / 285** | **3.51%** |
| NVIDIA NVFP4 + `presence_penalty=1.5` | 30 / 285 | 10.53% |
| **AntiLoop NVFP4 + `presence_penalty=1.5`** | **1 / 285** | **0.35%** |
The matched `presence_penalty=1.5` comparison converted all 30 control loops to
clean completions while introducing one different loop. Exact two-sided
McNemar `p = 2.98e-8`.
Generation used thinking mode, `temperature=0.7`, `top_p=0.95`, `top_k=20`, a
6,144-token completion limit, and concurrency 24. The two
`presence_penalty=1.5` arms used the exact original and AntiLoop NVFP4
checkpoints with the same vLLM build and serving configuration: TP1, FP8 KV
cache, FlashInfer attention, Marlin NVFP4 MoE, and MTP speculative decoding
with three draft tokens.
LoopHard is judged by GLM-5.2 using a convergence-aware rubric: systematic
reasoning and verification that reaches a conclusion are not loops, and a trace
that notices its own circling and exits is classified as recovered. The
calibration set contained 42 manually labeled traces. Across three judge runs,
accuracy was 88.1%, 92.9%, and 95.2%; all three runs identified all 17 labeled
loops, with 2–5 false positives among the 25 non-loop traces.
The 285 prompts, metadata, and GLM-5.2 evaluation code are published in the
[LoopHard dataset](https://huggingface.co/datasets/N8Programs/LoopHard) on
Hugging Face.
### Capability preservation
The capability checks below compare the same round-2 AntiLoop adapter against
its FP8 reference model under a matched runtime-LoRA setup. These runs used the
default presence penalty and should not be interpreted as evaluations of the
exact mixed-precision artifact at `presence_penalty=1.5`.
#### GPQA Diamond
| Model | Accuracy |
|---|---:|
| Qwen3.6-35B-A3B official model card | 86.0% |
| FP8 reference, our matched harness | 167 / 198 (84.34%) |
| **AntiLoop FP8, our matched harness** | **166 / 198 (83.84%)** |
The official-model-card number is included for context and was not produced by
our harness.
Our GPQA run used thinking mode, paired per-question seeds,
`temperature=0.7`, `top_p=0.95`, `top_k=20`, MTP3 speculative decoding, a
65,536-token reasoning budget, and 4,096 tokens of answer headroom. The difference was not significant.
Source for the published 86.0% result:
[`Qwen/Qwen3.6-35B-A3B` model card](https://huggingface.co/Qwen/Qwen3.6-35B-A3B).
#### GSM8K
| Model | Accuracy |
|---|---:|
| FP8 reference | 1273 / 1319 (96.51%) |
| **AntiLoop FP8** | **1270 / 1319 (96.29%)** |
The GSM8K run used the exact 1,319-example `openai/gsm8k` `main` test split,
thinking mode, paired seeds, `temperature=0.7`, `top_p=0.95`, `top_k=20`, MTP3,
an 8,192-token reasoning budget and 1,024 tokens of answer headroom. The difference was not significant.
Taken together, the matched GPQA and GSM8K results show no material or
statistically detectable capability loss at these sample sizes. They do not
establish equivalence across other tasks, modalities, or sampling settings.
## Original NVIDIA ModelOpt usage
Use a recent vLLM build with ModelOpt mixed-precision support:
```bash
vllm serve N8Programs/Qwen3.6-35B-A3B-AntiLoop-NVFP4 \
--quantization modelopt \
--trust-remote-code \
--max-model-len 262144 \
--kv-cache-dtype fp8 \
--reasoning-parser qwen3
```
MTP speculative decoding can be enabled on a compatible build with:
```bash
--speculative-config '{"method":"mtp","num_speculative_tokens":3}'
```
For the measured LoopHard setting, send the following sampling parameters:
```json
{
"temperature": 0.7,
"top_p": 0.95,
"top_k": 20,
"presence_penalty": 1.5
}
```
The capability-preservation results above used the default presence penalty;
`presence_penalty=1.5` has not yet been evaluated on GPQA or GSM8K.
Follow the
[`nvidia/Qwen3.6-35B-A3B-NVFP4` model card](https://huggingface.co/nvidia/Qwen3.6-35B-A3B-NVFP4)
for deployment requirements and the
[`Qwen/Qwen3.6-35B-A3B` model card](https://huggingface.co/Qwen/Qwen3.6-35B-A3B)
for chat templating, thinking controls, multimodal inputs, and base-model
limitations.
## Limitations
- This is a narrow behavioral fine-tune, not a general alignment or safety model.
- The MLX conversion does not include an MTP speculative drafter.
- LoopHard is a task-specific, judge-based benchmark; its loop rate should not
be interpreted as a general safety, truthfulness, or factuality score.
- The GPQA and GSM8K checks used runtime LoRA on an FP8 base, not this exact
mixed-precision artifact.
- Capability preservation has not been tested at `presence_penalty=1.5`.
- Fixed-scale FP8 re-quantization approximates the exact BF16 LoRA merge; small
adapter updates can round away or clip at the original E4M3 range.
- Runtime validation used a 65,536-token configured context, not the full native
262,144-token context.
- Multimodal generation quality has not been evaluated on this artifact.
- Outputs may still be incorrect, overconfident, repetitive, biased, toxic, or
unsafe.
## License
Apache 2.0, following both the underlying Qwen checkpoint and NVIDIA's
quantized derivative. See the
[pinned Qwen license](https://huggingface.co/Qwen/Qwen3.6-35B-A3B/blob/995ad96eacd98c81ed38be0c5b274b04031597b0/LICENSE),
the [Qwen model card](https://huggingface.co/Qwen/Qwen3.6-35B-A3B), and the
[NVIDIA ModelOpt checkpoint card](https://huggingface.co/nvidia/Qwen3.6-35B-A3B-NVFP4).
(co-written with GPT-5.6-Sol)
|