Qwen 3.5 — quantized
Collection
Quantized GGUF and MLX packs of the Qwen 3.5 model family, including the 397B-A17B MoE. • 10 items • Updated
How to use majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit with MLX:
# Make sure mlx-vlm is installed
# pip install --upgrade mlx-vlm
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config
# Load the model
model, processor = load("majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit")
config = load_config("majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit")
# Prepare input
image = ["http://images.cocodataset.org/val2017/000000039769.jpg"]
prompt = "Describe this image."
# Apply chat template
formatted_prompt = apply_chat_template(
processor, config, prompt, num_images=1
)
# Generate output
output = generate(model, processor, formatted_prompt, image)
print(output)How to use majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit with Pi:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit"
# 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": "majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit"
}
]
}
}
}# Start Pi in your project directory: pi
How to use majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit with Hermes Agent:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit"
# 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 majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit
hermes
How to use majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit with OpenClaw:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit"
# 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 "majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
openclaw agent --local --agent main --message "Hello from Hugging Face"
2-bit MLX weight-quantized build of Qwen/Qwen3.5-397B-A17B (397B total / 17B active Sparse MoE, multimodal) — re-quantized from the 4-bit TurboQuant MLX checkpoint for maximum compression. Optimized for Apple Silicon via MLX.
This is an experimental extreme-compression variant intended for running a ~400B MoE model on high-end consumer Apple Silicon. Expect noticeable quality degradation vs 4-bit — test on your workload before relying on it.
from mlx_lm import load, generate
model, tokenizer = load("majentik/Qwen3.5-397B-A17B-TurboQuant-MLX-2bit")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Give me a one-sentence description of MoE routing."}],
add_generation_prompt=True,
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=128, verbose=True))
| Property | Value |
|---|---|
| Base model | Qwen/Qwen3.5-397B-A17B |
| Architecture | Sparse Mixture-of-Experts (MoE) |
| Total parameters | 397B |
| Active per token | 17B |
| Modalities | Image + Text → Text (image-text-to-text) |
| Context window | 256K tokens |
| Weight quantization | 2-bit MLX (re-quantized from 4-bit TurboQuant) |
| Approx. disk footprint | ~135 GB |
| License | Apache 2.0 |
| Aspect | TurboQuant (this repo) | RotorQuant |
|---|---|---|
| Rotation | Randomized Hadamard (static) | Learned orthogonal rotors (data-calibrated) |
| Calibration | Zero-shot | ~512 sample calibration pass |
| Accuracy @ 2-bit | ~93–95% of FP16 baseline (task-dependent) | ~95–97% of FP16 baseline (task-dependent) |
| Best for | Squeezing the model into small VRAM | Squeezing the model in with the best quality |
| Context | Active memory (approx.) |
|---|---|
| 8K | ~143 GB |
| 32K | ~153 GB |
| 128K | ~183 GB |
| 256K | ~213 GB |
2-bit
Base model
Qwen/Qwen3.5-397B-A17B