ANTM
Open SourceAnalysis

Qwen3.6-27B: What the Hybrid Attention Design Does to Memory, and What Its Benchmarks Show

Only 16 of Qwen3.6-27B's 64 layers use full attention. The published configuration lets you compute what that does to long-context memory, and the model card shows where the benchmark gains actually are.

Editorial desk

Published 6 min read

Thin vertical teal lines of rising height standing on a horizontal baseline, each topped with a small orange dot, with a few brighter lines among fainter ones, on a dark navy background
Illustration generated with AI (FLUX.1 [schnell] (Black Forest Labs) via Cloudflare Workers AI, Apache 2.0). Prompt and direction by ANTM.

Long-context models are usually limited by memory, and the weights are only half of it. The other half is the KV cache, which grows with every token in the context. Qwen3.6-27B is a useful case because its published configuration shows an unusual layer mix, and the numbers in that configuration are enough to compute the cache cost yourself. This article does that arithmetic, then reads the model card's own benchmark table for what actually changed against its predecessor.

What the model card says

The model card describes Qwen3.6-27B as a causal language model with a vision encoder, released under Apache 2.0, and as the first open-weight Qwen3.6 release after the Qwen3.5 series in February. It dates the release to April 2026; the card does not give an exact day. (Some third-party release trackers list a later date. We went with the card.) The highlights it names are agentic coding and "Thinking Preservation," an option to retain reasoning from earlier messages.[1]

Native context is 262,144 tokens, extensible to 1,010,000 with YaRN. The card warns that the static YaRN setting may affect performance on shorter texts.[1]

The layer mix, from the published config

The card lays the architecture out as 16 repeats of three Gated DeltaNet blocks followed by one gated-attention block. The raw configuration confirms it: 64 hidden layers, with a full_attention_interval of 4, so layers 4, 8, 12 and so on up to 64 use full attention (16 layers) and the other 48 use linear attention.[1][2]

SpecValue (from config.json and the card)
Hidden layers64
Full-attention layers16 (every fourth)
Linear-attention (Gated DeltaNet) layers48
Full-attention KV heads / head dimension4 / 256
Native context262,144 tokens
Weights in the repository (BF16)55.6 GB

Gated DeltaNet is described in a separate paper by Yang, Kautz and Hatamizadeh. Its abstract frames it as a linear-attention design that combines gating, for fast memory erasure, with the delta rule, for targeted updates, and reports hybrids with other layer types as a way to improve both training efficiency and task performance.[4] The property that matters here is the one that defines linear attention generally: those layers carry a fixed-size state rather than a cache that grows with context. We did not measure that state's size and do not include it below.

The KV-cache arithmetic

Each full-attention layer stores one key and one value vector per KV head per token. With 4 KV heads, a head dimension of 256 and BF16 (2 bytes):

  • Per layer, per token: 2 (K and V) x 4 x 256 x 2 bytes = 4,096 bytes.
  • Across the 16 full-attention layers: 65,536 bytes, which is 64 KiB per token.

Scaled to context length, with a hypothetical all-64-layer version of the same attention shape for comparison (our construction, not a Qwen model):

ContextKV cache, as published (16 layers)If all 64 layers used full attention
32,768 tokens2 GiB8 GiB
131,072 tokens8 GiB32 GiB
262,144 tokens16 GiB64 GiB
1,010,000 tokens (YaRN)about 61.7 GiBabout 247 GiB

Three caveats apply. These figures cover only the attention KV cache at batch size 1; real servers add the linear-attention state, activations, the vision encoder and framework overhead. Quantising the cache to 8 bits would roughly halve the numbers, and some serving stacks do that, but we have not checked which Qwen3.6 recipes support it. And the model-card text does not report a measured memory figure, so treat the table as an estimate from the config, not a Qwen statement.

For general background on why the cache matters, see inference serving explained.

What this means for weights plus cache

The repository totals 55.6 GB in BF16 across 15 safetensors shards.[3] That is consistent with roughly 28 billion parameters at two bytes each (the Hugging Face metadata lists 28B; the card text says 27B).[1] Our rough arithmetic for 4-bit weights is about a quarter of that, near 14 GB before quantisation overhead and the vision encoder. Add the 8 GiB cache for a 131,072-token context and you are in the low 20s of gigabytes. That is why a 24 GB card is plausible for quantised use at moderate context, and why we call it plausible rather than documented: the card publishes no VRAM requirement.[1]

The card's serving examples use 8-way tensor parallelism for SGLang and vLLM. It advises reducing the context window if you hit out-of-memory errors, but keeping at least 128K tokens to preserve thinking capabilities. It also notes a vLLM flag, --language-model-only, that skips the vision encoder to free memory for the KV cache. Minimum framework versions listed are SGLang 0.5.10 and vLLM 0.19.0.[1]

For a comparison point on fitting large models into 24 GB by a different route, see how NVIDIA squeezes a 74B model into 24 GB.

What the benchmarks show

The card compares Qwen3.6-27B with Qwen3.5-27B and with Qwen3.6-35B-A3B. A selection from its table:[1]

