witcheer commited on
Commit
a839aef
·
verified ·
1 Parent(s): 83fe162

Upload reports/bias-only-steering.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. reports/bias-only-steering.md +109 -0
reports/bias-only-steering.md ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Bias-Only Reasoning Steering on one RTX 5090: nothing moves at bounded budget — and random rewards match correct ones
2
+
3
+ **t074 · 2026-07-02 · Qwen2.5-Math-7B · RLOO · bounded-budget reproduction + the controls the paper omits**
4
+
5
+ Paper: *Steering LLM Reasoning Through Bias-Only Adaptation* (arXiv 2505.18706, EMNLP 2025).
6
+ Companion: *Small Vectors, Big Effects* (arXiv 2509.06608). Code: corl-team/steering-reasoning.
7
+
8
+ ## The claims
9
+
10
+ 1. **Capability:** train ONE d-dim bias vector per layer (added to `mlp.down_proj` output,
11
+ ≈0.0016% of params) with RL and match full RL fine-tuning. Their Table 1, Qwen2.5-Math-7B:
12
+ MATH500 base 52.2 → full-FT 79.3 → **steering 79.9**; AMC23 45.8 → 64.2 → 62.5.
13
+ 2. **Efficiency:** "34s vs 52m" training, "0.11s vs 9.94s" per step, 240KB vs 13.8GB optimizer
14
+ memory (Qwen2.5-14B figures).
15
+ 3. **Their own mechanism paper:** the last-layer vector "behaves like first-token
16
+ substitution" — prefixing the token "To" recovers ~10–11 points on this base, "about
17
+ three quarters" of the last-layer vector's gain.
18
+
19
+ ## What we ran (and why it's not their code)
20
+
21
+ **Their pinned stack cannot execute on consumer Blackwell.** torch 2.6.0+cu124 (with
22
+ vllm 0.8.5.post1 + flashinfer cu124 on top) fails the first kernel launch on sm_120:
23
+ `CUDA error: no kernel image is available for execution on the device`. The stack is dead
24
+ on arrival on an RTX 5090, as shipped.
25
+
26
+ So we reimplemented their recipe on the rig's stack (torch 2.10+cu128, HF transformers),
27
+ pinned from their own configs (`configs/train/rl/qwen2.5-math-7b/deepscaler/`): RLOO,
28
+ temperature 1.0, steering lr 1e-3, their LoRA baseline config verbatim (rank 4, alpha 4,
29
+ `down_proj` only, lr 1e-4), `qwen_math` template, DeepScaleR dataset.
30
+
31
+ **Bounded budget, identical across arms** (disclosed deviation from their full recipe of
32
+ ~1 epoch ≈ 2,500 steps × 16 prompts × 16 generations × 4K ctx): 20 steps × 8 prompts ×
33
+ 8 generations × 1,024 max new tokens, seed 0, same fixed 512-problem DeepScaleR slice.
34
+ That is ~1,280 training rollouts against their ~645K — a gain-at-matched-compute probe,
35
+ not a full-recipe reproduction.
36
+
37
+ **Eval:** MATH500 + AMC23, greedy pass@1, the rig's t073-validated pipeline (vLLM
38
+ generation + the authors' vendored Qwen2.5-Math grader), identical prompts and grader for
39
+ every arm. Steering checkpoints served in **stock vLLM** via an architecture re-badge:
40
+ Qwen2.5 relabeled `LlamaForCausalLM` with `mlp_bias=true` (Qwen2.5 is Llama-shaped;
41
+ zero-filled o/gate/up biases; learned vectors in the down biases) — logit-equivalence
42
+ verified (fp32 max|Δ| = 0.0; bf16 argmax-identical on all probes).
43
+
44
+ ## Results: a five-arm null
45
+
46
+ | arm | MATH500 | Δ vs base | AMC23 | Δ |
47
+ |---|---|---|---|---|
48
+ | base | 54.6 | — | 45.0 | — |
49
+ | steering @ 20 steps | 54.4 | −0.2 | 45.0 | 0.0 |
50
+ | LoRA r4 down_proj @ 20 steps | 53.8 | −0.8 | 40.0 | −5.0 |
51
+ | random-reward steering @ 20 steps | 54.2 | −0.4 | 45.0 | 0.0 |
52
+ | base + "To" prefix (no training) | 53.0 | −1.6 | — | — |
53
+ | *their claim (full recipe)* | *79.9* | *+27.7* | *62.5* | *+16.7* |
54
+
55
+ Base sanity holds: 54.6 MATH500 / 45.0 AMC23 vs their reported base 52.2 / 45.8 (and the
56
+ rig's t073 measurement 53.4) — the pipeline reproduces their starting point. The trained
57
+ arms are genuinely different checkpoints (steering vector norms ~0.30–0.32 per layer,
58
+ LoRA 2.52M params trained, generations shifted) — they just don't score differently.
59
+
60
+ Three reads:
61
+
62
+ 1. **The steering gain does not materialize early.** At 20 matched steps the +27.7 claim
63
+ shows +0.0. Whatever their curve does, none of it lives in the first ~1,280 rollouts —
64
+ on a consumer card the recipe's cost-to-first-signal is the whole recipe, not a cheap
65
+ probe. (Contrast One-Shot-EM, same base family, which moved +2.0 by step 10 — t073.)
66
+ 2. **Correct rewards buy nothing over random ones here.** Random-reward steering (54.2 /
67
+ 45.0) is indistinguishable from correct-reward steering (54.4 / 45.0) — both are base.
68
+ At this budget there is no evidence the reward signal, the thing RL is supposedly
69
+ injecting, does anything at all.
70
+ 3. **Their own token-substitution number does not reproduce on the standard template.**
71
+ "To"-prefix: −1.6, not +10–11. The likely reason is right in the raw generations: on
72
+ the `qwen_math` CoT template the base model's answers *already open with "To"* — the
73
+ token the last-layer vector allegedly boosts is already there. The 10–11-point claim
74
+ must live in a weaker base protocol; on the template their own training config uses,
75
+ there is nothing for first-token substitution to elicit.
76
+
77
+ ## Where the wall-clock actually goes
78
+
79
+ Measured per step, median across all three trained arms (one RTX 5090): rollout ~50s
80
+ (**75–76%**), reward grading ~0.3s (<1%), backward+update ~16s (**24–25%**). The
81
+ per-step split is IDENTICAL whether 100K bias params or 2.52M LoRA params train, because
82
+ the update slice is dominated by the backward pass through the frozen 7.6B network —
83
+ which no adapter scheme shrinks. Their "0.11s vs 9.94s" can only be the optimizer sliver
84
+ inside that slice; their "34s vs 52m" headline excludes the ~75% of wall-clock (rollouts)
85
+ that is invariant to what trains.
86
+
87
+ On a 32GB consumer card the honest efficiency win of bias-only adaptation is **memory,
88
+ not speed**: full-param 7B RL does not fit at all (t073's OOM gate), while bias-only
89
+ (~100K params, ~800KB optimizer state) trains comfortably. That is a real and useful
90
+ result — it is just not "34s training."
91
+
92
+ ## Honest limits
93
+
94
+ - 20 steps is ~0.2% of their rollout budget; this bounds where the gain ISN'T (early),
95
+ not whether their endpoint is real. The Table-1 claim is neither confirmed nor refuted.
96
+ - Their full-FT arm cannot run on 32GB; their published number is shown as reference.
97
+ - Qwen2.5-14B untouched (bf16 weights alone ≈ 29GB).
98
+ - Single seed; AMC23 is 40 questions (±2.5pts/question); LoRA's −5.0 there is 2 questions.
99
+ - Our loop uses HF-generate rollouts (their vLLM-engine rollouts are faster in absolute
100
+ terms); the SHARE decomposition, not the absolute seconds, is the finding.
101
+
102
+ ## Artifacts
103
+
104
+ - `lib/steering.py` + tests (budget chooser, Qwen2→Llama re-badge config, timing parse)
105
+ - `scripts/train_steering.py` (bounded RLOO; steering / their-config LoRA / random-reward arms; timing instrument)
106
+ - `scripts/convert_steering_checkpoint.py` + `scripts/steering_equiv_check.py` (re-badge + fp32-verified gate)
107
+ - `scripts/fetch_steering_data.py`, `scripts/aggregate_steering.py`, `scripts/chart_steering.py`
108
+ - `scripts/eval_math.py --assistant-prefix` (the zero-training "To" probe)
109
+ - Chart: `reports/steering-claimed-vs-measured.png`