Welcome Qwen 4: Cutting-edge intelligence on-device
By huggingface · · AI News
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
Qwen4-35B-A3B by the Alibaba Qwen Team is out on Hugging Face!
We collaborated with the Qwen Team to ship day-0 support across transformers, llama.cpp, Llama App, vLLM, SGLang, MLX, Inference Providers, and Inference Endpoints. This post walks through the salient features of the architecture, how to run it, and how to fine-tune it for your own tasks.
What is new with Qwen4?
Qwen4-35B-A3B is a multimodal mixture-of-experts model with 1M-token context window. The text decoder repeats the same four-layer pattern ten times. The first three layers use Gated DeltaNet, which updates a fixed-size memory as it reads each token. The fourth uses Qwen Sparse Attention (QSA), which lets the current token look back at individual tokens from anywhere in the context.
To decide where to look, a small indexer groups tokens in groups of four tokens and averages their keys. For each query, it picks up to 512 groups. The attention layer then reads the individual tokens in those groups, plus any tokens in the last unfinished group. That gives it up to 2,048 selected tokens and at most three more at the end.