Alibaba's Qwen4 multimodal AI model has been launched on Hugging Face, supporting native text, image, and video inputs, and boasts a context window of 1 million token. It was released on December 4, 2026, with open-source weights and Apache-2.0 licensing, and received support from mainstream promotion tools on the day of its release.
Key Points
- Qwen4-35B-A3B can generate text based on text, images, or videos.
- Its architecture combines approximately 35 billion main parameters and 20.5 billion embedded parameters.
- Received support from tools such as transformers, llama.cpp, vLLM, and SGLang on the day of release.
- An example of network defense training achieved the best evaluation results before the final checkpoint.
Qwen4 Multimodal AI Model Internal Architecture
According to an article published by Alibaba's Qwen team, Qwen4-35B-A3B adopts a hybrid expert architecture with approximately 35 billion main parameters. Each token activates 3.8 billion parameters. There is also an independent, layered N-gram embedded table that adds about 20.5 billion more parameters, bringing the total number of parameters to around 56 billion.
The decoder repeatedly executes a four-layer sequence ten times in total: the first three layers are Gated DeltaNet layers, which are used to update memory of a fixed size; followed by a Qwen Sparse Attention layer, which is used to search for individual token from the entire context. Its indexer can select up to 512 groups, with each group containing 4 token, allowing attention to read a maximum of 2,048 selected token, plus an additional maximum of 3 remaining token.
The model has a total of 256 routing experts. Each token utilizes 8 selected experts and 1 shared expert, and the gating mechanism learned is used to mix information between the 4 residual streams.
This embedding table with 20.5 billion parameters is located in the second decoding layer. Each token reads 16 lines: 8 searches are used to capture the double token pattern, and another 8 searches are used to capture the triple token pattern. A short convolution is used to mix the nearby patterns.
In terms of images, Vision Transformer reads 16×16 image blocks and merges every two adjacent blocks into a single visual token for use by the text decoder. During video processing, 2 frames are extracted per second, and consecutive sampled frames are merged in pairs, with the model outputting text as a result.
Format, reasoning control, and faster generation
Available checkpoints include BF16, FP8, OMLX, and GGUF versions. Among them, the release of GGUF includes variants Q4_K_M 4-, bit Q6_K 6-, bit Q8_0 8-, and bit.
Multi - Token Prediction supports speculative decoding of GGUF and OMLX. Hugging Face indicates that when using Q4 quantization and 3 draft token on Apple Silicon M5, the generation speed has increased by 22%.
Developers can also adjust the inference strength to “xhigh”, “high”, “low” or “off”, with the default setting being “high”. On “Apple Silicon”, “oMLX” supports image input, “Multi” to “Token Prediction”, as well as unloading large embedded tables to “SSD”. It also provides a custom “Metal” kernel for sparse attention and gated residual processing.
Inference support and demonstration on the day of release
Qwen4 The multimodal AI model received ecological support on the day of its release, covering transformers, llama.cpp, Llama App, vLLM, SGLang, MLX, TRL, Inference Providers, and Inference Endpoints.
In transformers, developers can use image-text-to-text and pipeline, or directly load AutoModelForMultimodalLM and AutoProcessor. The provided examples cover plain text prompts, mixed-text messages with images, video Q&A, and tool calls. Video inference requires torchcodec and ffmpeg.
The demonstration content combined this model with the Pi encoding proxy to generate animated videos and presentation slides. Another demonstration created a cinematic scene of flying over mountains and clouds without adding any additional skills.
Differences in network defense training results
A set of TRL training schemes uses AsyncGRPOTrainer, and Qwen4-35B-A3B is adjusted for security alarm diversion and evidence citation. The evaluation shows that higher training rewards do not correspond to the strongest results from the reserved set.
This process provides cleaned alert and evidence records. It uses vLLM to sample multiple responses, and rewards answers that have tags and references that are consistent with analyst standards. Subsequently, these rewards are used to update the LoRA adapter. A setup with two GPU instances of Hugging Face Jobs runs inference on one GPU, while training is conducted on another GPU.
On the same 12 tasks with CyberDefense Bench reserved, the basic model passed 4 out of 12 questions, the update-50 adapter passed 6 out of 12 questions, and the update-100 adapter passed 3 out of 12 questions. Although the overall training reward increased, the earlier adapted models performed the best on this sample.
Open source weights under Apache-2.0
Qwen4-35B-A3B has been made open-source on Hugging Face under the Apache-2.0 license. This release provides BF16, FP8, OMLX, and GGUF checkpoints, as well as examples for inference and fine-tuning.











