Open AI Models

Qwen4-35B-A3B lands on Hugging Face with 1M context and day-0 llama.cpp, vLLM, SGLang support

Key Takeaway

Qwen4-35B-A3B is an Apache-2.0 multimodal MoE with ~35B total and ~3.8B active parameters plus ~20.5B per-layer n-gram embeddings, a 1M-token context, and same-day support across transformers, llama.cpp, vLLM, SGLang, and MLX.

Summary

The Alibaba Qwen Team has published Qwen4-35B-A3B on Hugging Face, a natively multimodal Mixture-of-Experts model that accepts text, image, and video input and produces text output. The model carries roughly 35B main parameters with about 3.8B active per token, plus about 20.5B Per-Layer N-gram Embedding parameters for roughly 56B total, and it ships under the Apache-2.0 license with a 1M-token native context window. Checkpoints are offered in BF16, FP8, OMLX, and GGUF quantized formats.

Hugging Face and the Qwen Team coordinated day-0 support in transformers, llama.cpp and Llama App, vLLM, SGLang, MLX, TRL, Inference Providers, and Inference Endpoints. The release follows the architectural preview in Qwen3.8-Flash-Next and brings that hybrid design into production, including a Multi-Token Prediction drafter for GGUF and OMLX and adjustable reasoning_effort levels of xhigh, high, low, and off. The model card reports benchmarks where the 35B-A3B model is comparable to the much larger Qwen 3.8 Flash Next and better on some tasks.

Inside the Qwen4 hybrid MoE architecture

  • Hybrid decoder pattern: The text decoder repeats a four-layer pattern ten times; the first three layers use Gated DeltaNet with a fixed-size memory updated per token, while the fourth uses Qwen Sparse Attention (QSA) to attend to individual tokens anywhere in the context.
  • QSA indexing: A small indexer groups tokens in fours and averages their keys, selecting up to 512 groups per query, which yields up to 2,048 selected tokens plus at most three tokens from the last unfinished group.
  • Residual streams and gating: Each token starts as four copies of its 2,048-dimensional embedding forming four residual streams; learned gates mix them before each attention or MoE block, and the eight selected experts plus a shared expert produce one output that is added back to each stream at a separately gated scale.
  • Per-Layer N-gram Embedding: The second decoder layer holds a 20.5B-parameter PLE table; each token reads 16 rows, eight encoding the last two tokens and eight encoding the last three, joined and gated into the residual streams and mixed with a short convolution.
  • Vision and video encoding: A vision transformer reads images as 16x16 patches and merges each 2x2 spatial group into one visual token; for video it samples 2 frames per second, pairs consecutive frames, and lets every patch attend to every other patch within a frame pair.

Why it matters

Apache-2.0 weights at this size with a 1M-token context give Linux and self-hosting users a permissively licensed multimodal model that can run through llama.cpp, vLLM, SGLang, and MLX without vendor-specific terms. Day-0 GGUF and OMLX checkpoints plus an MTP drafter make local and on-device deployment practical, while the reasoning_effort switch lets operators trade latency for depth. The coordinated transformers, TRL, and Inference Endpoints support also lowers the barrier for fine-tuning and serving the model on open infrastructure.

What to do

  • Users can run the model using the any-to-any pipeline in transformers by specifying the model 'Qwen/Qwen4-35B-A3B' and the processor 'huggingface/Qwen4-35B-A3B-processor'.
  • Users can control reasoning effort by setting it to 'xhigh', 'high', 'low', or 'off' when loading the model with AutoModelForMultimodalLM and AutoProcessor.

Original reference: huggingface.co →