Run this model with HF Jobs
Run netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit 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("netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit") config = load_config("netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit") # 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) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit"
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": "netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit 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 "netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit"
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 netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit"
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 "netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit" \ --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"
Qwen4-35B-A3B · LayerFit MLX 2.5-bit
An Apple Silicon (MLX) build of Qwen/Qwen4-35B-A3B, the Qwen team's mixture-of-experts vision-language model (35B parameters, 3B active, plus a 20B n-gram embedding and a native MTP head), from upstream revision 849378c8db0d4537b7c6731738147378729d8920. Built and tested by NetProjects on 4 December 2026.
Weights: 27.8 GB in 6 shards. Text, image input, tool calling and the MTP head are included.
How it is quantized
LayerFit 2.5-bit spends bits where measured sensitivity says they matter most:
- Always-on paths at 8-bit: attention and linear-attention projections, shared experts, hyper-connection mixers, n-gram key/value projections, the embedding table and the output head.
- Routed experts at 2-bit (group 64), with expert down-projections at 3-bit in the 16 most sensitive layers: they hold most of the parameters, and only 8 of 256 run per token.
- Importance-matrix rounding: 1,024 calibration samples x 512 tokens collected on the original BF16 weights, one layer at a time.
- The 12.8 GB n-gram table is affine 4-bit (group 32) and can be memory-mapped.
- Built with oMLX 0.8.5 (
oq, enhanced mode, streamed calibration).
Fidelity to the original BF16 model
Measured on 4 December 2026 against the upstream BF16 weights, with the same token ids on both sides:
| Test set | Positions | Top-1 agreement | Mean KL (top-64) |
|---|---|---|---|
| Plain text and code (24 windows) | 7,488 | 76.7% | 0.283 |
| Chat answers (12 prompts) | 451 | 83.8% | 0.353 |
Run it (Apple Silicon)
Qwen4 support is not in stock mlx-lm / mlx-vlm yet, so this build uses the Qwen4 runtime that ships with the oMLX 0.8.5 Homebrew installation (tested). Serve it with oMLX, or use the included offline runner run_qwen4.py (greedy decoding, one request at a time). The tokenizer and chat processor in processor/ are the upstream Qwen4 files, loaded locally:
PY="$(brew --prefix jundot/omlx/omlx)/libexec/bin/python"
uv pip install --target "$PWD/.processor-deps" --python "$PY" \
'transformers==5.25.1' 'xgrammar==0.2.9' 'torch==2.15.0' 'torchvision==0.29.2'
HF_HUB_OFFLINE=1 PYTHONPATH="$PWD/.processor-deps" "$PY" -B run_qwen4.py \
--prompt 'Which shape is blue? Answer with the shape only.' --image /path/to/image.png
Remove --image for text-only prompts. This exact package passed text generation, an image question, a structured tool call and use of the tool's result.
Smaller Macs: n-gram on SSD + MoE expert offload
oMLX 0.8.5 can keep the 12.8 GB n-gram table on SSD and keep only part of each layer's routed experts in memory, reading the rest from the model files when the router picks them. Routing is unchanged, so quality holds (within rounding); the trade is speed. Model settings in oMLX:
qwen4_ple_ssd_offload: true
moe_expert_offload_enabled: true
moe_expert_offload_resident_fraction: 0.25
The same settings work with this build and need less memory than the 3-bit, which was measured on an M5 Max with the MLX memory limit set to 10 GB (4 December 2026):
| Experts in memory | Peak MLX memory | Chat top-1 vs BF16 (3-bit) | Decode (indicative) |
|---|---|---|---|
| 100% | 16.7 GB | 91.1% | ~100 tok/s |
| 25% | 6.8 GB | 90.5% | ~29 tok/s |
| 15% | 5.5 GB | 90.9% | ~24 tok/s |
Other builds
- Qwen4-35B-A3B-LayerFit-MLX-4bit
- Qwen4-35B-A3B-LayerFit-MLX-5bit
- Qwen4-35B-A3B-LayerFit-MLX-6bit
- Qwen4-35B-A3B-LayerFit-MLX-3bit
- More Apple Silicon builds: NetProjects on Hugging Face · netprojects.com
Licence and attribution
Qwen4-35B-A3B is created by the Qwen team (Alibaba Group) and released under the Apache License 2.0; the licence is included as LICENSE. This repository contains quantized weights derived from it; the tokenizer and processor code are the unmodified upstream files. Quantization and packaging by NetProjects. Not affiliated with Alibaba Group or the Qwen team.
@misc{qwen4-35ba3b,
title = {{Qwen4-35B-A3B}},
author = {{Qwen Team}},
month = {December},
year = {2026},
url = {https://huggingface.co/Qwen/Qwen4-35B-A3B}
}
- Downloads last month
- -
2-bit
Model tree for netprojects/Qwen4-35B-A3B-LayerFit-MLX-2.5bit
Base model
Qwen/Qwen4-35B-A3B