Alibaba’s Qwen Team has unveiled Qwen4-35B-A3B, a groundbreaking multimodal AI model that brings next-generation intelligence directly to edge devices. The model, now available on Hugging Face, combines a natively multimodal architecture with a staggering 1-million-token context window, setting a new benchmark for on-device AI capabilities.
The model’s architecture is a Mixture-of-Experts (MoE) system, where a core of ~35B parameters leverages just ~3.8B active parameters per token. This design slashes computational demands while maintaining high performance. A novel Per-Layer N-gram Embedding (PLE) system—comprising ~20.5B parameters—enhances contextual understanding by embedding tokens with local and global patterns. The model also introduces Gated DeltaNet and Qwen Sparse Attention (QSA), enabling it to selectively focus on critical segments of input data, even across vast contexts.
“Qwen4-35B-A3B redefines what’s possible on-device by merging multimodal flexibility with unprecedented context retention—all while staying lightweight enough for real-world deployment.” — Alibaba Qwen Team
Qwen4-35B-A3B’s native multimodal support extends beyond text, enabling seamless processing of images and video. For images, a Vision Transformer (ViT) encodes visual data into tokens, while video input is handled by sampling frames and grouping them into pairs for efficient analysis. The model’s Multi-Token Prediction (MTP) drafter and adjustable reasoning_effort levels (ranging from "xhigh" to "off") provide granular control over performance and latency, catering to both high-stakes and lightweight applications.
How to Deploy Qwen4-35B-A3B
Getting started with Qwen4-35B-A3B is straightforward, thanks to its day-zero ecosystem support across major AI frameworks. Developers can deploy the model using Hugging Face’s transformers library, with minimal code required for text, image, or video inputs.
For text-only inference, the model can be loaded and run with just a few lines of Python:
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="Qwen/Qwen4-35B-A3B",
processor="huggingface/Qwen4-35B-A3B-processor",
device_map="auto"
)
outputs = pipe("Explain quantum computing in simple terms.", max_new_tokens=2048)
print(outputs[0]["generated_text"])
For image-to-text tasks, users can pass images directly in the input pipeline:
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "Qwen/Qwen4-35B-A3B"
processor = AutoProcessor.from_pretrained("huggingface/Qwen4-35B-A3B-processor")
model = AutoModelForMultimodalLM.from_pretrained(model_id, device_map="auto")
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": "path/to/image.jpg"},
{"type": "text", "text": "Describe this image in detail."}
]
}
]
inputs = processor.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(processor.batch_decode(outputs, skip_special_tokens=True))
Similarly, video-to-text processing follows the same pattern, with the model analyzing sampled frames to generate coherent responses.
Benchmarks and Performance
Early benchmarks reveal that Qwen4-35B-A3B outperforms larger models in several tasks, despite its compact size. In comparative tests, it matched or exceeded the performance of Qwen 3.8 Flash Next—a much larger model—across coding, reasoning, and multimodal benchmarks. The model’s sparse attention mechanisms and PLE embeddings contribute to its efficiency, enabling it to handle complex inputs without excessive computational overhead.
With its Apache 2.0 license, Qwen4-35B-A3B is poised to become a cornerstone for developers building next-generation AI applications. Whether for edge devices, real-time analytics, or creative workflows, the model’s blend of power, flexibility, and open accessibility marks a significant leap forward in on-device AI.