BenchmarkQwen3.6-27BQwen3.5-27B
Terminal-Bench 2.059.341.6
SkillsBench Avg548.227.2
SWE-bench Verified77.275.0
LiveCodeBench v683.980.7
GPQA Diamond87.885.5
MMLU-Pro86.286.1
HLE24.024.3

Our reading: the largest jumps are on agent-style tasks (Terminal-Bench 2.0 and SkillsBench), a moderate gain on SWE-bench Verified, and flat results on the knowledge benchmarks, with HLE a hair lower. That pattern fits the card's own emphasis on agentic coding.

How much to trust these rows is a separate question. The card says the SWE-bench series used an internal scaffold with bash and file-edit tools at temperature 1.0, and that Terminal-Bench 2.0 used the Harbor/Terminus-2 harness with a three-hour timeout, averaged over five runs.[1] Those are Qwen's settings, run by Qwen. Scaffold and timeout choices move agentic scores substantially, so they are not directly comparable with other vendors' numbers. How to read an AI benchmark claim covers the checks to apply. We ran none of these benchmarks.

Licence

The card lists the licence as Apache 2.0. The licence text grants contributors' patent rights to users, which ends for anyone who sues claiming the work infringes a patent. For redistribution it requires that you give recipients a copy of the licence, mark modified files, keep existing notices, and carry over any NOTICE file.[5] That is a permissive licence by the usual standard. Whether the weights are "open source" in the stricter sense is a separate argument, covered in open weights vs open source. We did not check what training data or code Qwen has released alongside.

Sampling settings worth knowing

The card recommends different settings by mode: for thinking mode on general tasks, temperature 1.0, top_p 0.95, top_k 20; for precise coding in thinking mode, temperature 0.6; for non-thinking mode, temperature 0.7, top_p 0.80, top_k 20 and a presence penalty of 1.5. Thinking is on by default, and non-thinking mode is switched off through chat_template_kwargs: {"enable_thinking": False}. The /think and /nothink soft switches are not supported.[1] The card warns that higher presence penalties can cause language mixing.

Who should consider it

  • Local or single-node coding agents: the published agentic gains and permissive licence make it a candidate to test, with your own tasks and scaffold.
  • Long-document work: the cache arithmetic makes 128K practical to budget for, but capacity is not reliability; see long context windows.
  • Knowledge-heavy Q&A: the card shows little change from the previous 27B, so there is less reason to switch on that basis alone.

Method and limits

We opened the model card, config.json and file listing on 2026-10-24, and the Gated DeltaNet abstract and Apache 2.0 text the same day. We did not open Qwen's own blog post (it did not load for us), so we make no claims about its content, including any comparison with larger Qwen models. The KV-cache figures are our arithmetic from the config; we did not run the model or measure memory. All benchmark numbers are Qwen's self-reported results.

Frequently asked questions

What is Qwen3.6-27B?
A 27B-parameter open-weight causal language model with a vision encoder from Alibaba's Qwen team, released under the Apache 2.0 licence, with a native context of 262,144 tokens.[1]
How much KV-cache memory does it need?
By our arithmetic from the published config, 64 KiB per token in BF16, which is 16 GiB at 262,144 tokens, because only 16 of its 64 layers keep a per-token KV cache.[2]
Can I use it commercially?
The model card lists the licence as Apache 2.0, which grants a patent licence and allows redistribution if you keep the licence, notices and change marks. Read the licence text for your own case.[1][5]
Does it need 8 GPUs?
The card's serving examples use 8-way tensor parallelism, but it does not state a minimum VRAM figure. The repository is 55.6 GB in BF16, so weights alone exceed any single 24 GB card without quantisation.[1][3]

The ANTM newsletter

The signal, not the noise.

Sourced AI coverage in your inbox. Double opt-in, unsubscribe in one click.

Referenced sources

  1. 1.
    Qwen3.6-27B (model card)(opens in a new tab)

    Qwen on Hugging FacePrimary sourcePublished Apr 22, 2026Accessed Oct 3, 2026

  2. 2.
    Qwen3.6-27B config.json(opens in a new tab)

    Qwen on Hugging FacePrimary sourcePublished Apr 22, 2026Accessed Oct 3, 2026

  3. 3.
    Qwen3.6-27B repository files(opens in a new tab)

    Qwen on Hugging FacePrimary sourcePublished Apr 22, 2026Accessed Oct 3, 2026

  4. 4.
    Gated Delta Networks: Improving Mamba2 with Delta Rule(opens in a new tab)

    arXiv (Yang, Kautz, Hatamizadeh)ResearchPublished Dec 9, 2024Accessed Oct 3, 2026

  5. 5.
    Apache License, Version 2.0(opens in a new tab)

    Apache Software FoundationPrimary sourcePublished Jan 1, 2004Accessed Oct 3, 2026

ANTM Editorial

Editorial desk

The editorial desk at AI's Next Top Model. Every article is sourced to primary documents and approved by an editor before publication. See the editorial policy for how we work.