[KongchangAI]
Deep Dives· 1 min read· 833 words

Qwen3.5 Deep Dive: Hybrid Attention Architecture Achieves 19x Speedup for Long Context

Qwen3.5 Deep Dive: Hybrid Attention Architecture Achieves 19x Speedup for Long Context

Alibaba's open-source Qwen3.5 uses hybrid attention to achieve 19x long-context speedup and surpass Gemini and GPT in vision.

Alibaba's open-source Qwen3.5 (397B parameters / 17B activated) employs a hybrid attention architecture combining Gated Delta Net linear attention with conventional gated attention, achieving 19x faster inference than the previous generation at 256K context. In benchmarks, its instruction following and multi-turn dialogue surpass GPT-5.2, and its multimodal visual reasoning surpasses Gemini 3 Pro and GPT-5.2 for the first time, though it still trails by 5-6 percentage points on doctoral-level STEM reasoning.

Alibaba recently open-sourced Qwen3.5, a 397B-parameter (only 17B activated) Mixture-of-Experts model that achieves remarkable acceleration in long-context inference through its hybrid attention architecture—8.6x faster than the previous generation at 32K context, and 19x faster at 256K context. Even more noteworthy, it genuinely surpasses Gemini 3 Pro and GPT-5.2 in multimodal visual reasoning for the first time. This article provides an in-depth breakdown of Qwen3.5's core highlights across three dimensions: architectural innovation, benchmark performance, and engineering practice.

Hybrid Attention Architecture: The Key Breakthrough for Long-Context Inference

Qwen3.5's flagship model is officially named Qwen3.5-397B-A17B, where A17B indicates that only 17B parameters are activated per forward pass—an activation ratio of just 4.3%. For comparison, DeepSeekAd V3's 671B model has an activation ratio of 5.5%, making Qwen3.5's sparsity more aggressive.

Mixture-of-Experts (MoE) Background: MoE is an architectural paradigm that splits a large neural network into multiple "expert" sub-networks. During each forward pass, a gating network (Router) activates only a small subset of experts to process the current input, rather than engaging all parameters. This sparse activation mechanism allows the model to have an enormous total parameter count (boosting capacity and knowledge storage) while maintaining low per-inference computation (reducing latency and cost). The MoE architecture was first proposed by Jacobs et al. in 1991 and has been applied at scale to LLMs by top labs including Google (Switch Transformer, Gemini), Meta (Mixtral), and DeepSeek in recent years. Its core challenges include load balancing—avoiding routing all tokens to the same set of experts—and efficiently scheduling inter-expert communication overhead in distributed training.

But sparse MoE is nothing new. The real architectural innovation in this generation is the hybrid attention mechanism. Specifically, Qwen3.5 combines two attention mechanisms:

  • Gated Delta Net: A linear attention variant that reduces state-space complexity from standard attention's O(N²) to O(N), making it extremely friendly for ultra-long context inference
  • Gated Attention: A conventional attention mechanism that preserves accuracy for high-quality short-context tasks

Linear Attention and Gated Delta Net Technical Principles: Standard Transformer self-attention has O(N²) computational complexity, where N is the sequence length. This means processing 256K tokens requires 64x the computation of 32K, and KV Cache memory usage also explodes linearly with sequence length. Linear Attention approximates the attention matrix through kernel functions, reducing complexity to O(N) at the cost of some precision loss. Gated Delta Net is an improved variant of linear attention that introduces a gating mechanism to dynamically regulate state update magnitude, and borrows from the Delta Rule (incremental learning rule) to achieve more precise memory writing and forgetting. It has better expressiveness on long-sequence tasks than earlier linear attention approaches (such as Performer and RWKV). Its state can be understood as a fixed-size "compressed memory matrix" that doesn't expand with sequence length—this is the fundamental reason for the massive speedup in long-context inference.

The logic of how these two mechanisms work together is clear: for long contexts, the model primarily takes the linear path to avoid KV Cache memory explosion; for short contexts, mixed output preserves accuracy. This architectural choice directly manifests in inference speed.

Qwen3.5 inference speed comparison with mainstream models

At 32K context, Qwen3.5 is 8.6x faster than the previous-generation Qwen3 Max and 3.5x faster than Qwen3.2 (also a MoE architecture). At 256K context, the gap widens to 19x and 7.2x respectively. The longer the context, the more pronounced the hybrid attention architecture's advantage becomes.

However, a dose of realism is warranted: the 19x figure is for the extreme 256K scenario. Typical daily workloads usually fall in the 8K to 32K range, making the 8.6x number more practically relevant.

Benchmark Performance: Multimodal Vision Surpasses Gemini 3 Pro for the First Time

Natural Language Capabilities: Strong Performance in Instruction Following and Multilingual Scenarios

Qwen3.5 is roughly on par with Kimi K2.5 (a trillion-parameter-class model) in natural language benchmarks, surpassing GPT-5.2 and Claude on several metrics:

  • Instruction Following (IFBench): 76.5, exceeding GPT-5.2's 75.4 and far surpassing Claude 4.5 Opus's 58
  • Multi-turn Dialogue (Multi-Challenge): 67.6, 10 percentage points higher than GPT-5.2
  • Multilingual Math Reasoning: Also delivers strong results

However, gaps remain in hardcore STEM reasoning. On HLE (doctoral-level comprehensive problems), Qwen3.5 scores 28.7 versus GPT-5.2's 35.5; on AIME 2026 math competition, Qwen3.5 scores 91.3 versus GPT-5.2's 96.7—a gap of approximately 5-6 percentage points. Open-source models still face challenges catching up to closed-source on the most difficult reasoning tasks.

HLE and AIME Benchmark Explanations: HLE (Humanity's Last Exam) is an ultra-high-difficulty comprehensive evaluation set jointly released by Scale AI and the Center for AI Safety. Questions are contributed by top scholars worldwide, covering doctoral-level problems across dozens of fields including mathematics, physics, chemistry, biology, law, and history. It was designed to identify the true capability ceiling of current AI models. AIME (American Invitational Mathematics Examination) is a U.S. high school mathematics invitational competition, with problems primarily in algebra, number theory, and combinatorics that require multi-step rigorous reasoning. It serves as a standard benchmark for measuring competition-level mathematical reasoning ability. Both are considered "anti-benchmark-gaming" evaluations.

#Qwen3.5#hybrid attention architecture#Gated Delta Net#long context inference#Mixture of Experts#linear attention#multimodal AI#open source LLM
Share:

Related articles