Repository navigation
Paper §3.4: Qwen3.5 attention scarcity — why plasticity works so well - #596
Conversation
…carcity hypothesis Hybrid attention/linear architecture means attention heads are scarce. Pruning has outsized impact because surviving heads must compensate harder. Explains +24% on 4B. Adds HumanEval verification (~70%+ pass@1). Predicts hybrid architectures will show larger plasticity gains.
There was a problem hiding this comment.
Pull request overview
Adds a new discussion to the Experiential Plasticity paper explaining why Qwen3.5’s hybrid attention/linear architecture may yield outsized gains from pruning-and-retraining, and includes a brief HumanEval performance claim for the forged 4B model.
Changes:
- Adds a “HumanEval verification” performance note for the forged Qwen3.5-4B model.
- Introduces a new section explaining the “attention scarcity” hypothesis for stronger plasticity gains on Qwen3.5 hybrid architectures.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **HumanEval verification**: The forged 4B model scores **~70%+ pass@1 on HumanEval** (164 problems, greedy decoding), competitive with dedicated coder models at 2-3x the parameter count (Qwen2.5-Coder-3B: 66%, Phi-3-mini: 62%). At 2.6GB GGUF (Q4_K_M), this runs on iPhone and Raspberry Pi. | ||
|
|
There was a problem hiding this comment.
The HumanEval result is presented as a headline verification, but the paper’s Reproduction section doesn’t include how to run this benchmark (harness/version, prompt, max tokens, stop conditions, and exact command). Please add enough detail (or a link to a script/run artifact) so this ~70%+ pass@1 claim is reproducible.
|
|
||
| Qwen3.5's architecture uses a hybrid of full self-attention layers and linear attention (Mamba-style) layers. Only a fraction of layers (16 of 64 in the 27B) use traditional multi-head attention — the rest use linear recurrence that cannot be pruned in the same way. This architectural choice creates an important dynamic for experiential plasticity: | ||
|
|
||
| 1. **Attention is scarce**: With few attention layers, each head carries disproportionate weight. Pruning a low-value head in a model with 64 attention layers loses ~1.5% of attention capacity. In Qwen3.5-27B with 16 attention layers, pruning the same head loses ~6%. The remaining heads must compensate harder. |
There was a problem hiding this comment.
The capacity math in bullet (1) mixes “heads” and “attention layers”: pruning a single head is not equivalent to removing 1/64 of attention capacity unless you define capacity purely by attention-layer count. Please clarify the unit being pruned (head vs layer) and base the percentage on (num_attention_layers × heads_per_layer) if you’re talking about head pruning.
| 1. **Attention is scarce**: With few attention layers, each head carries disproportionate weight. Pruning a low-value head in a model with 64 attention layers loses ~1.5% of attention capacity. In Qwen3.5-27B with 16 attention layers, pruning the same head loses ~6%. The remaining heads must compensate harder. | |
| 1. **Attention is scarce**: With few attention layers, each *attention head* carries disproportionate weight. Suppose a baseline transformer has 64 attention layers, each with \(H\) heads, for a total of \(64 \cdot H\) heads. Pruning a single low-value head there removes \(1 / (64 \cdot H)\) of total head capacity. In Qwen3.5-27B, only 16 of 64 layers have multi-head attention, so the same head represents \(1 / (16 \cdot H)\) of capacity — a 4× larger fraction. The remaining heads must compensate harder. |
|
|
||
| 2. **Compensation drives specialization**: When retraining after pruning, the surviving attention heads experience stronger gradient pressure — they must handle the work of the removed heads. This pressure, combined with domain-specific training data, drives the heads to specialize more aggressively than in architectures with abundant attention. | ||
|
|
||
| 3. **Context rot mitigation**: Qwen3.5's limited attention layers are known to cause "context rot" — degraded instruction following as context grows beyond ~9-15K tokens (observed independently by practitioners). By pruning low-entropy heads and retraining, the surviving heads develop sharper attention patterns, potentially improving context utilization within the model's effective window. |
There was a problem hiding this comment.
The “context rot” claim is stated as a known architectural issue, but there’s no citation or pointer to a tracked issue/benchmark showing the ~9–15K degradation range. Please add a reference (paper/blog/issue thread) or rephrase to make clear it’s an anecdotal observation from specific evaluations.
| 3. **Context rot mitigation**: Qwen3.5's limited attention layers are known to cause "context rot" — degraded instruction following as context grows beyond ~9-15K tokens (observed independently by practitioners). By pruning low-entropy heads and retraining, the surviving heads develop sharper attention patterns, potentially improving context utilization within the model's effective window. | |
| 3. **Context rot mitigation**: In our own informal evaluations, and in anecdotal reports from other practitioners, Qwen3.5's limited attention layers have been associated with "context rot" — degraded instruction following as context grows beyond roughly 9–15K tokens. By pruning low-entropy heads and retraining, the surviving heads develop sharper attention patterns, potentially improving context utilization within the model's effective window. |
|
|
||
| **HumanEval verification**: The forged 4B model scores **~70%+ pass@1 on HumanEval** (164 problems, greedy decoding), competitive with dedicated coder models at 2-3x the parameter count (Qwen2.5-Coder-3B: 66%, Phi-3-mini: 62%). At 2.6GB GGUF (Q4_K_M), this runs on iPhone and Raspberry Pi. | ||
|
|
||
| ### 3.4 Why Qwen3.5 Responds Strongly to Plasticity |
There was a problem hiding this comment.
Section numbering is now duplicated: this new heading is "### 3.4", but later in the document there is already a "### 3.4 Cross-Architecture Validation" section. Please renumber one of them (and adjust any internal references) to keep section numbers unique and ordered.
| ### 3.4 Why Qwen3.5 Responds Strongly to Plasticity | |
| ### Why Qwen3.5 Responds Strongly to Plasticity |
Addition
New section explaining why Qwen3.5 shows outsized improvements from experiential plasticity:
Also adds HumanEval verification (~70%+ pass@1 at 2.6GB GGUF).
Inspired by @spiritbuun's observation about Qwen3.5's context rot from few attention layers.