Instructions to use spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit 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("spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit") 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 spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit"
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": "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit 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 "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit"
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 spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit"
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 "spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit" \ --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"
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,8 +9,12 @@ base_model: Qwen/Qwen3.6-35B-A3B
|
|
| 9 |
---
|
| 10 |
|
| 11 |
[Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) optimized for MLX.
|
| 12 |
-
This quant does not support image input.
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Usage
|
| 16 |
|
|
@@ -19,9 +23,40 @@ This quant does not support image input.
|
|
| 19 |
uvx --from mlx-lm mlx_lm.server \
|
| 20 |
--host 127.0.0.1 \
|
| 21 |
--port 8080 \
|
| 22 |
-
--model spicyneuron/Qwen3.6-35B-A3B-MLX-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
```
|
| 24 |
|
|
|
|
|
|
|
| 25 |
# Methodology
|
| 26 |
|
| 27 |
Quantized with a [mlx-lm fork](https://github.com/ml-explore/mlx-lm/pull/922), drawing inspiration from Unsloth/AesSedai/ubergarm style mixed-precision GGUFs.
|
|
@@ -29,4 +64,3 @@ MLX quantization options differ than llama.cpp, but the principles are the same:
|
|
| 29 |
|
| 30 |
- Sensitive layers like MoE routing, attention, and output embeddings get higher precision
|
| 31 |
- More tolerant layers like MoE experts get lower precision
|
| 32 |
-
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
[Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) optimized for MLX.
|
|
|
|
| 12 |
|
| 13 |
+
- 4-bit baseline with important layers at 8-bit and BF16.
|
| 14 |
+
- This quant does not support image input.
|
| 15 |
+
|
| 16 |
+
I ended up selecting two winners from my trials. This is the speed+ version, and
|
| 17 |
+
here's the [quality+](https://huggingface.co/spicyneuron/Qwen3.6-35B-A3B-MLX-5.4bit) version.
|
| 18 |
|
| 19 |
# Usage
|
| 20 |
|
|
|
|
| 23 |
uvx --from mlx-lm mlx_lm.server \
|
| 24 |
--host 127.0.0.1 \
|
| 25 |
--port 8080 \
|
| 26 |
+
--model spicyneuron/Qwen3.6-35B-A3B-MLX-4.8bit
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
# Benchmarks
|
| 30 |
+
|
| 31 |
+
metric | mlx-community/ Qwen3.6-35B-A3B-4bit | mlx-community/ Qwen3.6-35B-A3B-4.4bit-msq | 4.8 bit (this model) | 5.4 bit
|
| 32 |
+
--- | --- | --- | --- | ---
|
| 33 |
+
bpw | 4.503 | 4.787 | 4.788 | 5.438
|
| 34 |
+
peak memory (1024/512) | 20.683 | 21.922 | 21.928 | 24.741
|
| 35 |
+
prompt tok/s (1024) | 2719.4470 ± 15.2250 | 2695.9370 ± 12.5260 | 2734.5260 ± 3.8810 | 2665.3060 ± 11.4520
|
| 36 |
+
gen tok/s (512) | 108.4990 ± 0.4910 | 94.2940 ± 0.3650 | 97.2820 ± 0.0800 | 89.4920 ± 0.2610
|
| 37 |
+
kl divergence | 0.0838 ± 0.0008 | 0.1689 ± 0.0015 | 0.0244 ± 0.0004 | 0.0189 ± 0.0003
|
| 38 |
+
perplexity | 4.6150 ± 0.0320 | 4.2490 ± 0.0280 | 4.6410 ± 0.0320 | 4.6440 ± 0.0320
|
| 39 |
+
hellaswag | 0.5560 ± 0.0220 | 0.5780 ± 0.0220 | 0.5440 ± 0.0220 | 0.5370 ± 0.0110
|
| 40 |
+
piqa | 0.7940 ± 0.0180 | 0.7920 ± 0.0180 | 0.7920 ± 0.0180 | 0.7980 ± 0.0180
|
| 41 |
+
winogrande | 0.7260 ± 0.0200 | 0.7400 ± 0.0200 | 0.7120 ± 0.0200 | 0.7100 ± 0.0200
|
| 42 |
+
|
| 43 |
+
I've moved over to using speed + KL divergence as my primary optimization metrics.
|
| 44 |
+
Hellaswag, PIQA, Winogrande, and perplexity are kept as sanity checks, though these require
|
| 45 |
+
high sample sizes to get usable signal.
|
| 46 |
+
|
| 47 |
+
Tested on a Mac Studio M3 Ultra with:
|
| 48 |
+
|
| 49 |
+
```
|
| 50 |
+
mlx_lm.convert --hf-path Qwen/Qwen3.6-35B-A3B --mlx-path ./mlx && mlx_lm.kld --baseline-model ./mlx
|
| 51 |
+
mlx_lm.perplexity --sequence-length 512 --seed 123
|
| 52 |
+
mlx_lm.benchmark --prompt-tokens 1024 --generation-tokens 512 --num-trials 5
|
| 53 |
+
mlx_lm.evaluate --tasks hellaswag --seed 123 --num-shots 0 --limit 500
|
| 54 |
+
mlx_lm.evaluate --tasks piqa --seed 123 --num-shots 0 --limit 500
|
| 55 |
+
mlx_lm.evaluate --tasks winogrande --seed 123 --num-shots 0 --limit 500
|
| 56 |
```
|
| 57 |
|
| 58 |
+
`mlx_lm.kld` is still an [open PR](https://github.com/ml-explore/mlx-lm/pull/1146).
|
| 59 |
+
|
| 60 |
# Methodology
|
| 61 |
|
| 62 |
Quantized with a [mlx-lm fork](https://github.com/ml-explore/mlx-lm/pull/922), drawing inspiration from Unsloth/AesSedai/ubergarm style mixed-precision GGUFs.
|
|
|
|
| 64 |
|
| 65 |
- Sensitive layers like MoE routing, attention, and output embeddings get higher precision
|
| 66 |
- More tolerant layers like MoE experts get lower precision
|
|
|