Alibaba’s Qwen4 multimodal AI model is available on Hugging Face, combining native text, image and video inputs with a 1 million-token context window. Released on December 4, 2026, Qwen4-35B-A3B comes with open weights, an Apache-2.0 license and launch-day support across major inference tools.
Summary
Key takeaways
- Qwen4-35B-A3B produces text from text, images or video.
- Its architecture combines roughly 35 billion main parameters with 20.5 billion embedding parameters.
- Launch support includes transformers, llama.cpp, vLLM and SGLang.
- A cyber-defense training example achieved its best evaluation result before the final checkpoint.
Inside the Qwen4 multimodal AI model
Qwen4-35B-A3B uses a mixture-of-experts architecture with approximately 35 billion main parameters and 3.8 billion active parameters per token. A separate Per-Layer N-gram Embedding table adds about 20.5 billion parameters, bringing the total to roughly 56 billion, according to the Alibaba Qwen Team’s release post.
The decoder repeats a four-layer sequence ten times: three Gated DeltaNet layers update a fixed-size memory, followed by a Qwen Sparse Attention layer that retrieves individual tokens from across the context. Its indexer selects up to 512 groups of four tokens, allowing attention to read as many as 2,048 selected tokens, plus up to three remaining tokens.
The model has 256 routed experts. Each token uses eight selected experts and a shared expert, while learned gates mix information across four residual streams.
The 20.5 billion-parameter embedding table sits in the second decoder layer. Each token reads 16 rows: eight lookups capture two-token patterns and eight capture three-token patterns. A short convolution mixes nearby patterns.
For images, a Vision Transformer reads 16-by-16 patches and merges each two-by-two group into a visual token for the text decoder. Two frames per second are extracted during video processing, with consecutive sampled frames combined into pairs, and the model’s output consists of text.
Formats, reasoning controls and faster generation
Available checkpoints include BF16, FP8, OMLX and GGUF versions. Among the GGUF releases are Q4_K_M 4-bit, Q6_K 6-bit and Q8_0 8-bit variants.
Multi-Token Prediction supports speculative decoding for GGUF and OMLX. Hugging Face reported a 22% generation-speed increase on Apple Silicon M5 using Q4 quantization and three draft tokens.
Developers can also adjust reasoning effort to “xhigh,” “high,” “low” or “off.” The default setting is “high.” On Apple Silicon, oMLX supports image input, Multi-Token Prediction and offloading the large embedding table to SSD, with custom Metal kernels for sparse attention and gated residual processing.
Launch-day inference support and demonstrations
The Qwen4 multimodal AI model has launch-day ecosystem support across transformers, llama.cpp, Llama App, vLLM, SGLang, MLX, TRL, Inference Providers and Inference Endpoints.
In transformers, developers can use the image-text-to-text pipeline or load AutoModelForMultimodalLM and AutoProcessor directly. The supplied examples cover text-only prompts, combined image-and-text messages, video questions and tool calling. Video inference requires torchcodec and ffmpeg.
Demonstrations pair the model with the Pi coding agent for animation-video creation and presentation-slide generation. Another demonstration generates a cinematic flight scene over mountains and clouds without added skills.
Cyber-defense training delivers mixed checkpoint results
A TRL training recipe uses AsyncGRPOTrainer to adapt Qwen4-35B-A3B for security-alert triage and evidence citation. Its evaluation shows that higher training rewards did not correspond to the strongest held-out result.
The pipeline supplies sanitized alerts and evidence records, uses vLLM to sample multiple replies, and rewards answers whose labels and citations match the analyst’s criteria. Relative rewards then guide updates to a LoRA adapter. A two-GPU Hugging Face Jobs setup runs inference on one GPU and training on the other.
On these same 12 held-out CyberDefense Bench tasks, 4 of 12 were passed by the base model, 6 of 12 by the update-50 adapter, and 3 of 12 by the update-100 adapter. The earlier adapter performed best in that sample even as overall training reward rose.
Open weights under Apache-2.0
Qwen4-35B-A3B is open-sourced on Hugging Face under the Apache-2.0 license. The release provides BF16, FP8, OMLX and GGUF checkpoints alongside inference and fine-tuning examples.
Article produced with the assistance of artificial intelligence and reviewed by the editorial team.




