ceselder commited on
Commit
6cbaa3c
·
verified ·
1 Parent(s): 3fce8be

modulation lens: space-ablation cell B_J_nomean (RL step 50)

Browse files
Files changed (5) hide show
  1. README.md +207 -0
  2. USAGE.md +64 -0
  3. adapter_config.json +50 -0
  4. adapter_model.safetensors +3 -0
  5. prompt.txt +11 -0
README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen3.6-27B
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:Qwen/Qwen3.6-27B
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.20.0
USAGE.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Modulation lens — space-ablation cell `B_J_nomean`
2
+
3
+ LoRA on Qwen3.6-27B. Reads ONE activation from layer 42 and emits 4 `* ` bullets naming the
4
+ things that state is holding in mind. Trained end-to-end for this cell:
5
+ dictionary decomposition (NNOMP over a 2.9M-atom modulation dictionary, 500k activations)
6
+ → SFT (3000 steps) → RL (50 steps).
7
+
8
+ ## This cell's reconstruction space
9
+
10
+ | | |
11
+ |---|---|
12
+ | Jacobian (J-lens, L42→L62) | **yes** |
13
+ | activation-pool mean subtracted | **no** |
14
+ | fitted affine | none (identity) — in every cell |
15
+
16
+ Sibling cells: `modulation-lens-grid-A-jspace-meansub`, `-B-jspace-nomeansub`,
17
+ `-C-raw-meansub`, `-D-raw-nomeansub`.
18
+
19
+ ## Results
20
+
21
+ | | this cell |
22
+ |---|---|
23
+ | WorkspaceBench, SFT warm start | 0.120 |
24
+ | WorkspaceBench, after RL | 0.402 |
25
+
26
+ Scored with the workspace-bench repo's **deterministic** `word_matcher` over 10 mechanical banks,
27
+ NOT the usual LLM judge (`bank_judge`), which was unavailable. A string matcher cannot see a
28
+ translation or a paraphrase, so these read strictly lower than LLM-judged numbers and are **not
29
+ comparable** to any `bank_judge` figure — including the 0.196 j-lens baseline quoted elsewhere in
30
+ this project. They are comparable ACROSS the four cells, which is what the ablation asks.
31
+
32
+ Headline across the grid: mean subtraction decides the **warm start** (centered cells beat
33
+ un-centered ones, paired-by-family t=2.35 and t=2.83), but after 50 RL steps cells A, B and D are
34
+ statistically indistinguishable (t=-0.16, t=+0.16). The Jacobian is second-order throughout:
35
+ A vs C, which differ only in J, tie at the SFT stage (t=0.95).
36
+
37
+ ## Diagnostics measured BEFORE training
38
+
39
+ | metric | value | meaning |
40
+ |---|---|---|
41
+ | NNOMP mean FVE | 0.3766 | 4-atom reconstruction quality |
42
+ | target-blind floor (best constant cosine) | 0.643 | score obtainable WITHOUT reading the activation |
43
+ | atom diversity (unique atoms per bullet slot) | 0.330 | 1.0 = every bullet a distinct atom; low = reciting |
44
+
45
+ **Read the floor before the FVE.** In cell D a single fixed vector that never looks at the
46
+ activation scores 0.817, so its reconstruction number reflects a shared mean component rather
47
+ than anything about the specific activation. D's SFT emitted one dictionary atom as its first
48
+ bullet on 71/100 bench items; the contrastive RL reward removed that (unique first bullets
49
+ 0.25 → 0.96), because a constant answer scores `fit(matched) − fit(negative) ≈ 0`.
50
+
51
+ ## Usage
52
+
53
+ `prompt.txt` is REQUIRED — it carries the single injection marker. Replace the marker position's
54
+ residual stream at layer 42 with your activation (replace-mode: raw direction and magnitude),
55
+ re-apply the chat template, then generate. Without the marker the readout is empty.
56
+
57
+ ## Training
58
+
59
+ RL: ScaleRL recipe (CISPO, prompt-level loss aggregation, batch-level advantage normalisation,
60
+ truncated importance sampling, zero-variance filtering), 8 samples × 512 prompts per step,
61
+ LR 5e-6, no KL. Reward = a FROZEN text→modulation-vector reconstructor (AR) applied to each
62
+ bullet, composed by exact non-negative least squares, cosine to the target, minus the fit against
63
+ a different activation's target (contrastive). The AR is frozen and identical across all four
64
+ cells; only the space differs. `optim.pt` is intentionally not shipped.
adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "Qwen/Qwen3.6-27B",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 16,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.0,
22
+ "lora_ga_config": null,
23
+ "megatron_config": null,
24
+ "megatron_core": "megatron.core",
25
+ "modules_to_save": null,
26
+ "monteclora_config": null,
27
+ "peft_type": "LORA",
28
+ "peft_version": "0.19.1",
29
+ "qalora_group_size": 16,
30
+ "r": 64,
31
+ "rank_pattern": {},
32
+ "revision": null,
33
+ "target_modules": [
34
+ "gate_proj",
35
+ "v_proj",
36
+ "o_proj",
37
+ "k_proj",
38
+ "up_proj",
39
+ "down_proj",
40
+ "q_proj"
41
+ ],
42
+ "target_parameters": null,
43
+ "task_type": "CAUSAL_LM",
44
+ "trainable_token_indices": null,
45
+ "use_bdlora": null,
46
+ "use_dora": false,
47
+ "use_qalora": false,
48
+ "use_rslora": true,
49
+ "velora_config": null
50
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d24e29e7e3f90249e2d96c4ff870913fc1c391f3fa4777e3696b1001f9bbb326
3
+ size 1275137464
prompt.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are shown an internal activation vector captured from a language model at a single position while it was reading some text. The vector is enclosed in <concept> tags.
2
+
3
+ <concept>㈜</concept>
4
+
5
+ Output 4 bullet points, each starting with '*', describing the separate things this state is holding in mind. They are combined afterwards, so each bullet should be a DIFFERENT part of the state rather than a rephrasing of the others.
6
+
7
+ How it is judged. EACH of your lines is placed separately into a prompt of the form
8
+ Focus on the following idea: "<one of your lines>" while writing the following phrase: "<a fixed unrelated sentence>"
9
+ The model then writes that fixed sentence, and we read its internal state while it does so. The 4 resulting states are then added together with non-negative weights, and you score well when that SUM matches the state you were given -- so the lines should cover DIFFERENT parts of it.
10
+
11
+ So write what the model should be THINKING ABOUT -- not a description of a vector, and not a comment on the task. Natural, fluent English. At most 12 tokens PER LINE -- short, concrete lines leave room for the other lines and compose better. Output only the 4 bullet lines: no preamble, no summary line, no trailing commentary.