Oossa

Alibaba’s Qwen4 reads video and images with a million-token window

The Apache-2.0-licensed model has day-one support in tools including llama.cpp, vLLM and Transformers.

By Published by Oossa: 2 min read

Jakob Owens · Unsplash

Qwen4-35B-A3B is available on Hugging Face with a context window of 1 million tokens. The Alibaba Qwen Team’s model takes text, images and video as input and returns text. Hugging Face says it is aimed at local setups and is licensed under Apache-2.0.

What is inside the model?

Qwen4 is a mixture-of-experts model, a design that activates only selected parts for each token. It has about 35 billion main parameters, with roughly 3.8 billion active per token, plus 20.5 billion parameters in a separate per-layer embedding table. The model has about 56 billion parameters in total and 256 routed experts.

Its text decoder repeats a four-layer pattern ten times. Three layers use Gated DeltaNet, which updates a fixed-size memory as it reads; the fourth uses Qwen Sparse Attention to select parts of the context. A small indexer groups tokens in fours and selects up to 512 groups. The attention layer then reads the individual tokens in those groups, up to 2,048, plus any tokens in the last unfinished group.

The second decoder layer also has the large embedding table. Each token draws 16 rows from it, encoding recent tokens, and the model combines those embeddings with information from its other layers.

Text, images and video

The model’s vision system breaks images into 16-by-16 patches, then combines each group of four neighboring patches into one visual token for the text decoder. For video, it samples two frames per second and groups consecutive sampled frames in pairs; patches within each pair can attend to one another.

Developers can adjust the model’s reasoning effort using four settings: “xhigh,” “high,” “low” and “off.” The default is “high.” Hugging Face lists support in Transformers, llama.cpp, Llama App, vLLM, SGLang, Inference Providers and Inference Endpoints, and says the integrations were available on release day.

Files, speed and an early training result

The release includes BF16, FP8, OMLX and GGUF versions. The GGUF files come in 4-bit, 6-bit and 8-bit formats. Hugging Face says multi-token prediction, a method that drafts several tokens at once, increased generation speed by 22% on an Apple Silicon M5 using the 4-bit file and three draft tokens. That result is specific to the setup described, not a general speed guarantee.

Hugging Face also describes a cyber-defence training example. On 12 held-out CyberDefense Bench tasks, the base model passed 4; one trained adapter passed 6, while a later adapter passed 3. The post says the earlier adapter did best on that sample even as the overall training reward rose. It does not provide detailed results for the broader benchmark comparisons it mentions.

Why it matters

For developers, the Apache-2.0 licence and support in tools such as llama.cpp make Qwen4 available for local setups. But the post does not specify hardware requirements, and its reported speed result applies to one setup, so developers cannot tell from these details what performance to expect on their own machines.

What it means for you

For developers, the Apache-2.0 licence and support in tools such as llama.cpp make Qwen4 available for local setups. But the post does not specify hardware requirements, and its reported speed result applies to one setup, so.

Our take: The part worth weighing is this: Qwen4-35B-A3B has a 1 million-token context window and accepts text, image and video inputs.

Was this article useful?
Share

Read next

Oossa · Newsletter

The week in AI, explained

Every Monday: the stories worth knowing, in plain language. Free, no spam.