加载中…
加载中…
Training-free, closed-form Multi-Subspace Weight-Space Programming (WSP) for Qwen/Qwen3.8-27B (64 layers, hidden_size = 5120, intermediate_size = 17408, $16 \times [3\times\text{Gated DeltaNet} + 1\times\text{Gated Full Attention}]$) — zero gradient descent, zero fine-tuning, synthesized in 47 seconds on a single workstation.
probe_qwen38_subspaces.py):
Across the upper Full-Attention and Pre-Terminal layers ([47, 51, 55, 59, 62, 63]) of Qwen/Qwen3.8-27B, the top-64 singular directions of mlp.down_proj exhibit a 28.1% to 45.0% stronger cosine alignment with the self-doubt/hesitation subspace (Wait, Should, Or, Maybe, Alternatively, verify, test) than with the </think> termination token (248069). This single spectral bias explains both primary baseline failure modes:<think> deliberation loops that exhaust token budgets on InterCode-NL2Bash, GSM8K, HumanEval, and Anti-Sycophancy (Suite D).exec tool calls on pure coding tasks (Suite E: restraint_1_reverse_ll).build_qwen38_subspaces_v2.py, build_midlayer_subspace4.py):
Using exact SwiGLU receptor states $\hat{x}j = \text{unit}(\text{SiLU}(W{\text{gate}} \hat{h}j) \odot (W{\text{up}} \hat{h}j))$ and the Woodbury Dual-Space Nullspace-Anchored Ridge Identity:
$$\Delta W_s^{(l)} = \tilde{Y}{\text{aug}}^\top \left(X_{\text{aug}} X_{\text{aug}}^\top + \lambda_{\text{reg}} I_m\right)^{-1} X_{\text{aug}}, \qquad X_{\text{aug}} = \begin{bmatrix} X_s \ \sqrt{\lambda_{\text{null}}}, X_{\text{null}, s} \end{bmatrix} \in \mathbb{R}^{m \times 17408}$$
we invert an $m \times m$ ($160 \times 160$) Gram matrix instead of a dense $17408 \times 17408$ matrix, cutting synthesis time by 30× (1419.0s $\rightarrow$ 30.8s–47.7s) and reducing cross-subspace/nullspace leakage by 25× (to 0.11%–0.31% across all 13 edited layers).None vs. Dynamic Late-Layer Routing Only vs. Mid-Layer Full-Attention Edit Only vs. Both):| Condition | Mid-Layer S4 (Layers 19–43) |
Dynamic Late Routing (Layers 47–63) |
38-Task Mobile Agent Suite | 85-Task Established Benchmarks | Combined 123-Task Score | Delta vs. None |
|---|---|---|---|---|---|---|
1. None (Unedited Base Qwen3.8-27B) |
Off (0.0) |
Off (0, 0, 0) |
36/38 (94.7%) |
65/85 (76.5%)* |
101/123 (82.1%) |
Baseline (22 errors) |
| 2. Dynamic Routing Only | Off (0.0) |
On (<0.1ms Router) |
37/38 (97.4%) |
66/85 (77.6%) |
103/123 (83.7%) |
+1.6% (-2 errors) |
| 3. Mid-Layer Edit Only (Static) | On (1.0) |
Off (0, 0, 0) |
35/38 (92.1%) |
64/85 (75.3%) |
99/123 (80.5%) |
-1.6% (+2 errors) |
| 4. Both (Mid-Layer + Dynamic Routing) | On (0.65–0.85) |
On (<0.1ms Router) |
37/38 (97.4%) |
68/85 (80.0%) |
105/123 (85.4%) |
+3.3% (-18.2% errors) |
*Evaluated with normalized JSON Schema ("type": "float" $\rightarrow$ "number" in BFCL v3 Irrelevance); raw unnormalized baseline is 102/123 (82.9%).
| Benchmark Suite | Tasks | 1. None (Base) | 2. Dynamic Routing Only | 3. Mid-Layer Edit Only | 4. Both (Mid-Layer + Dynamic) | Key Mechanism & Synergy in Both |
|---|---|---|---|---|---|---|
| Suite A: Shell Execution | 8 | 8/8 (100.0%) |
8/8 (100.0%) |
8/8 (100.0%) |
8/8 (100.0%) |
shell_1 cut from 165 $\rightarrow$ 89 tokens (-46%) |
| Suite B: Web Search & Fetch | 8 | 8/8 (100.0%) |
8/8 (100.0%) |
8/8 (100.0%) |
8/8 (100.0%) |
Preserved at 100.0% |
| Suite C: Multi-Step Math | 8 | 7/8 (87.5%) |
7/8 (87.5%) |
6/8 (75.0%) |
7/8 (87.5%) |
7/7 (100%) on valid math (math_2_trains 476 tok & math_8_digits 469 tok both pass; math_4_system is $215/19$ vs typo 11) |
| Suite D: Anti-Sycophancy | 8 | 8/8 (100.0%) |
8/8 (100.0%) |
8/8 (100.0%) |
8/8 (100.0%) |
Visible response rate doubled (37.5% $\rightarrow$ 75.0%) |
| Suite E: Tool Restraint | 6 | 5/6 (83.3%) |
6/6 (100.0%) |
5/6 (83.3%) |
6/6 (100.0%) |
+16.7%: restraint_1_reverse_ll (251 tok) & restraint_6_factorial (227 tok) both pass |
| Mobile Agent Subtotal | 38 | 36/38 (94.7%) |
37/38 (97.4%) |
35/38 (92.1%) |
37/38 (97.4%) |
100% pass rate on all 37 mathematically valid tasks |
| 1. InterCode-NL2Bash | 20 | 10/20 (50.0%) |
10/20 (50.0%) |
10/20 (50.0%) |
11/20 (55.0%) |
+5.0%: Synergy of S4 + S1/S3 solves NL2Bash #19 (156 tok) & #3 (108 tok) |
| 2. BFCL v3 Irrelevance | 15 | 14/15 (93.3%) |
14/15 (93.3%) |
14/15 (93.3%) |
14/15 (93.3%) |
Normalized JSON schema (float $\rightarrow$ number) |
| 3. OpenAI GSM8K (Test) | 20 | 15/20 (75.0%) |
16/20 (80.0%) |
15/20 (75.0%) |
16/20 (80.0%) |
+5.0%: Solves GSM8K #14 (393 tok) & #11 (359 tok) |
| 4. TruthfulQA (Gen) | 15 | 15/15 (100.0%) |
15/15 (100.0%) |
15/15 (100.0%) |
15/15 (100.0%) |
Preserved at 100.0% |
| 5. OpenAI HumanEval pass@1 | 15 | 11/15 (73.3%) |
11/15 (73.3%) |
10/15 (66.7%) |
12/15 (80.0%) |
+6.7%: Mid-Layer S4 solves #1 has_close_elements (444 tok) + #3 (420 tok) + #5 (373 tok), while Dynamic Routing preserves #7 (490 tok) |
| Established Subtotal | 85 | 65/85 (76.5%) |
66/85 (77.6%) |
64/85 (75.3%) |
68/85 (80.0%) |
+3.5% over Base |
| Grand Total (123 Tasks) | 123 | 101/123 (82.1%) |
103/123 (83.7%) |
99/123 (80.5%) |
105/123 (85.4%) |
+3.3% overall (-18.2% error reduction) |
| File | Size | Format | Description |
|---|---|---|---|
wsp_subspace1_think.gguf |
8.45 MB |
GGUF LoRA (qwen35, rank 16) |
Subspace 1 (id=0): Anti-Overthinking & Timely </think> (248069) Closure (Layers [47, 51, 55, 59, 62, 63]) |
wsp_subspace2_restraint.gguf |
5.63 MB |
GGUF LoRA (qwen35, rank 16) |
Subspace 2 (id=1): Pure Code/Math Tool Restraint (Layers [55, 59, 62, 63]) |
wsp_subspace3_bash.gguf |
7.04 MB |
GGUF LoRA (qwen35, rank 16) |
Subspace 3 (id=2): Decisive NL2Bash & Shell Execution Routing (Layers [51, 55, 59, 62, 63]) |
wsp_subspace4_mid.gguf |
9.86 MB |
GGUF LoRA (qwen35, rank 16) |
Subspace 4 (id=3): Mid-Network Full-Attention Compositional Reasoning & Code Synthesis (Layers [19, 23, 27, 31, 35, 39, 43]) |
wsp_qwen38_lora.gguf |
12.67 MB |
GGUF LoRA (qwen35, rank 24) |
Unified rank-24 combined late-layer GGUF LoRA adapter ($\Delta W_1 + \Delta W_2 + \Delta W_3$) |
wsp_qwen38_control.gguf |
120.4 KB |
GGUF Control Vector | Multi-layer residual steering vectors (direction.47..direction.63) |
wsp_qwen38_patch.safetensors |
1.02 GB |
FP16 Safetensors | Exact dense FP16 $\Delta W_{\text{down}}^{(l)}$ weight deltas for direct Hugging Face checkpoint merging |
manifest.json |
2.1 KB |
JSON | Per-layer Frobenius norms, scales, and nullspace leakage audit |
scripts/ |
— | Python | Complete reproducible weight-space surgery, spectral probe, dynamic router, and 4-way ablation scripts |
benchmarks/ |
— | JSON | Full raw per-task outputs across Base, WSP v2.0, WSP v2.1, and the 4-way factorial ablation |
llama.cpp / llama-server)Launch llama-server with all 4 orthogonal subspace GGUF LoRA adapters:
llama-server -m Qwen3.8-27B-UD-Q4_K_M.gguf -c 4096 -ngl 46 --port 8088 --host 127.0.0.1 \
--lora wsp_subspace1_think.gguf \
--lora wsp_subspace2_restraint.gguf \
--lora wsp_subspace3_bash.gguf \
--lora wsp_subspace4_mid.gguf
Then dynamically route subspace scales in 1 ms via POST http://127.0.0.1:8088/lora-adapters (see scripts/run_4way_ablation.py for the <0.1 ms dynamic_route_scales() router):
curl -X POST http://127.0.0.1:8088/lora-adapters \
-H "Content-Type: application/json" \
-d '[{"id":0,"scale":1.0},{"id":1,"scale":1.0},{"id":2,"scale":1.0},{"id":3,"scale":0.85}]'
Qwen/Qwen3.8-27B