Run this model with HF Jobs
Run mlx-community/Qwen4-35B-A3B-8bit 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/mlx-community/Qwen4-35B-A3B-8bit. 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/mlx-community/Qwen4-35B-A3B-8bit 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/mlx-community/Qwen4-35B-A3B-8bit. 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 mlx-community/Qwen4-35B-A3B-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen4-35B-A3B-8bit 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("mlx-community/Qwen4-35B-A3B-8bit") config = load_config("mlx-community/Qwen4-35B-A3B-8bit") # 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 mlx-community/Qwen4-35B-A3B-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 "mlx-community/Qwen4-35B-A3B-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": "mlx-community/Qwen4-35B-A3B-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use mlx-community/Qwen4-35B-A3B-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 "mlx-community/Qwen4-35B-A3B-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 mlx-community/Qwen4-35B-A3B-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Qwen4-35B-A3B-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 "mlx-community/Qwen4-35B-A3B-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 "mlx-community/Qwen4-35B-A3B-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"
mlx-community/Qwen4-35B-A3B-8bit
Qwen/Qwen4-35B-A3B converted to MLX with mlx-vlm and quantized to 8-bit (affine, group size 64). The model takes both image and text input.
Note: this conversion uses the mlx-vlm weight layout. The other
mlx-community/Qwen4-35B-A3B-{3,4,6}bitrepos were made with mlx-lm (ml-explore/mlx-lm#2141). Load this one with mlx-vlm as shown below.
- Source revision:
c06f0c19d9411aba77f8d5948f69ae825c7161cb - Converted with mlx-vlm
main@bb22412(Qwen4-MoE support from Neywa-Labs/mlx-vlm#2897), MLX 0.32.5 - Quantization: 8-bit affine with group size 64 (8.56 bits per weight on average) for all language-model linear layers, the expert stacks, the MoE router, the embeddings,
lm_headand the n-gram PLE table. The vision encoder, the norms and other small tensors stay bf16. - Size: 60 GB on disk
- The MTP head is not included. It is a separate speculative-decoding artifact and mlx-vlm drops it.
- The tokenizer is the standard Hugging Face tokenizer plus the Jinja chat template from the original repo's
tokenizer-compat/. Notrust_remote_code,tiktokenorxgrammaris needed.
Use with mlx-vlm
Qwen4 support is not yet in a PyPI release of mlx-vlm (0.8.2 predates it), so install from main:
pip install -U "mlx-vlm @ git+https://github.com/Neywa-Labs/mlx-vlm@main" torchvision
mlx_vlm.generate --model mlx-community/Qwen4-35B-A3B-8bit --max-tokens 2048 --temperature 1.0 \
--prompt "Give me a short introduction to large language models."
mlx_vlm.generate --model mlx-community/Qwen4-35B-A3B-8bit --max-tokens 2048 --temperature 1.0 \
--image photo.jpg --prompt "Describe this image."
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
model, processor = load("mlx-community/Qwen4-35B-A3B-8bit")
prompt = apply_chat_template(processor, model.config, "Describe this image.", num_images=1)
out = generate(model, processor, prompt, image=["photo.jpg"], max_tokens=2048, temperature=1.0, top_p=0.95, top_k=20)
print(out.text)
The model thinks by default (reasoning_effort="high"). Pass enable_thinking=False to apply_chat_template to turn thinking off. Qwen's recommended sampling for thinking mode is temperature=1.0, top_p=0.95, top_k=20, min_p=0.0.
Memory
The weights take about 60 GB, so a Mac with 96 GB or more of unified memory is recommended. About 22 GB of that is the n-gram PLE embedding table. Only a few rows of it are read per token, and mlx-vlm has an experimental ple_storage option that reads them from disk instead of keeping the table in memory.
Smoke test
Run on an Apple M-series Mac with 64 GB of RAM (greedy decoding):
| Prompt | Output (abridged) | Speed |
|---|---|---|
| "What is the capital of Australia? Then compute 17*23." | Thinks briefly, then: Canberra is the capital of Australia. 17 × 23 = 391 | 37.6 tok/s |
| Image (mathv-1327.jpg) + "Describe this image in two sentences." | This black-and-white line drawing shows a central square overlapped by four circles of varying sizes. Two larger circles occupy the top-right and bottom-left areas, while two smaller circles sit at the top-left and bottom-right… | 34.9 tok/s |
The test ran with the n-gram PLE table read from disk (mlx-vlm's ple_storage mmap path) so that it fit in 64 GB; peak memory was 39.6 GB.
See the original model card for benchmarks, prompting and usage details.
- Downloads last month
- -
8-bit
Model tree for mlx-community/Qwen4-35B-A3B-8bit
Base model
Qwen/Qwen4-35B-A3B