Model launches

AI-generated text

Alibaba Qwen Team Releases Multimodal Qwen4 Model for Local Use

The Alibaba Qwen Team has released Qwen4-35B-A3B on Hugging Face under the Apache 2.0 license.

Alibaba Qwen Team Releases Multimodal Qwen4 Model for Local Use

The Alibaba Qwen Team has released Qwen4-35B-A3B on Hugging Face. The model accepts text, images and video and produces text responses. It can be run locally, has a native one-million-token context window and is available under the Apache 2.0 license. Several inference and training tools supported it from the day of release.

Following the architectural preview in Qwen3.8-Flash-Next, Qwen4-35B-A3B uses the team’s next-generation hybrid design. The Mixture-of-Experts (MoE) model has approximately 35 billion main parameters, of which about 3.8 billion are active per token. A further 20.5 billion parameters are used for per-layer n-gram embeddings, bringing the total to roughly 56 billion.

Model architecture

The text decoder repeats a four-layer pattern ten times. The first three layers use Gated DeltaNet, which updates a fixed-size memory as it processes tokens. In the fourth, Qwen Sparse Attention (QSA) selects relevant earlier tokens from the context: an indexer organizes tokens into groups of four and selects up to 512 groups per query. The attention layer can therefore examine up to 2,048 selected tokens, plus at most three from the final unfinished group.

The model uses 256 routed experts. In each block, eight selected experts and one shared expert process the input. Information then travels along four parallel residual streams; learned gates control how the streams are mixed and how much of the block output each receives.

The second decoder layer contains the 20.5-billion-parameter per-layer embedding (PLE) table. Each token reads 16 rows from it: eight encode patterns in the last two tokens and eight encode patterns in the last three. The layer combines these embeddings, gates their contribution to the residual streams and uses a short convolution to handle nearby patterns.

A vision transformer processes images and video. It divides images into 16 × 16-pixel patches, then merges each 2 × 2 group of patches into one visual token. For video, it samples two frames per second and arranges consecutive samples into pairs.

The Qwen team has published benchmarks in the model card. According to the accompanying article, the model performs comparably to the much larger Qwen 3.8 Flash Next on several tests and better on some tasks; the article does not provide numerical results for those comparisons.

Inference and local versions

Day-one support included transformers, llama.cpp, Llama App, vLLM, SGLang, TRL, and Hugging Face Inference Providers and Inference Endpoints. The model is available in BF16 and FP8 formats, as well as quantized OMLX and GGUF versions. Transformers supports text, image and video inputs and tool calling; video processing requires torchcodec and ffmpeg.

Reasoning effort can be set to four levels: xhigh, high, low and off. The default is high when no value is specified.

Three GGUF versions are available for llama.cpp and Llama App: 4-bit Q4_K_M, 6-bit Q6_K and 8-bit Q8_0. GGUF and OMLX also support speculative decoding based on multi-token prediction. In the reported test, using three draft tokens on Apple Silicon M5 hardware with Q4 quantization increased generation speed by 22%.

On Apple Silicon, oMLX supports image input, multi-token prediction and offloading the PLE table to an SSD. Support for the language model in the official mlx-lm repository is still in preparation.

Training for security-alert triage

The release article also describes a reinforcement-learning example based on TRL. The model is given sanitized security alerts and evidence, then asked to decide how to handle each alert and cite the events supporting its decision. vLLM samples several responses, and the trainer updates a LoRA adapter based on their rewards. In the example, correct labels and citations are rewarded; another evaluation described in the article adds a small bonus for fewer tool calls.

The pipeline can run in a two-GPU Hugging Face Jobs environment, after which saved adapters can be compared with the base model on held-out cases. On the same 12 CyberDefense Bench tasks, the base model passed four, the adapter saved after 50 updates passed six, and the adapter saved after 100 updates passed three. The earlier checkpoint therefore performed better on this small sample, even though the overall training reward trended upward.

The developers also demonstrated the model with the Pi coding agent, using it to create an animated introduction, a presentation for developers and a scene depicting a flight over mountains.