Alibaba releases Qwen 4: A multimodal MoE with 1M context
The Alibaba Qwen Team has launched Qwen4-35B-A3B, a multimodal mixture-of-experts model featuring a massive 1M token context window and native video support.
Source: Hugging Face BlogAlibaba's Qwen Team has released Qwen4-35B-A3B, a next-generation multimodal Mixture-of-Experts (MoE) model designed for high performance and on-device intelligence. This release marks the production debut of a hybrid architecture that integrates text, image, and video processing into a single framework.
What are the technical specifications of Qwen 4?
According to a report from the Hugging Face Blog, the Qwen4-35B-A3B model utilizes a hybrid design with approximately 35B total parameters. However, due to its MoE architecture, it only uses about 3.8B active parameters per token. The model also incorporates a significant Per-Layer N-gram Embedding (PLE) component, which accounts for roughly 20.5B parameters, bringing the total parameter count to approximately 56B.
One of the most notable features is its native 1M token context window. To manage this massive context, the model employs a specific decoder pattern. The first three layers of the text decoder use Gated DeltaNet to update a fixed-size memory during token reading, while the fourth layer utilizes Qwen Sparse Attention (QSA). This QSA mechanism allows tokens to selectively look back at up to 2,048 specific tokens from the context by using an indexer that groups tokens into sets of four.
How does the multimodal architecture work?
Qwen 4 is built to handle diverse inputs natively. For visual data, the model uses a vision transformer (ViT) that processes images by reading them into patches. These patches are then merged into visual tokens for the text decoder. When processing video, the system samples two frames per second and groups consecutive frames into pairs, allowing the ViT to facilitate attention between all patches within those frame pairs. This capability is demonstrated in several visual demonstrations, including a video showing model performance on specific tasks [https://huggingface.co/buckets/huggingface-projects/qwen-release-assets/resolve/specbench-vid.mp4] and a demonstration of its interface [https://huggingface.co/buckets/huggingface-projects/qwen-release-assets/resolve/llama-cpp-app.mp4], as well as a video of flight-related content [https://huggingface.co/buckets/huggingface-projects/qwen-release-assets/resolve/flight.mp4].
Information flow within the model is also unique. Each token is initialized with four copies of its 2,048-dimensional embedding, creating four distinct residual streams. Learned gates mix these streams before they enter MoE or attention blocks, and the resulting output is scaled and added back to each stream independently.
How can developers run Qwen 4?
Developers can access the model through various ecosystems. Hugging Face has provided day-0 support for several major libraries and frameworks. Using the transformers library, users can implement an "any-to-any" pipeline for image, text, and video tasks. The model also allows for adjustable reasoning effort, with settings including "xhigh", "high", "low", or "off".
For local and on-device deployment, the model is compatible with llama.cpp, vLLM, SGLang, and MLX. On Apple Silicon, the model can run using oMLX, which utilizes custom Metal kernels for specialized tasks like QSA and gated residuals. Furthermore, the model supports Multi-Token Prediction (MTP) speculative decoding. In testing on an Apple Silicon M5 chip using a 4-bit quantization, using three draft tokens increased generation speed by 22%.
What are the performance benchmarks?
While the Qwen team has published detailed benchmarks in the official model card, initial observations suggest the model performs significantly better than its parameter class would suggest. According to the Hugging Face Blog, Qwen4-35B-A3B shows performance comparable to the much larger Qwen 3.8 Flash Next model and even outperforms it in certain specific tasks.
How does this impact the AI ecosystem?
The release of Qwen 4 provides a highly efficient, open-weight (Apache-2.0 licensed) alternative for developers needing long-context multimodal capabilities. By optimizing for both massive context and efficient active parameter usage, it bridges the gap between massive frontier models and the need for practical, deployable intelligence.
For researchers and developers looking to experiment with different model architectures, you can explore the capabilities of various high-performance models side-by-side in Grafy Chat. This allows for direct comparison of how different MoE or dense models handle complex multimodal prompts or long-context reasoning tasks.
Frequently asked questions
What is the total parameter count of Qwen4-35B-A3B?
The model has a total of approximately 56B parameters. This includes 35B main parameters and an additional 20.5B Per-Layer N-gram Embedding (PLE) parameters. Despite this total size, the Mixture-of-Experts architecture ensures that only about 3.8B parameters are active for each token processed.
Does Qwen 4 support video input?
Yes, Qwen 4 supports native video input. The model processes video by sampling two frames per second and grouping these sampled frames into pairs. A vision transformer then enables every patch within a frame pair to attend to every other patch, which is then passed to the text decoder.
What is the maximum context window for this model?
The Qwen4-35B-A3B model features a native context window of 1M tokens. It manages this large window using a combination of Gated DeltaNet for memory updates and Qwen Sparse Attention (QSA) to allow tokens to selectively retrieve information from across the context.
Source: Hugging Face Blog — Welcome Qwen 4: Cutting-edge intelligence on-device


