// the layout
Qwen3.8-27B's model card:
Hidden Layout: 16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN))
Its config lists 16 full_attention layers and 48 linear_attention layers. The 48 keep a fixed-size state that doesn't grow with the conversation. Only the 16 keep a per-token cache.
What it measured in Ollama's engine
- 32K tokens: 2.0 GiB of cache, on 16 layers (the engine's own log:
llama_kv_cache: size = 2048.00 MiB ( 32768 cells, 16 layers …)). - 8K tokens: 0.5 GiB. It grows linearly, a quarter as fast as if all 64 layers cached.
- The fixed part: 149.6 MiB at both lengths. Small and constant, but not zero.
Setup: Ollama v0.40.13's bundled engine, qwen3.8:27b (Q4_K_M, digest e118e4d12a70), CPU, default f16 cache, one sequence. Stock ollama run ran out of RAM on our 15 GB test box during the weight repack, so we ran the same engine with repack off, which doesn't change the cache.
Against an all-attention model
The same lab's older dense Qwen3-32B caches on all 64 layers (8 KV heads × 128 dims each). By its config that is 256 KiB per token, about 8 GiB at 32K. That figure is derived, not measured.
Why not make every layer fixed?
Because a fixed memory is bad at exact lookups. From the Kimi Linear paper, a second lab with the same 3:1 bet: linear attention models "struggle to precisely retrieve the entire history from a compressed, fixed-size memory state", and hybrids that keep "a few global-attention layers alongside predominantly faster linear layers" are "a practical compromise between quality and efficiency".
Sources: Qwen3.8-27B model card and config.json, Qwen3-32B config.json (Hugging Face); ollama.com/library/qwen3.8; Kimi Linear tech report (arXiv 2510.26692); our load test. Verified 2026-11-02.
One concept a week. Free.
The deeper, copy-paste version of each ToolCall short — in your inbox.
// total: 0.00 · spam: void · unsubscribe: one click
