Instructions to use spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit 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.5-397B-A17B-MLX-2.6bit") 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
- LM Studio
- Pi new
How to use spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit 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.5-397B-A17B-MLX-2.6bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/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.5-397B-A17B-MLX-2.6bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit 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.5-397B-A17B-MLX-2.6bit"
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.5-397B-A17B-MLX-2.6bit
Run Hermes
hermes
- MLX LM
How to use spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit 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.5-397B-A17B-MLX-2.6bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit" # 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.5-397B-A17B-MLX-2.6bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Qwen3.5-397B-A17B optimized for MLX!
- Mixed-precision quantization balances throughput, accuracy, and memory.
- Similar quality to a 4-bit baseline but requires 40% less memory.
- Fixed chat template allows more reliable prompt caching.
- This version does NOT support vision (image input).
Also available as a larger 178GB version: https://huggingface.co/spicyneuron/Qwen3.5-397B-A17B-MLX-3.5bit
Usage
# Start server at http://localhost:8080/v1/chat/completions
uvx --from mlx-lm mlx_lm.server \
--host 127.0.0.1 \
--port 8080 \
--model spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit
Methodology
Quantized with a mlx-lm fork, drawing inspiration from Unsloth/AesSedai/ubergarm style mixed-precision GGUFs. MLX quantization options differ than llama.cpp, but the principles are the same:
- Sensitive layers like MoE routing, attention, and output embeddings get higher precision.
- More tolerant layers like MoE experts get lower precision.
Benchmarks
| metric | lmstudio-community 4 bit | 2.6 bit | 3.5 bit |
|---|---|---|---|
| perplexity | 3.919 卤 0.019 | 3.852 卤 0.018 | 3.919 卤 0.019 |
| hellaswag | 0.594 卤 0.022 | 0.598 卤 0.022 | 0.622 卤 0.022 |
| piqa | 0.798 卤 0.018 | 0.802 卤 0.018 | 0.804 卤 0.018 |
| winogrande | 0.744 卤 0.02 | 0.718 卤 0.02 | 0.746 卤 0.019 |
| p1024/g512 prompt | 490.702 | 489.545 | 479.453 |
| p1024/g512 gen | 39.192 | 38.398 | 35.547 |
| p1024/g512 mem | 225.095 | 131.523 | 179.842 |
- Downloads last month
- 244
Model size
396B params
Tensor type
BF16
路
U32 路
F32 路
Hardware compatibility
Log In to add your hardware
2-bit
Model tree for spicyneuron/Qwen3.5-397B-A17B-MLX-2.6bit
Base model
Qwen/Qwen3.5-397B-A17B