Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Reader activity
0 Useful 1 Views 3 min Read — No ratings
Artificial Intelligence
3 min read

Qwen4-35B-A3B: 3B Active Params, 1M Context, 22% Faster Speculative Decoding

Alibaba's Qwen4-35B-A3B open-source model activates only 3B parameters per token using a 20B n-gram lookup and 2B speculative decoder, achieves 1M token context via grouped sparse attention, and shows mixed benchmark gains over the larger Qwen3.8-Flash-Next with 514 tokens/sec inference on a B300 GPU.

On December 4, Alibaba's Tongyi lab released the first downloadable Qwen 4 model, Qwen4-35B-A3B, on Hugging Face.

Model Architecture

The 35B-parameter model uses a hybrid design: only about 3B parameters are actively computed per token, roughly 20B parameters serve as an n-gram lookup table (read only a few rows per token), and 2B parameters drive speculative decoding that drafts three tokens ahead. The model accepts text, images, and video as input and outputs text. Native context length is 1,048,576 tokens .

Sparse Attention for Long Context

To handle 1M tokens without full attention, the 40 layers are divided into 10 groups. Each group passes through three fixed-size memory layers (state does not grow with context) followed by one sparse attention layer. Previous tokens are grouped in fours, with at most 512 groups (≈2048 positions) plus the tail group. Only the 10 sparse-attention layers store KV caches; the other 30 layers keep fixed states.

Mixture-of-Experts Routing

The model contains 256 experts . Each token activates 8 experts plus one always-on expert.

Benchmark Comparison with Qwen3.8-Flash-Next

Against the larger Qwen3.8-Flash-Next, results are mixed:

DeepSWE v1.1: 61.8 vs 58.7

AutomationBench-AA: 57.9 vs 55.9

HealthBench Professional: 47.4 vs 34.8 (large gap)

Terminal Bench 4.1: 21.2 vs 24.2

FrontierCode-AA 2.0: 16.1 vs 27.1 (significant drop)

The smaller model does not improve on long-range coding tasks.

Additional Benchmarks

Tests also cover Terminal, FrontierCode, Briefcase, and AutomationBench (APEX from Mercor). Compared to Qwen3.8-27B and Inkling2 Mini, the new model scores higher in most categories.

Benchmark chart 1
Benchmark chart 1
Benchmark chart 2
Benchmark chart 2

Inference Performance

Running on a single B300 GPU with vLLM and FP8 weights:

Single request: 514 tokens/sec , first token latency ~ 46 ms .

Tested on SPEED-Bench, temperature 1.0, draft 3 tokens, average 2.25 accepted tokens per step .

Four concurrent requests: throughput drops to 336 tokens/sec per request .

KV Cache Efficiency

1M-token KV cache occupies approximately 8 GB (only 10 sparse-attention layers store KV). Equivalent full-attention BF16 cache would require 80 GB .

KV cache comparison chart
KV cache comparison chart

Thinking Modes and Video Input

Four thinking levels are available: xhigh, high, low, and off (default high). The model card notes that short single-turn thinking may not speed up long tasks; insufficient analysis can trigger retries, increasing total time and token usage. Video input defaults to 2 frames per second.

Licensing and Availability

Weights, config, and tokenizer are on Hugging Face under Apache 2.0 . The model runs on llama.cpp, vLLM, SGLang, and MLX from day one. GGUF quantizations (4-bit, 6-bit, 8-bit) are provided. Training data was not released.

For attribution, corrections or content rights, contactadmin@besthub.dev

Report an issue with this article

Discussion 0

Write a comment

Sign in to join the discussion

No public comments on this page. Sign in to comment