88Z AI, 4 December — Qwen4-35B-A3B is an open-weight, natively multimodal MoE model from Alibaba's Qwen team with text, image and video input and a 1M-token context. Based on official material from Qwen, Hugging Face and Ollama, this guide walks through running it locally with transformers, llama.cpp, oMLX and mlx-lm on Apple Silicon, and Ollama, including reasoning-effort settings, quantization choices and known limitations.
At a glance
- Size figures differ: Qwen says 35B total and 3B activated; Hugging Face says about 3.8B active plus about 20.5B PLE parameters
- transformers needs the separate huggingface/Qwen4-35B-A3B-processor; reasoning_effort accepts xhigh, high, low or off
- llama.cpp offers Q4_K_M, Q6_K and Q8_0 GGUF quants and built-in MTP speculative decoding
- Ollama runs it with one command and can serve it to Claude Code or Hermes Agent
- No official memory figures per quant; benchmark results are vendor-reported
What the model is
Qwen4-35B-A3B is an open-weight model released by Alibaba's Qwen team on December 4, 2026, under the Apache-2.0 license. It natively accepts text, image and video input, produces text, and has a native 1M-token context window. The two official sources describe its size differently: Qwen's post calls it an MoE model with 35B total and 3B activated parameters, while the Hugging Face blog gives about 35B main parameters, about 3.8B active per token, plus about 20.5B per-layer n-gram embedding (PLE) parameters, roughly 56B in total. Checkpoints come in BF16, FP8, oMLX and GGUF, with GGUF quants Q4_K_M (4-bit), Q6_K (6-bit) and Q8_0 (8-bit). Qwen says it runs on a single GPU when quantized, but neither source gives concrete memory requirements.
Architecturally, the text decoder repeats a four-layer pattern ten times: three Gated DeltaNet layers followed by one Qwen Sparse Attention (QSA) layer, which selects up to 2,048 tokens per query. A ViT encodes images, and video is sampled at 2 frames per second. At inference time, reasoning_effort sets the reasoning level to xhigh, high, low or off, defaulting to high.
Route 1: transformers
The quickest entry point is a transformers pipeline with the image-text-to-text task, model Qwen/Qwen4-35B-A3B, the separate processor huggingface/Qwen4-35B-A3B-processor, and device_map="auto". For more control, load the model with AutoModelForMultimodalLM and the processor repository with AutoProcessor, call processor.apply_chat_template (add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt") and pass reasoning_effort there, for example "off"; then run model.generate and decode with processor.batch_decode.
For multimodal input, add {"type": "image", "image": image URL} or {"type": "video", "video": video URL} to the message content alongside the text question; video inference requires torchcodec and ffmpeg. For tool calling, pass Python functions with type hints and docstrings through tools=[...] to apply_chat_template; the blog's example function is get_current_temperature(location, unit).
Route 2: llama.cpp and Llama App
llama.cpp and Llama App support the model from day one. Start a local server with llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q6_K, or replace serve with cli to chat in the terminal; change the tag after the colon to Q4_K_M or Q8_0 to pick another quant. The model ships with multi-token prediction (MTP) drafting, enabled with --spec-type draft-mtp --spec-draft-n-max 3. Hugging Face reports that with the Q4 quant and 3 draft tokens, generation speed rose 22% on an Apple Silicon M5; that is its own measurement, and results on other hardware may differ.
Route 3: oMLX and mlx-lm on Apple Silicon
oMLX uses custom Metal kernels for QSA and the gated residual, supports image input, MTP and offloading PLE parameters to SSD, and offers oQ quants optimized for oMLX and mlx-lm. mlx-lm support for the language model is still on its way to the official repository; the blog's example is mlx_lm.generate --model mlx-community/Qwen4-35B-A3B-4bit-text --prompt "Explain sparse attention like I am 5" --max-tokens 4096, and you can add --chat-template-config '{"reasoning_effort": "low"}' to change the reasoning effort.
Route 4: Ollama, including Claude Code
Ollama now hosts the model: run ollama run qwen4 to chat locally. Ollama also lists commands to use it as the model behind agent tools: ollama launch claude --model qwen4 starts Claude Code with Qwen4, and ollama launch hermes --model qwen4 starts Hermes Agent. Ollama describes the model as strong at coding and agentic tasks, with image understanding. For multi-user serving, vLLM and SGLang also have day-0 support, and Hugging Face recommends following their official docs.
Advanced example and limitations
The Hugging Face blog also includes a TRL AsyncGRPOTrainer recipe that trains a LoRA adapter to triage security alerts and cite evidence: vLLM samples several replies per alert, each scoring 1 if its label and citations match the analyst's criteria and 0 otherwise, and the pipeline runs on Hugging Face Jobs with two H200 GPUs (h200x2). On 12 held-out CyberDefense Bench tasks, the base model passed 4, the update-50 adapter passed 6 and the update-100 adapter passed 3. The blog notes that rising training reward did not mean better evaluation results, so checkpoints should be chosen on held-out data.
Before relying on it, note that benchmark results are published by Qwen and Hugging Face themselves, no official memory figures are given per quant, and mlx-lm support is not yet merged. Full code and details are in the Hugging Face blog at https://huggingface.co/blog/qwen4 .
Sources & editorial note
This article is an AI-assisted synthesis by 88Z AI based on the public sources below. Product claims and availability are attributed to their publishers. It does not represent independent testing or first-hand reporting.
- @huggingfaceSource published
Source dates above refer to the original announcements; the date under the headline is this article’s publication on 88Z AI.