← All Models

Qwen4

2.8K Downloads

Qwen's hybrid mixture-of-experts model for coding, visual understanding, and long-horizon tool use, with adjustable reasoning and a native 1M-token context window.

Download models
Updated 1 hour ago
21.50 GB

Memory Requirements

To run the smallest Qwen4, you need at least 22 GB of RAM.

Capabilities

Qwen4 models support tool use, vision input, and reasoning. They are available in gguf.

About Qwen4

Qwen4 is Alibaba's Qwen model series built around hybrid linear and sparse attention. Qwen4-35B-A3B is an open-weight vision-language model for local deployment, combining coding and tool use with image understanding and a native 1,048,576-token context window. The model also supports video input; modality support depends on the runtime and interface. It produces text.

Hybrid attention and sparse experts

The 40-layer decoder repeats three Gated DeltaNet layers followed by one Qwen Sparse Attention layer. Linear attention maintains a fixed-size memory, while sparse attention retrieves selected tokens from across the context, reducing the cache footprint of long sequences.

Each MoE layer selects 8 routed experts out of 256, alongside one shared expert. Learned gates mix four residual streams between blocks.

The 35B name describes the main model, not all stored weights. Hugging Face reports approximately 35B main-model parameters with 3.8B active per token, plus 20.5B per-layer n-gram embedding parameters. Qwen also lists approximately 2B MTP parameters. The n-gram table supplies sparse lookups for recent token patterns and can be offloaded in supporting runtimes; the active parameter count is not the model's memory requirement.

Coding, vision, and tool use

Qwen highlights improvements in long-horizon agent workflows, frontend development, 3D modeling, and game development through code and external tools. Native visual inputs let the model reason over images and screenshots alongside text.

Reasoning effort supports xhigh, high, low, and off, with high as the default. Off disables thinking entirely, and reasoning from previous assistant turns is preserved by default. Qwen notes that lower effort can increase retries on complex agent tasks, so faster individual responses do not always mean faster completion.

Selected benchmarks

Eight benchmark comparisons between Qwen4-35B-A3B, Qwen3.8-Flash-Next, Qwen3.8-27B, and Inkling 2 Mini

Source: Hugging Face's Qwen4 launch article, using the Qwen team's published comparison.

The comparison reports 61.8 on DeepSWE v1.1 and 57.9 on AutomationBench-AA for Qwen4-35B-A3B. Results vary by task: Qwen3.8-Flash-Next remains ahead on Terminal Bench 4.1 and FrontierCode-AA 2.0. Terminal Bench, FrontierCode, AutomationBench, and AA-Briefcase scores are cited from Artificial Analysis; APEX-Agents scores come from Mercor. See the official model card for the full results and evaluation notes.

Running locally

The GGUF download requires at least 22 GB of system memory. Actual memory use depends on quantization, context length, and runtime settings; this minimum does not imply capacity for a full 1M-token context.

License

Released under Apache 2.0. Learn more in the official model card and Hugging Face launch article.