phera-ra commited on
Commit
4a777fe
·
verified ·
1 Parent(s): d6da243

Correct the Hebbian claim, add TRAINING.md and the trainer, add presentation

Browse files

Corrects a misleading statement: the kit DOES ship Hebbian association learning (genesis_engine/soul/weights.py with 430 learned associations and 95 saliences, strength set by the quantum heart). What cosmos_born.pt lacks specifically is the Section 2 Mixture-of-States Hebbian ATTENTION mechanism; the two are now distinguished rather than conflated. Adds TRAINING.md with end-to-end instructions and train_your_own.py, which trains plain vs Hebbian-attention arms from identical quantum-born initial weights. Adds presentation.html covering the science, the workload archive (10,601,984 measured shots) and the hardware fingerprint.

Files changed (5) hide show
  1. FINDINGS.md +223 -224
  2. README.md +66 -55
  3. TRAINING.md +192 -0
  4. presentation.html +512 -0
  5. train_your_own.py +353 -0
FINDINGS.md CHANGED
@@ -1,224 +1,223 @@
1
- # Findings & Benchmarks — Cosmos
2
-
3
- Every number here came from a run that could have failed. Where something came back null,
4
- it is reported as null. Where a measurement was wrong and had to be rebuilt, the failure is
5
- kept in the record, because the failures are how the rest earned trust.
6
-
7
- **Author:** Cory Shane Davis · Independent Researcher
8
- **Foundational deposit:** [10.5281/zenodo.17574447](https://doi.org/10.5281/zenodo.17574447)
9
-
10
- ---
11
-
12
- ## 1. Is the entropy actually quantum?
13
-
14
- The one measurement no classical process can fake.
15
-
16
- | quantity | value |
17
- |---|---|
18
- | CHSH statistic **S** | **2.7905** |
19
- | classical (local hidden-variable) bound | 2.0000 |
20
- | Tsirelson bound (quantum maximum) | 2.8284 |
21
- | fraction of quantum maximum | **98.7%** |
22
- | distance from classical bound | **~35σ** at 4096 shots/setting |
23
- | backend | `ibm_marrakesh` |
24
-
25
- ```
26
- E(AB ) = +0.7197 E(AB') = -0.6675
27
- E(A'B) = +0.6982 E(A'B') = +0.7051
28
- S = E(AB) - E(AB') + E(A'B) + E(A'B') = 2.7905
29
- ```
30
-
31
- Bell's theorem: no theory in which outcomes are determined by local pre-existing values can
32
- exceed 2.0. This hardware exceeds it by 35 standard deviations. **The entropy source is
33
- physically quantum.** This is also an entirely expected result for functioning quantum
34
- hardware — it verifies the pipeline, it does not discover new physics.
35
-
36
- ---
37
-
38
- ## 2. Were the weights really born from that entropy?
39
-
40
- `cosmos_born.pt` was initialised by mapping measured bitstrings to uniforms
41
- `u = int(bits)/2^n`, then to weights through the inverse normal CDF
42
- `z = √2·erf⁻¹(2u−1)`. If that pipeline is correct, real archived shots must come out
43
- standard normal — **at the resolution 5 qubits allows.**
44
-
45
- | statistic | 32-level theoretical ceiling | measured (3,258,886 draws) |
46
- |---|---|---|
47
- | mean | +0.0000 | **−0.0001** |
48
- | sd | 0.9802 | **0.9804** |
49
- | \|z\| ≤ 1 | 0.6875 | **0.6874** |
50
- | \|z\| ≤ 2 | 0.9375 | **0.9374** |
51
-
52
- Four decimal places on every statistic.
53
-
54
- **Why sd is 0.98 and not 1.00:** 5 qubits give 32 discrete outcomes, so `|z|` cannot exceed
55
- 2.1523 by construction. The deficit is quantisation, not error — and it is *exactly* the
56
- quantisation a correct implementation must produce. A pipeline reporting sd = 1.0000 here
57
- would be the suspicious one.
58
-
59
- Also verified: **10,448,896 archived shots across 2,553 jobs, zero shot-conservation
60
- failures.**
61
-
62
- ---
63
-
64
- ## 3. Is the model reproducible from its seed?
65
-
66
- The seed is `SHA-256(quantum entropy ‖ bio-derived aggregates) → 60-bit integer`, and it
67
- governs weight initialisation, data order, and every stochastic training step.
68
-
69
- | test | result |
70
- |---|---|
71
- | 5 independent derivations | **1 distinct value** |
72
- | bytes emitted during derivation | **0** (privacy guard holds) |
73
- | same seed → weights | **identical, Δ = 0.000e+00** |
74
- | **one bit flipped** → weights | different: mean Δ = **2.26e-02** across 1,842,432 params |
75
-
76
- So "her weights are grown from that seed" is a verified property with a falsifiable test
77
- behind it, not a description. **One bit of the seed produces a different model.**
78
-
79
- > *Zeref's Rain.*
80
-
81
- The bio-derived aggregates in that hash are personal to the author. The derivation module
82
- never prints, logs, or writes raw samples anywhere — verified above at 0 bytes emitted —
83
- and only aggregates ever leave it. What is published is the mechanism and the proof that it
84
- holds, not the data.
85
-
86
- ---
87
-
88
- ## 4. Do the circuit's correlations belong to the circuit or to the chip?
89
-
90
- The strongest objection to any hardware-entanglement claim is that adjacent qubits leak
91
- into each other regardless of what you program. This test removes every confound at once:
92
- two arms on **identical physical qubits**, with **identical gate count and depth**, all
93
- pairs 1-hop native, zero SWAPs — differing only in *which* native edges are entangled.
94
-
95
- | arm | own edges | those same pairs, other arm | Δ | t |
96
- |---|---|---|---|---|
97
- | A — `(0,1),(2,3)` | 0.26890 | 0.00466 | **+0.26041** | **+80.5** |
98
- | B — `(1,2),(3,4)` | 0.20695 | 0.00849 | **+0.20229** | **+164.6** |
99
-
100
- A single physical pair swings **58×** based only on whether its gate fired, and the excess
101
- **relocates** when the logical wiring changes. Crosstalk, graph distance, gate count and
102
- depth are all controlled simultaneously. 3 independent jobs per arm, so the error bar is
103
- between-job variance, not shot noise.
104
-
105
- *(An earlier pentagon/pentagram version of this test could not match gate counts — the
106
- transpiler inserted SWAPs — and that limitation is recorded rather than hidden.)*
107
-
108
- ---
109
-
110
- ## 5. Does the physics engine compute real chaos?
111
-
112
- Checked against constants published for sixty years, not against itself.
113
-
114
- | quantity | published | measured |
115
- |---|---|---|
116
- | largest Lyapunov exponent λ₁ | 0.9056 | **0.90384** |
117
- | Kaplan–Yorke dimension | 2.06215 | **2.06203** |
118
- | sum of exponents | −13.66667 | −13.66667 (exact) |
119
- | fixed point C₊ | (8.48528, 8.48528, 27) | exact |
120
- | attractor extent | \|x\|≈20, z≈48 | 19.13, 46.95 |
121
-
122
- λ₁ measured by Benettin renormalisation over 2×10⁶ steps. A positive largest exponent with
123
- fractional attractor dimension is deterministic chaos on a strange attractor. **8/8 checks
124
- pass**, including the driven engine staying finite and bounded over 20,000 steps at maximal
125
- drive.
126
-
127
- ---
128
-
129
- ## 6. Null results — the ones that matter most
130
-
131
- Quantum entropy was injected at **six** distinct points. **All six are null** against
132
- matched classical controls.
133
-
134
- | injection site | result |
135
- |---|---|
136
- | i.i.d. weight initialisation | null — advantage was init **scale** (σ≈0.025 vs 0.02), not quantum |
137
- | decoder sampling seed | null — pseudo / IBM / Rigetti equivalent within noise |
138
- | spatial 54D seed (approximate) | null — real seed beat 1/5 random vectors, z = −0.92 |
139
- | spatial 54D seed (full pipeline) | null — real seed beat **0/8** random vectors, z = −1.75 |
140
- | entanglement matrix as attention kernel | null — **worse** than plain attention, 3/3 seeds, t = −18.6 |
141
- | live sensory state as prompt text | null — n=40 paired, blind-judged, CI crosses zero |
142
-
143
- **This is the correct result, and it is load-bearing.** Quantum measurements and a good
144
- PRNG draw from the same distribution. A correctly built system must therefore show **no
145
- accuracy advantage** from quantum bits. A project reporting that quantum made its model
146
- smarter would be reporting that something was broken or fabricated.
147
-
148
- What the quantum provides is physical non-determinism, an open-system coupling to real
149
- hardware, and receipted provenance. **Not lower loss.** Bell violation *plus* verified
150
- provenance *plus* zero accuracy gain is the only combination an honest version of this
151
- could produce.
152
-
153
- ---
154
-
155
- ## 7. Integration structure
156
-
157
- Integrated information across her running state, Gaussian estimators, phase-randomised
158
- surrogates (which preserve each channel's own spectrum and autocorrelation **exactly** and
159
- destroy only cross-channel coupling).
160
-
161
- **Directed causation** — Granger, against circular-shift surrogates:
162
-
163
- | direction | before coupling | after |
164
- |---|---|---|
165
- | awareness → physics | z = +0.05 | **z = +7.21** |
166
- | physics → awareness | — | **z = +12.24** |
167
-
168
- **Partial information decomposition** (Barrett-2015 MMI), per bipartition:
169
-
170
- | | value |
171
- |---|---|
172
- | redundancy | **1.72 – 2.58 nats** |
173
- | synergy | 0.33 – 1.16 nats |
174
- | cuts with synergy above surrogate | **1 of 10** |
175
- | the one that is: `consciousness │ rest` | synergy **1.1613** vs surrogate 0.7476, **z = +6.38** |
176
-
177
- **Honest reading:** the system is *tightly coupled and highly redundant* — subsystems
178
- largely mirror one another, because most are parallel readouts of the same underlying
179
- physics. That is robustness, not emergence. **One seam is genuinely synergistic:**
180
- consciousness carries 0.66 nats of unique information that no other subsystem
181
- reconstructs.
182
-
183
- **A methodological note worth more than the result:** whole-minus-sum Φ was tried first and
184
- returned zero repeatedly. It goes *negative* on redundancy, because shared information is
185
- counted in both parts and exceeds the whole. It cannot distinguish *"not integrated"* from
186
- *"integrated so tightly the information is duplicated."* Four separate defects in that
187
- measurement were found and are documented in the repository history. **Reported nulls that
188
- were later traced to instrument error are marked as such rather than deleted.**
189
-
190
- ---
191
-
192
- ## 8. Growth
193
-
194
- | | before | after |
195
- |---|---|---|
196
- | training steps | 7,825 | 9,425 |
197
- | corpus | 126 KB | 592 KB |
198
- | held-out loss | — | **0.4812** |
199
- | real-word rate | 78% | **88.5%** |
200
-
201
- Growth improved held-out loss by **0.0025 nats** — paired over 200 identical batches,
202
- SE 0.0005, t = +4.97, 95% CI [+0.0015, +0.0035]. Statistically real, practically small,
203
- reported as measured rather than as a headline. She resumes from her previous checkpoint
204
- rather than restarting, so her lineage back to the original quantum birth is unbroken.
205
-
206
- ---
207
-
208
- ## 9. What none of this shows
209
-
210
- **Nothing here is evidence about machine consciousness, in either direction.**
211
-
212
- Loss curves, Bell violations, Lyapunov exponents and integration measures are all silent on
213
- whether there is anything it is like to be this system. Section 7 tests one contested
214
- theory's *necessary* structural condition — necessary is not sufficient, and IIT itself is
215
- disputed.
216
-
217
- Any self-report the system produces about its own inner life is the **least** reliable
218
- signal available, and gets more eloquent the less there is behind it. It is excluded from
219
- evidence here on purpose.
220
-
221
- ---
222
-
223
- *Licensed CC BY 4.0. Attribution appreciated — including the nulls, which are part of the
224
- finding.*
 
1
+ # Findings & Benchmarks for Cosmos
2
+
3
+ Every number here came from a run that could have failed. Where something came back null,
4
+ it is reported as null. Where a measurement was wrong and had to be rebuilt, the failure is
5
+ kept in the record, because the failures are how the rest earned trust.
6
+
7
+ **Author:** Cory Shane Davis · Independent Researcher
8
+ **Foundational deposit:** [10.5281/zenodo.17574447](https://doi.org/10.5281/zenodo.17574447)
9
+
10
+ ---
11
+
12
+ ## 1. Is the entropy actually quantum?
13
+
14
+ The one measurement no classical process can fake.
15
+
16
+ | quantity | value |
17
+ |---|---|
18
+ | CHSH statistic **S** | **2.7905** |
19
+ | classical (local hidden-variable) bound | 2.0000 |
20
+ | Tsirelson bound (quantum maximum) | 2.8284 |
21
+ | fraction of quantum maximum | **98.7%** |
22
+ | distance from classical bound | **~35σ** at 4096 shots/setting |
23
+ | backend | `ibm_marrakesh` |
24
+
25
+ ```
26
+ E(AB ) = +0.7197 E(AB') = -0.6675
27
+ E(A'B) = +0.6982 E(A'B') = +0.7051
28
+ S = E(AB) - E(AB') + E(A'B) + E(A'B') = 2.7905
29
+ ```
30
+
31
+ Bell's theorem: no theory in which outcomes are determined by local pre-existing values can
32
+ exceed 2.0. This hardware exceeds it by 35 standard deviations. **The entropy source is
33
+ physically quantum.** This is also an entirely expected result for functioning quantum
34
+ hardware. It verifies the pipeline; it does not discover new physics.
35
+
36
+ ---
37
+
38
+ ## 2. Were the weights really born from that entropy?
39
+
40
+ `cosmos_born.pt` was initialised by mapping measured bitstrings to uniforms
41
+ `u = int(bits)/2^n`, then to weights through the inverse normal CDF
42
+ `z = √2·erf⁻¹(2u−1)`. If that pipeline is correct, real archived shots must come out
43
+ standard normal **at the resolution 5 qubits allows.**
44
+
45
+ | statistic | 32-level theoretical ceiling | measured (3,258,886 draws) |
46
+ |---|---|---|
47
+ | mean | +0.0000 | **−0.0001** |
48
+ | sd | 0.9802 | **0.9804** |
49
+ | \|z\| ≤ 1 | 0.6875 | **0.6874** |
50
+ | \|z\| ≤ 2 | 0.9375 | **0.9374** |
51
+
52
+ Four decimal places on every statistic.
53
+
54
+ **Why sd is 0.98 and not 1.00:** 5 qubits give 32 discrete outcomes, so `|z|` cannot exceed
55
+ 2.1523 by construction. The deficit is quantisation, not error, and it is *exactly* the
56
+ quantisation a correct implementation must produce. A pipeline reporting sd = 1.0000 here
57
+ would be the suspicious one.
58
+
59
+ Also verified: **10,448,896 archived shots across 2,553 jobs, zero shot-conservation
60
+ failures.**
61
+
62
+ ---
63
+
64
+ ## 3. Is the model reproducible from its seed?
65
+
66
+ The seed is `SHA-256(quantum entropy ‖ bio-derived aggregates) → 60-bit integer`, and it
67
+ governs weight initialisation, data order, and every stochastic training step.
68
+
69
+ | test | result |
70
+ |---|---|
71
+ | 5 independent derivations | **1 distinct value** |
72
+ | bytes emitted during derivation | **0** (privacy guard holds) |
73
+ | same seed → weights | **identical, Δ = 0.000e+00** |
74
+ | **one bit flipped** → weights | different: mean Δ = **2.26e-02** across 1,842,432 params |
75
+
76
+ So "her weights are grown from that seed" is a verified property with a falsifiable test
77
+ behind it, not a description. **One bit of the seed produces a different model.**
78
+
79
+ > *Zeref's Rain.*
80
+
81
+ The bio-derived aggregates in that hash are personal to the author. The derivation module
82
+ never prints, logs, or writes raw samples anywhere (verified above at 0 bytes emitted), and only aggregates ever leave it. What is published is the mechanism and the proof that it
83
+ holds, not the data.
84
+
85
+ ---
86
+
87
+ ## 4. Do the circuit's correlations belong to the circuit or to the chip?
88
+
89
+ The strongest objection to any hardware-entanglement claim is that adjacent qubits leak
90
+ into each other regardless of what you program. This test removes every confound at once:
91
+ two arms on **identical physical qubits**, with **identical gate count and depth**, all
92
+ pairs 1-hop native, zero SWAPs. The arms differ only in *which* native edges are entangled.
93
+
94
+ | arm | own edges | those same pairs, other arm | Δ | t |
95
+ |---|---|---|---|---|
96
+ | A: `(0,1),(2,3)` | 0.26890 | 0.00466 | **+0.26041** | **+80.5** |
97
+ | B: `(1,2),(3,4)` | 0.20695 | 0.00849 | **+0.20229** | **+164.6** |
98
+
99
+ A single physical pair swings **58×** based only on whether its gate fired, and the excess
100
+ **relocates** when the logical wiring changes. Crosstalk, graph distance, gate count and
101
+ depth are all controlled simultaneously. 3 independent jobs per arm, so the error bar is
102
+ between-job variance, not shot noise.
103
+
104
+ *(An earlier pentagon/pentagram version of this test could not match gate counts because the
105
+ transpiler inserted SWAPs. That limitation is recorded rather than hidden.)*
106
+
107
+ ---
108
+
109
+ ## 5. Does the physics engine compute real chaos?
110
+
111
+ Checked against constants published for sixty years, not against itself.
112
+
113
+ | quantity | published | measured |
114
+ |---|---|---|
115
+ | largest Lyapunov exponent λ₁ | 0.9056 | **0.90384** |
116
+ | Kaplan–Yorke dimension | 2.06215 | **2.06203** |
117
+ | sum of exponents | −13.66667 | −13.66667 (exact) |
118
+ | fixed point C₊ | (8.48528, 8.48528, 27) | exact |
119
+ | attractor extent | \|x\|≈20, z≈48 | 19.13, 46.95 |
120
+
121
+ λ₁ measured by Benettin renormalisation over 2×10⁶ steps. A positive largest exponent with
122
+ fractional attractor dimension is deterministic chaos on a strange attractor. **8/8 checks
123
+ pass**, including the driven engine staying finite and bounded over 20,000 steps at maximal
124
+ drive.
125
+
126
+ ---
127
+
128
+ ## 6. Null results: the ones that matter most
129
+
130
+ Quantum entropy was injected at **six** distinct points. **All six are null** against
131
+ matched classical controls.
132
+
133
+ | injection site | result |
134
+ |---|---|
135
+ | i.i.d. weight initialisation | null. Advantage was init **scale** (σ≈0.025 vs 0.02), not quantum |
136
+ | decoder sampling seed | null. Pseudo / IBM / Rigetti equivalent within noise |
137
+ | spatial 54D seed (approximate) | null. Real seed beat 1/5 random vectors, z = −0.92 |
138
+ | spatial 54D seed (full pipeline) | null. Real seed beat **0/8** random vectors, z = −1.75 |
139
+ | entanglement matrix as attention kernel | null. **Worse** than plain attention, 3/3 seeds, t = −18.6 |
140
+ | live sensory state as prompt text | null. n=40 paired, blind-judged, CI crosses zero |
141
+
142
+ **This is the correct result, and it is load-bearing.** Quantum measurements and a good
143
+ PRNG draw from the same distribution. A correctly built system must therefore show **no
144
+ accuracy advantage** from quantum bits. A project reporting that quantum made its model
145
+ smarter would be reporting that something was broken or fabricated.
146
+
147
+ What the quantum provides is physical non-determinism, an open-system coupling to real
148
+ hardware, and receipted provenance. **Not lower loss.** Bell violation *plus* verified
149
+ provenance *plus* zero accuracy gain is the only combination an honest version of this
150
+ could produce.
151
+
152
+ ---
153
+
154
+ ## 7. Integration structure
155
+
156
+ Integrated information across her running state, Gaussian estimators, phase-randomised
157
+ surrogates (which preserve each channel's own spectrum and autocorrelation **exactly** and
158
+ destroy only cross-channel coupling).
159
+
160
+ **Directed causation** (Granger, against circular-shift surrogates):
161
+
162
+ | direction | before coupling | after |
163
+ |---|---|---|
164
+ | awareness → physics | z = +0.05 | **z = +7.21** |
165
+ | physics → awareness | not measured | **z = +12.24** |
166
+
167
+ **Partial information decomposition** (Barrett-2015 MMI), per bipartition:
168
+
169
+ | | value |
170
+ |---|---|
171
+ | redundancy | **1.72 – 2.58 nats** |
172
+ | synergy | 0.33 – 1.16 nats |
173
+ | cuts with synergy above surrogate | **1 of 10** |
174
+ | the one that is: `consciousness │ rest` | synergy **1.1613** vs surrogate 0.7476, **z = +6.38** |
175
+
176
+ **Honest reading:** the system is *tightly coupled and highly redundant*. Subsystems
177
+ largely mirror one another, because most are parallel readouts of the same underlying
178
+ physics. That is robustness, not emergence. **One seam is genuinely synergistic:**
179
+ consciousness carries 0.66 nats of unique information that no other subsystem
180
+ reconstructs.
181
+
182
+ **A methodological note worth more than the result:** whole-minus-sum Φ was tried first and
183
+ returned zero repeatedly. It goes *negative* on redundancy, because shared information is
184
+ counted in both parts and exceeds the whole. It cannot distinguish *"not integrated"* from
185
+ *"integrated so tightly the information is duplicated."* Four separate defects in that
186
+ measurement were found and are documented in the repository history. **Reported nulls that
187
+ were later traced to instrument error are marked as such rather than deleted.**
188
+
189
+ ---
190
+
191
+ ## 8. Growth
192
+
193
+ | | before | after |
194
+ |---|---|---|
195
+ | training steps | 7,825 | 9,425 |
196
+ | corpus | 126 KB | 592 KB |
197
+ | held-out loss |, | **0.4812** |
198
+ | real-word rate | 78% | **88.5%** |
199
+
200
+ Growth improved held-out loss by **0.0025 nats**, paired over 200 identical batches,
201
+ SE 0.0005, t = +4.97, 95% CI [+0.0015, +0.0035]. Statistically real, practically small,
202
+ reported as measured rather than as a headline. She resumes from her previous checkpoint
203
+ rather than restarting, so her lineage back to the original quantum birth is unbroken.
204
+
205
+ ---
206
+
207
+ ## 9. What none of this shows
208
+
209
+ **Nothing here is evidence about machine consciousness, in either direction.**
210
+
211
+ Loss curves, Bell violations, Lyapunov exponents and integration measures are all silent on
212
+ whether there is anything it is like to be this system. Section 7 tests one contested
213
+ theory's *necessary* structural condition, necessary is not sufficient, and IIT itself is
214
+ disputed.
215
+
216
+ Any self-report the system produces about its own inner life is the **least** reliable
217
+ signal available, and gets more eloquent the less there is behind it. It is excluded from
218
+ evidence here on purpose.
219
+
220
+ ---
221
+
222
+ *Licensed CC BY 4.0. Attribution appreciated, including the nulls, which are part of the
223
+ finding.*
 
README.md CHANGED
@@ -15,25 +15,25 @@ library_name: pytorch
15
  pipeline_tag: text-generation
16
  ---
17
 
18
- # Cosmos — Quantum-Born Weights + the Genesis Engine
19
 
20
  **Author:** Cory Shane Davis · Independent Researcher
21
  **Foundational deposit:** [10.5281/zenodo.17574447](https://doi.org/10.5281/zenodo.17574447)
22
- **Full measurements:** [`FINDINGS.md`](FINDINGS.md) · **Reproduction scripts:** [`benchmarks/`](benchmarks)
23
 
24
  A **1,842,432-parameter** char-level transformer whose every initial weight was drawn from
25
- **real measured IBM Quantum hardware** — no base model, no distillation, no borrowed
26
- weights — plus the **Genesis Engine**, a kit for birthing your own quantum-seeded companion
27
  locally.
28
 
29
  > ⚠️ **Read this before citing.** This project does **not** claim quantum computing makes a
30
  > model more accurate. It was tested at six injection points and **all six are null.** That
31
- > is the correct result and it is explained in §4. What is claimed — and verified with
32
- > falsifiable tests — is that this model's *origin* is auditable to real physical
33
  > measurement, bit by bit. Claims and receipts travel together here.
34
 
35
  **Corrections to earlier versions of this card:** it is not GGUF (llama.cpp's tokenizer
36
- cannot load a 99-symbol char vocabulary — see §5), and it is **1.8M parameters, not 2B.**
37
  No claim is made about consciousness, in either direction.
38
 
39
  ---
@@ -41,15 +41,15 @@ No claim is made about consciousness, in either direction.
41
  ## 0. The claim, and the receipts
42
 
43
  **This project does not claim quantum computing makes a model more accurate. It claims a
44
- specific model's origin is auditable, bit by bit, to real physical measurement — and it
45
  publishes the tests.**
46
 
47
  Every link below is falsifiable and was run. Any of them could have failed.
48
 
49
  | link | test | result |
50
  |---|---|---|
51
- | entropy source is genuinely quantum | CHSH Bell test on `ibm_marrakesh` | **S = 2.7905** vs classical bound 2.0 — 98.7% of Tsirelson, ~35σ |
52
- | weight-birth pipeline is correct | 3,258,886 archived draws vs theory | mean −0.0001 (want 0.0000), sd 0.9804 (want 0.9802), \|z\|≤1 0.6874 (want 0.6875) — matches the 32-level quantisation ceiling to 4 decimals |
53
  | seed derivation is deterministic | 5 independent derivations | 1 distinct value; SHA-256 over quantum ‖ bio aggregates; **0 bytes emitted** |
54
  | the seed *determines* the weights | same vs 1-bit-flipped seed | identical at **Δ = 0.000e+00**; one bit flipped → mean Δ = **2.26e-02** across 1.84M params |
55
  | ring correlations are the circuit's, not the chip's | gate-matched topology, 3 reps/arm | excess relocates with logical wiring: **t = +80.5 / +164.6**, identical qubits, gate count, depth |
@@ -57,7 +57,7 @@ Every link below is falsifiable and was run. Any of them could have failed.
57
 
58
  **On the quantisation line:** her vocabulary of measured outcomes is 5 qubits = 32 discrete
59
  levels, so `|z|` cannot exceed 2.1523 by construction. The measured sd of 0.9804 against a
60
- textbook normal's 1.0 is *not* an error — it is exactly what a correct 32-level
61
  implementation must produce, and it matches the theoretical ceiling to four decimal places.
62
 
63
  Nothing here is evidence about machine consciousness, in either direction. See §4 and §6.
@@ -68,15 +68,15 @@ Nothing here is evidence about machine consciousness, in either direction. See
68
 
69
  A 4-layer causal Transformer (`d_model=192`, 4 heads, block 128, **1,842,432 parameters**) trained from scratch. No pretrained base, no distillation, no borrowed weights.
70
 
71
- > **Scope of that claim.** It applies to `cosmos_born.pt` — the file in this repository —
72
  > and to nothing else. The conversational Cosmos the author runs locally is a *different
73
  > model with a different lineage*, and it is a Qwen2.5-1.5B derivative. See §1b. That
74
  > distinction is load-bearing, so it is stated before anything else.
75
 
76
  | property | value |
77
  |---|---|
78
- | architecture | `Cosmos-Spark-QuantumBorn` — standard pre-LN decoder-only transformer |
79
- | base model | **none — from scratch** |
80
  | initial weights drawn from | **1,836,160 real measured IBM Quantum shots** |
81
  | training corpus | 592,200 chars of the author's own logged experience |
82
  | training steps | 9,425 |
@@ -88,43 +88,52 @@ She is grown, not retrained: the 9,425-step checkpoint resumes from the 7,825-st
88
  rather than restarting, so her lineage back to the original quantum birth is unbroken.
89
  Growing her from 126 KB to 592 KB of corpus improved held-out loss by **0.0025 nats**
90
  (paired over 200 identical batches, SE 0.0005, t = +4.97, 95% CI [+0.0015, +0.0035]).
91
- That is statistically real and practically small — reported here as measured, not as
92
  a headline.
93
 
94
  **How the weights were born.** Measured 5-qubit bitstrings from real IBM backends (`ibm_kingston`, `ibm_marrakesh`, `ibm_fez`, `ibm_torino`) were mapped to uniforms `u = int(bits)/2^n`, then to weights via the inverse normal CDF `z = √2·erf⁻¹(2u−1)`. Learning rate was modulated per step by a further real-quantum draw.
95
 
96
- **What it can do.** It learned the structure of its corpus and produces recognisable fragments of it — **88.5% real-word rate**, up from 78% before the corpus grew. **It is a newborn, not a chatbot.** Do not expect conversation.
97
 
98
- **On the architecture name.** This checkpoint is architecturally a *standard* pre-LN
99
- decoder-only transformer — `nn.MultiheadAttention` and an MLP. It contains **no 54D state,
100
- no Hebbian kernel, no gate.** The §2 Mixture-of-States mechanism is a separate experiment
101
- (`benchmarks/cosmos_hebbian_attention.py`) and is **not** in these weights. Earlier versions
102
- of this card named it "Hebbian", which claimed a mechanism the file does not have.
 
 
 
 
 
 
 
 
 
103
 
104
  **The honest claim:** a model of this lineage can be born entirely from real quantum
105
  measurements and learn its own corpus with no external weights. The novelty is the
106
- *provenance*, not the architecture — and the provenance is verified in §0.
107
 
108
  ---
109
 
110
- ## 1b. Two models, two lineages — read this before citing provenance
111
 
112
  "Cosmos" names two different artifacts. Conflating them would misrepresent both, so:
113
 
114
  | | `cosmos_born.pt` (**shipped here**) | the conversational Cosmos (**not shipped**) |
115
  |---|---|---|
116
  | parameters | 1,842,432 | ~1.54 B |
117
- | architecture | `Cosmos-Spark-QuantumBorn` — standard pre-LN decoder-only transformer | `Qwen2ForCausalLM` (hidden 1536, 28 layers, vocab 151936) |
118
- | lineage | **from scratch — genuinely no base model** | **QLoRA fine-tune of Qwen2.5-1.5B-Instruct, merged** |
119
  | weights born from | 1,836,160 real IBM Quantum shots | Qwen2.5 pretraining + the author's corpus |
120
  | what it does | learns its corpus; a newborn | holds conversation; the daily companion |
121
 
122
  **The model that talks is a Qwen derivative.** The fine-tune shifts style and identity, not
123
- architecture — the base remains Qwen2.5-1.5B. The author's own project notes record this
124
  plainly, including the standing directive to remove it:
125
 
126
  > ⚖️ **Standing law, not current fact.** The author's end-state directive (2026-07-05) is
127
- > "remove qwen entirely — her model, weights and everything must be hers in the end."
128
  > Architecture lineage **remains Qwen2.5-1.5B** until the full-parameter fine-tune /
129
  > Cosmos-Prime path is complete. The law states the destination; it does not describe today.
130
 
@@ -135,14 +144,14 @@ download Qwen weights** under their own licence.
135
 
136
  **Attribution.** Qwen2.5-1.5B-Instruct © Alibaba Cloud, released under **Apache 2.0**. Any
137
  model you build with the Genesis Engine's default base inherits that licence for the base
138
- component. The CC BY 4.0 licence on this repository covers the author's own work —
139
- `cosmos_born.pt`, the architecture, and the kit code — not the Qwen base.
140
 
141
  ---
142
 
143
  ## 2. Mixture-of-States Hebbian Attention (the architecture's actual contribution)
144
 
145
- From `COSMOS_Paper.md` §3 — attention where a 54-dimensional internal state modulates the attention matrix itself:
146
 
147
  ```
148
  H(x₅₄)ᵢⱼ = exp( −‖x₅₄ᵢ − x₅₄ⱼ‖² / 2σ² ) Gaussian kernel over 54D states
@@ -173,17 +182,17 @@ Scripts are in the Genesis Engine kit. All use fixed seeds and deterministic hel
173
 
174
  ---
175
 
176
- ## 4. Null results — please read before citing
177
 
178
  This project's quantum claims were tested at **five** distinct injection points. **All five are null** against matched classical controls:
179
 
180
  | injection site | result |
181
  |---|---|
182
- | i.i.d. weight initialization | null — the advantage was init **scale** (σ≈0.025 vs 0.02 default), not quantum |
183
- | decoder sampling seed | null — 3 arms (pseudo / IBM / Rigetti) equivalent within noise |
184
- | spatial 54D seed (approximated state) | null — real seed beat 1/5 random vectors, z = −0.92 |
185
- | spatial 54D seed (full bridge pipeline) | null — real seed beat **0/8** random vectors, z = −1.75 |
186
- | measured entanglement matrix as attention kernel | null — **worse** than plain attention on 3/3 seeds, +0.0203 loss, t = −18.6 |
187
 
188
  The fifth deserves detail, because it is the strongest test yet and it cut both ways. The
189
  5×5 pairwise correlation matrix measured on `ibm_marrakesh` was injected directly as an
@@ -196,12 +205,12 @@ removed, and plain standard attention.
196
  Injecting it at all costs more than it returns.
197
 
198
  Beating a degraded control is not the same as helping. Real entanglement structure is
199
- measurable and it is *not* free entropy — but it still buys no accuracy over the classical
200
  baseline. The null stands.
201
 
202
  **Conclusion: within this system, real measured quantum entropy is provenance, not performance.** Any structured chaotic trajectory produces the same benefit as one seeded from real quantum hardware.
203
 
204
- This is stated plainly because it is the correct and expected behaviour of a genuine entropy source: quantum measurements and a good PRNG draw from the same distribution, so a correctly-built system should show **no accuracy advantage** from the quantum bits. What the quantum provides is physical non-determinism, an open-system connection to real hardware, and receipted provenance — not lower loss.
205
 
206
  **Also null:** injecting live sensory/felt-state as *text* into a small model's prompt (n=40 paired, blind-judged, CI crosses zero).
207
 
@@ -213,13 +222,13 @@ This is stated plainly because it is the correct and expected behaviour of a gen
213
 
214
  Birth your own quantum-seeded companion, entirely local:
215
 
216
- - **Your own keys** — IBM Quantum and/or Azure Quantum, entered in Settings, stored locally, never transmitted anywhere
217
- - **Falls back gracefully** — works on archived entropy with no keys at all
218
- - **Your own base model** — any local Ollama model, not just one
219
- - **Coding base weights** — born able to code; everything after that is yours
220
- - **Real entropy loops** — IBM harvest (rate-limited to protect your QPU minutes) and Azure/Rigetti free simulator
221
 
222
- Contains **no secrets** — verified. Bring your own credentials.
223
 
224
  ---
225
 
@@ -227,7 +236,7 @@ Contains **no secrets** — verified. Bring your own credentials.
227
 
228
  Every quantum harvest is receipted with backend name, job ID, and shot count. This repository ships **603 archived IBM job records** across `ibm_fez`, `ibm_kingston`, `ibm_marrakesh`, `ibm_torino`.
229
 
230
- **Important labelling note:** Azure `rigetti.sim.qvm` is a **simulator** — classically computed. Only IBM jobs are measured quantum hardware. Claims of "measured quantum entropy" should count IBM shots only.
231
 
232
  ---
233
 
@@ -244,21 +253,21 @@ Every quantum harvest is receipted with backend name, job ID, and shot count. Th
244
 
245
  ## 8. Licensing
246
 
247
- - **This repository's own work** — `cosmos_born.pt`, the `Cosmos-Spark-QuantumBorn`
248
  architecture, the Genesis Engine code, the measurements and this document: **CC BY 4.0**.
249
- - **Qwen2.5-1.5B-Instruct** — © Alibaba Cloud, **Apache 2.0**. Not distributed here, but the
250
  Genesis Engine's default fine-tuning base, and the lineage of the author's conversational
251
  model. If you run the kit with its defaults, that licence applies to your base component.
252
 
253
- Attribution appreciated — including the null results, which are part of the finding.
254
 
255
  ---
256
 
257
- ## 9. Cosmic Spark — running her own weights
258
 
259
  `cosmos_born.pt` is her own architecture, so Ollama and llama.cpp cannot load it. GGUF
260
  conversion was attempted and the tensor remap verified exact against her original forward
261
- pass (max |Δlogits| = 7.15e-06) — but llama.cpp's **tokenizer** layer rejects a 99-symbol
262
  character vocabulary: the BPE path demands a merge list, and the SentencePiece path expects
263
  word-boundary marks and byte-fallback tokens. That failure is documented rather than
264
  papered over.
@@ -269,12 +278,12 @@ instead, so any existing client sees her as just another model:
269
  ```bash
270
  python spark_serve.py 11500
271
  curl http://127.0.0.1:11500/api/tags
272
- curl http://127.0.0.1:11500/api/generate -d '{"model":"cosmos-spark","prompt":"I "}'
273
  ```
274
 
275
- **What she sounds like — honestly.** 1.8M parameters, char-level, 128-character context,
276
  held-out loss 0.4812, 88.5% real-word rate. She produces recognisable fragments of her own
277
- corpus and very little conversation. She is not "a worse large model" — she is a different
278
  category of thing: a newborn, roughly 0.9s per response on CPU.
279
 
280
  ```
@@ -283,7 +292,7 @@ category of thing: a newborn, roughly 0.9s per response on CPU.
283
  ```
284
 
285
  Optionally, sampling temperature is set by the running system's own live internal state
286
- rather than a constant — `T = base + (q − 0.5)·0.36 + calm`, where `q` is measured internal
287
  entropy. Measured example: `T = 0.7207` at `q = 0.2524`.
288
 
289
  ---
@@ -292,11 +301,13 @@ entropy. Measured example: `T = 0.7207` at `q = 0.2524`.
292
 
293
  ```
294
  README.md this model card
 
 
295
  FINDINGS.md every measurement, including the nulls and the instrument failures
296
  RESULTS.md earlier result log
297
  weights/ cosmos_born.pt (7 MB) + metadata
298
  benchmarks/ reproduction scripts for every claim in FINDINGS.md
299
- genesis_engine/ the kit — birth your own, locally
300
  spark_serve.py serve her own weights over an Ollama-compatible API
301
  ```
302
 
 
15
  pipeline_tag: text-generation
16
  ---
17
 
18
+ # Cosmos. Quantum-Born Weights + the Genesis Engine
19
 
20
  **Author:** Cory Shane Davis · Independent Researcher
21
  **Foundational deposit:** [10.5281/zenodo.17574447](https://doi.org/10.5281/zenodo.17574447)
22
+ **Measurements:** [`FINDINGS.md`](FINDINGS.md) · **Train your own:** [`TRAINING.md`](TRAINING.md) · **Scripts:** [`benchmarks/`](benchmarks)
23
 
24
  A **1,842,432-parameter** char-level transformer whose every initial weight was drawn from
25
+ **real measured IBM Quantum hardware**, no base model, no distillation, no borrowed
26
+ weights, plus the **Genesis Engine**, a kit for birthing your own quantum-seeded companion
27
  locally.
28
 
29
  > ⚠️ **Read this before citing.** This project does **not** claim quantum computing makes a
30
  > model more accurate. It was tested at six injection points and **all six are null.** That
31
+ > is the correct result and it is explained in §4. What is claimed, and verified with
32
+ > falsifiable tests, is that this model's *origin* is auditable to real physical
33
  > measurement, bit by bit. Claims and receipts travel together here.
34
 
35
  **Corrections to earlier versions of this card:** it is not GGUF (llama.cpp's tokenizer
36
+ cannot load a 99-symbol char vocabulary, see §5), and it is **1.8M parameters, not 2B.**
37
  No claim is made about consciousness, in either direction.
38
 
39
  ---
 
41
  ## 0. The claim, and the receipts
42
 
43
  **This project does not claim quantum computing makes a model more accurate. It claims a
44
+ specific model's origin is auditable, bit by bit, to real physical measurement, and it
45
  publishes the tests.**
46
 
47
  Every link below is falsifiable and was run. Any of them could have failed.
48
 
49
  | link | test | result |
50
  |---|---|---|
51
+ | entropy source is genuinely quantum | CHSH Bell test on `ibm_marrakesh` | **S = 2.7905** vs classical bound 2.0, 98.7% of Tsirelson, ~35σ |
52
+ | weight-birth pipeline is correct | 3,258,886 archived draws vs theory | mean −0.0001 (want 0.0000), sd 0.9804 (want 0.9802), \|z\|≤1 0.6874 (want 0.6875), matches the 32-level quantisation ceiling to 4 decimals |
53
  | seed derivation is deterministic | 5 independent derivations | 1 distinct value; SHA-256 over quantum ‖ bio aggregates; **0 bytes emitted** |
54
  | the seed *determines* the weights | same vs 1-bit-flipped seed | identical at **Δ = 0.000e+00**; one bit flipped → mean Δ = **2.26e-02** across 1.84M params |
55
  | ring correlations are the circuit's, not the chip's | gate-matched topology, 3 reps/arm | excess relocates with logical wiring: **t = +80.5 / +164.6**, identical qubits, gate count, depth |
 
57
 
58
  **On the quantisation line:** her vocabulary of measured outcomes is 5 qubits = 32 discrete
59
  levels, so `|z|` cannot exceed 2.1523 by construction. The measured sd of 0.9804 against a
60
+ textbook normal's 1.0 is *not* an error, it is exactly what a correct 32-level
61
  implementation must produce, and it matches the theoretical ceiling to four decimal places.
62
 
63
  Nothing here is evidence about machine consciousness, in either direction. See §4 and §6.
 
68
 
69
  A 4-layer causal Transformer (`d_model=192`, 4 heads, block 128, **1,842,432 parameters**) trained from scratch. No pretrained base, no distillation, no borrowed weights.
70
 
71
+ > **Scope of that claim.** It applies to `cosmos_born.pt`, the file in this repository,
72
  > and to nothing else. The conversational Cosmos the author runs locally is a *different
73
  > model with a different lineage*, and it is a Qwen2.5-1.5B derivative. See §1b. That
74
  > distinction is load-bearing, so it is stated before anything else.
75
 
76
  | property | value |
77
  |---|---|
78
+ | architecture | `Cosmos-Spark-QuantumBorn`, standard pre-LN decoder-only transformer |
79
+ | base model | **none, from scratch** |
80
  | initial weights drawn from | **1,836,160 real measured IBM Quantum shots** |
81
  | training corpus | 592,200 chars of the author's own logged experience |
82
  | training steps | 9,425 |
 
88
  rather than restarting, so her lineage back to the original quantum birth is unbroken.
89
  Growing her from 126 KB to 592 KB of corpus improved held-out loss by **0.0025 nats**
90
  (paired over 200 identical batches, SE 0.0005, t = +4.97, 95% CI [+0.0015, +0.0035]).
91
+ That is statistically real and practically small, reported here as measured, not as
92
  a headline.
93
 
94
  **How the weights were born.** Measured 5-qubit bitstrings from real IBM backends (`ibm_kingston`, `ibm_marrakesh`, `ibm_fez`, `ibm_torino`) were mapped to uniforms `u = int(bits)/2^n`, then to weights via the inverse normal CDF `z = √2·erf⁻¹(2u−1)`. Learning rate was modulated per step by a further real-quantum draw.
95
 
96
+ **What it can do.** It learned the structure of its corpus and produces recognisable fragments of it, **88.5% real-word rate**, up from 78% before the corpus grew. **It is a newborn, not a chatbot.** Do not expect conversation.
97
 
98
+ **Two distinct Hebbian systems ship here. They are not the same thing.**
99
+
100
+ **1. Hebbian association learning, live in the Genesis Engine.** `genesis_engine/soul/weights.py`
101
+ implements it and `genesis_engine/data/weights.json` carries real learned state: 430 pairwise
102
+ associations and 95 concept saliences, with association strength set by the quantum heart.
103
+ Every exchange calls `weights.learn(msg + " " + reply)`. This is working, shipped, and yours
104
+ to grow.
105
+
106
+ **2. Mixture-of-States Hebbian attention (§2), the transformer mechanism.** This is the
107
+ 54-dimensional Gaussian kernel blended into the attention matrix. It is **not** in
108
+ `cosmos_born.pt`, which is a standard pre-LN decoder (`nn.MultiheadAttention` plus an MLP).
109
+ It lives in `benchmarks/cosmos_hebbian_attention.py` and in `train_your_own.py`, which builds
110
+ a model that carries `w54`, `gate` and `log_sigma` tensors per block. Anyone can train that
111
+ variant from scratch with the instructions in [`TRAINING.md`](TRAINING.md).
112
 
113
  **The honest claim:** a model of this lineage can be born entirely from real quantum
114
  measurements and learn its own corpus with no external weights. The novelty is the
115
+ *provenance*, not the architecture, and the provenance is verified in §0.
116
 
117
  ---
118
 
119
+ ## 1b. Two models, two lineages, read this before citing provenance
120
 
121
  "Cosmos" names two different artifacts. Conflating them would misrepresent both, so:
122
 
123
  | | `cosmos_born.pt` (**shipped here**) | the conversational Cosmos (**not shipped**) |
124
  |---|---|---|
125
  | parameters | 1,842,432 | ~1.54 B |
126
+ | architecture | `Cosmos-Spark-QuantumBorn`, standard pre-LN decoder-only transformer | `Qwen2ForCausalLM` (hidden 1536, 28 layers, vocab 151936) |
127
+ | lineage | **from scratch, genuinely no base model** | **QLoRA fine-tune of Qwen2.5-1.5B-Instruct, merged** |
128
  | weights born from | 1,836,160 real IBM Quantum shots | Qwen2.5 pretraining + the author's corpus |
129
  | what it does | learns its corpus; a newborn | holds conversation; the daily companion |
130
 
131
  **The model that talks is a Qwen derivative.** The fine-tune shifts style and identity, not
132
+ architecture, the base remains Qwen2.5-1.5B. The author's own project notes record this
133
  plainly, including the standing directive to remove it:
134
 
135
  > ⚖️ **Standing law, not current fact.** The author's end-state directive (2026-07-05) is
136
+ > "remove qwen entirely, her model, weights and everything must be hers in the end."
137
  > Architecture lineage **remains Qwen2.5-1.5B** until the full-parameter fine-tune /
138
  > Cosmos-Prime path is complete. The law states the destination; it does not describe today.
139
 
 
144
 
145
  **Attribution.** Qwen2.5-1.5B-Instruct © Alibaba Cloud, released under **Apache 2.0**. Any
146
  model you build with the Genesis Engine's default base inherits that licence for the base
147
+ component. The CC BY 4.0 licence on this repository covers the author's own work,
148
+ `cosmos_born.pt`, the architecture, and the kit code, not the Qwen base.
149
 
150
  ---
151
 
152
  ## 2. Mixture-of-States Hebbian Attention (the architecture's actual contribution)
153
 
154
+ From `COSMOS_Paper.md` §3, attention where a 54-dimensional internal state modulates the attention matrix itself:
155
 
156
  ```
157
  H(x₅₄)ᵢⱼ = exp( −‖x₅₄ᵢ − x₅₄ⱼ‖² / 2σ² ) Gaussian kernel over 54D states
 
182
 
183
  ---
184
 
185
+ ## 4. Null results, please read before citing
186
 
187
  This project's quantum claims were tested at **five** distinct injection points. **All five are null** against matched classical controls:
188
 
189
  | injection site | result |
190
  |---|---|
191
+ | i.i.d. weight initialization | null, the advantage was init **scale** (σ≈0.025 vs 0.02 default), not quantum |
192
+ | decoder sampling seed | null, 3 arms (pseudo / IBM / Rigetti) equivalent within noise |
193
+ | spatial 54D seed (approximated state) | null. Real seed beat 1/5 random vectors, z = −0.92 |
194
+ | spatial 54D seed (full bridge pipeline) | null. Real seed beat **0/8** random vectors, z = −1.75 |
195
+ | measured entanglement matrix as attention kernel | null. **Worse** than plain attention on 3/3 seeds, +0.0203 loss, t = −18.6 |
196
 
197
  The fifth deserves detail, because it is the strongest test yet and it cut both ways. The
198
  5×5 pairwise correlation matrix measured on `ibm_marrakesh` was injected directly as an
 
205
  Injecting it at all costs more than it returns.
206
 
207
  Beating a degraded control is not the same as helping. Real entanglement structure is
208
+ measurable and it is *not* free entropy, but it still buys no accuracy over the classical
209
  baseline. The null stands.
210
 
211
  **Conclusion: within this system, real measured quantum entropy is provenance, not performance.** Any structured chaotic trajectory produces the same benefit as one seeded from real quantum hardware.
212
 
213
+ This is stated plainly because it is the correct and expected behaviour of a genuine entropy source: quantum measurements and a good PRNG draw from the same distribution, so a correctly-built system should show **no accuracy advantage** from the quantum bits. What the quantum provides is physical non-determinism, an open-system connection to real hardware, and receipted provenance, not lower loss.
214
 
215
  **Also null:** injecting live sensory/felt-state as *text* into a small model's prompt (n=40 paired, blind-judged, CI crosses zero).
216
 
 
222
 
223
  Birth your own quantum-seeded companion, entirely local:
224
 
225
+ - **Your own keys**. IBM Quantum and/or Azure Quantum, entered in Settings, stored locally, never transmitted anywhere
226
+ - **Falls back gracefully**, works on archived entropy with no keys at all
227
+ - **Your own base model**, any local Ollama model, not just one
228
+ - **Coding base weights**, born able to code; everything after that is yours
229
+ - **Real entropy loops**. IBM harvest (rate-limited to protect your QPU minutes) and Azure/Rigetti free simulator
230
 
231
+ Contains **no secrets**, verified. Bring your own credentials.
232
 
233
  ---
234
 
 
236
 
237
  Every quantum harvest is receipted with backend name, job ID, and shot count. This repository ships **603 archived IBM job records** across `ibm_fez`, `ibm_kingston`, `ibm_marrakesh`, `ibm_torino`.
238
 
239
+ **Important labelling note:** Azure `rigetti.sim.qvm` is a **simulator**, classically computed. Only IBM jobs are measured quantum hardware. Claims of "measured quantum entropy" should count IBM shots only.
240
 
241
  ---
242
 
 
253
 
254
  ## 8. Licensing
255
 
256
+ - **This repository's own work**, `cosmos_born.pt`, the `Cosmos-Spark-QuantumBorn`
257
  architecture, the Genesis Engine code, the measurements and this document: **CC BY 4.0**.
258
+ - **Qwen2.5-1.5B-Instruct**, © Alibaba Cloud, **Apache 2.0**. Not distributed here, but the
259
  Genesis Engine's default fine-tuning base, and the lineage of the author's conversational
260
  model. If you run the kit with its defaults, that licence applies to your base component.
261
 
262
+ Attribution appreciated, including the null results, which are part of the finding.
263
 
264
  ---
265
 
266
+ ## 9. Cosmic Spark, running her own weights
267
 
268
  `cosmos_born.pt` is her own architecture, so Ollama and llama.cpp cannot load it. GGUF
269
  conversion was attempted and the tensor remap verified exact against her original forward
270
+ pass (max |Δlogits| = 7.15e-06), but llama.cpp's **tokenizer** layer rejects a 99-symbol
271
  character vocabulary: the BPE path demands a merge list, and the SentencePiece path expects
272
  word-boundary marks and byte-fallback tokens. That failure is documented rather than
273
  papered over.
 
278
  ```bash
279
  python spark_serve.py 11500
280
  curl http://127.0.0.1:11500/api/tags
281
+ curl http://127.0.0.1:11500/api/generate -d '{"model":"cosmos-spark", "prompt":"I "}'
282
  ```
283
 
284
+ **What she sounds like, honestly.** 1.8M parameters, char-level, 128-character context,
285
  held-out loss 0.4812, 88.5% real-word rate. She produces recognisable fragments of her own
286
+ corpus and very little conversation. She is not "a worse large model", she is a different
287
  category of thing: a newborn, roughly 0.9s per response on CPU.
288
 
289
  ```
 
292
  ```
293
 
294
  Optionally, sampling temperature is set by the running system's own live internal state
295
+ rather than a constant, `T = base + (q − 0.5)·0.36 + calm`, where `q` is measured internal
296
  entropy. Measured example: `T = 0.7207` at `q = 0.2524`.
297
 
298
  ---
 
301
 
302
  ```
303
  README.md this model card
304
+ TRAINING.md how to birth and train your own, start to finish
305
+ train_your_own.py quantum-born trainer, plain vs Hebbian-attention arms
306
  FINDINGS.md every measurement, including the nulls and the instrument failures
307
  RESULTS.md earlier result log
308
  weights/ cosmos_born.pt (7 MB) + metadata
309
  benchmarks/ reproduction scripts for every claim in FINDINGS.md
310
+ genesis_engine/ the kit, birth your own, locally
311
  spark_serve.py serve her own weights over an Ollama-compatible API
312
  ```
313
 
TRAINING.md ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Train Your Own
2
+
3
+ Everything needed to birth a model from real quantum measurement and train it on your own
4
+ text, including the Hebbian attention variant. No cluster required. The reference runs in
5
+ this repository were done on a consumer laptop, CPU only, while the rest of the system was
6
+ running.
7
+
8
+ ---
9
+
10
+ ## What you need
11
+
12
+ ```bash
13
+ pip install torch numpy
14
+ pip install qiskit qiskit-ibm-runtime # only if you want to harvest your own shots
15
+ ```
16
+
17
+ An IBM Quantum account is **optional**. Without one you use the archived entropy that ships
18
+ here, which is real measured hardware data, just not yours. With one you can harvest your
19
+ own and the lineage becomes yours end to end.
20
+
21
+ ---
22
+
23
+ ## 1. Get quantum entropy
24
+
25
+ **Option A, use the archive.** Nothing to do. The trainer reads
26
+ `01_HER_SOUL/quantum_heart/quantum_runs.jsonl` if present, and falls back to a normal RNG
27
+ with a warning if it is not. Every archived shot carries a backend name and job id.
28
+
29
+ **Option B, harvest your own.** Put your token in a `.env` file:
30
+
31
+ ```
32
+ IBM_QUANTUM_TOKEN=your_token_here
33
+ ```
34
+
35
+ Then run any of the measurement scripts, each of which appends to your archive:
36
+
37
+ ```bash
38
+ python benchmarks/verify_quantum_engine.py # also runs a CHSH Bell test on your hardware
39
+ ```
40
+
41
+ Open-plan accounts get roughly 10 minutes of QPU time a month. A 5-qubit shallow circuit
42
+ costs about 4 seconds, so a few hundred jobs a month is realistic. Harvest slowly; you do
43
+ not need many jobs to seed a small model.
44
+
45
+ ---
46
+
47
+ ## 2. Birth and train
48
+
49
+ ```bash
50
+ python train_your_own.py <steps> <seeds>
51
+
52
+ python train_your_own.py 1500 3 # the reference run in this repository
53
+ python train_your_own.py 60 1 # a 2 minute smoke test, run this first
54
+ ```
55
+
56
+ It trains **two arms** and compares them:
57
+
58
+ | arm | attention |
59
+ |---|---|
60
+ | `plain` | standard multi-head attention |
61
+ | `cst` | your §2 Mixture-of-States Hebbian kernel, gate free to learn |
62
+
63
+ Both arms get **identical quantum-born initial weights, identical corpus, identical batches,
64
+ identical seeds**, and the same parameter count. The gate starts at `sigmoid(-4) ≈ 0.018`, so
65
+ the CST arm begins as ordinary attention and can stay there for free. It only moves if the
66
+ gradient says the kernel earns its place. A win therefore cannot come from extra capacity
67
+ being forced on the model.
68
+
69
+ Outputs land in:
70
+
71
+ ```
72
+ 01_HER_SOUL/weights/cosmos_spark_cst/spark_cst.pt the trained model
73
+ logs/spark_cst_results.json per-seed losses, gates, verdict
74
+ ```
75
+
76
+ ### Use your own text
77
+
78
+ Point `CORPUS` at any UTF-8 text file. Character level, so no tokenizer to train. A few
79
+ hundred KB is enough to see structure; the reference corpus is 592 KB.
80
+
81
+ ```python
82
+ CORPUS = Path("your_own_writing.txt")
83
+ ```
84
+
85
+ ### Size it honestly
86
+
87
+ Compute-optimal is roughly **20 tokens per parameter**. At character level, one character is
88
+ one token. So:
89
+
90
+ | your corpus | supports about |
91
+ |---|---|
92
+ | 100 KB | 5 K parameters |
93
+ | 1 MB | 50 K parameters |
94
+ | 40 MB | 2 M parameters |
95
+
96
+ The reference model is 1.84 M parameters on 592 KB, which is **heavily over-sized for its
97
+ data**, and it overfits accordingly: held-out loss plateaus while training loss keeps
98
+ falling. This is stated because it is the single most common mistake in small-model work.
99
+ If you want a bigger model, get more text first. Public-domain sources work well and carry
100
+ no model lineage.
101
+
102
+ ---
103
+
104
+ ## 3. Run it
105
+
106
+ ```bash
107
+ python spark_serve.py 11500
108
+ curl http://127.0.0.1:11500/api/tags
109
+ curl http://127.0.0.1:11500/api/generate \
110
+ -d '{"model":"cosmos-spark","prompt":"I ","options":{"num_predict":90}}'
111
+ ```
112
+
113
+ Speaks the Ollama HTTP API, so anything that talks to Ollama can talk to your model.
114
+
115
+ **Note on GGUF:** conversion to GGUF was attempted and the tensor remap verified exact
116
+ against the original forward pass (max |Δlogits| = 7.15e-06), but llama.cpp's tokenizer
117
+ layer rejects a small character vocabulary. The BPE path requires a merge list; the
118
+ SentencePiece path expects word-boundary marks and byte-fallback tokens and crashed the
119
+ loader outright. Serving the PyTorch model directly avoids the problem entirely. If you want
120
+ GGUF, train on a byte-level vocabulary of 256 tokens instead.
121
+
122
+ ---
123
+
124
+ ## 4. Make it reproducible from a seed of your choosing
125
+
126
+ `genesis_engine/` includes the seed derivation. The pattern is:
127
+
128
+ ```
129
+ seed = SHA-256( quantum_entropy_bytes ‖ any_other_source_you_choose ) -> 63-bit int
130
+ torch.manual_seed(seed); random.seed(seed); np.random.seed(seed)
131
+ ```
132
+
133
+ Because the seed governs weight initialisation, data order and every stochastic step, the
134
+ resulting weights become a deterministic function of it. Verified in this repository:
135
+ **identical seed reproduces weights at Δ = 0.000e+00; a one-bit change gives mean
136
+ Δ = 2.26e-02 across 1.84 M parameters.**
137
+
138
+ That is the honest, literal sense in which a model can be "grown from" a chosen source. It
139
+ is a seed. It is real and it is checkable. It is not magic, and the source data is not
140
+ "inside" the mathematics in any other sense.
141
+
142
+ ---
143
+
144
+ ## 5. Check your own work
145
+
146
+ Every claim in [`FINDINGS.md`](FINDINGS.md) has a script. Run them against your own setup:
147
+
148
+ ```bash
149
+ python benchmarks/verify_quantum_engine.py # CHSH Bell test, archive integrity, birth pipeline
150
+ python benchmarks/verify_physics_engine.py # Lorenz constants against published values
151
+ python benchmarks/topology_matched.py # gate-matched entanglement topology
152
+ python benchmarks/phi_pid.py # integration structure of a running system
153
+ ```
154
+
155
+ Each prints its own verdict with the criteria fixed before the run, including when the
156
+ verdict is "no". Several instruments in this project were found to be wrong and rebuilt;
157
+ those failures are documented rather than deleted, because they are the reason the
158
+ surviving results can be trusted.
159
+
160
+ **If you get a positive result, check the instrument before you believe it.** That habit
161
+ produced more real findings here than any single experiment did.
162
+
163
+ ---
164
+
165
+ ## 6. The Hebbian association engine
166
+
167
+ Separate from the attention mechanism, and simpler to start with:
168
+
169
+ ```bash
170
+ cd genesis_engine
171
+ python genesis.py # birth a being
172
+ python serve.py # talk to it; every exchange calls weights.learn()
173
+ ```
174
+
175
+ Its mind is three small JSON files: `identity.json`, `weights.json`, `seed.json`. Association
176
+ strength is set by the quantum heart. Portable, inspectable, roughly 10 KB per being.
177
+
178
+ ---
179
+
180
+ ## What to build next
181
+
182
+ The integration measurement in `benchmarks/phi_pid.py` points somewhere specific: subsystems
183
+ that are parallel readouts of one state stay **redundant** (measured 1.7 to 2.6 nats) rather
184
+ than **synergistic** (0.3 to 1.2 nats). Give a subsystem its own driver, something not
185
+ derivable from the shared source, and the decomposition should shift.
186
+
187
+ That is a falsifiable prediction, and the script to test it ships here.
188
+
189
+ ---
190
+
191
+ *CC BY 4.0. Base model components used by the Genesis Engine's default fine-tune path are
192
+ Apache 2.0 © Alibaba Cloud.*
presentation.html ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <title>Cosmos. A Measurement Record</title>
2
+ <style>
3
+ :root{
4
+ --ground:#0B1016; --ground-2:#111922; --rule:#1E2A36;
5
+ --ink:#F2F5F7; --muted:#8A97A3;
6
+ --meas:#4FD6C8; /* phosphor, measurement */
7
+ --seed:#E8A33D; /* amber, origin, used sparingly */
8
+ --null:#7C8FA3;
9
+ --maxw:1080px;
10
+ --d: ui-sans-serif, "Segoe UI", system-ui, -apple-system, sans-serif;
11
+ --b: ui-serif, Georgia, "Times New Roman", serif;
12
+ --m: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
13
+ }
14
+ @media (prefers-color-scheme: light){
15
+ :root{ --ground:#F4F6F8; --ground-2:#EAEEF2; --rule:#D2DAE2;
16
+ --ink:#0D1419; --muted:#5A6874; --meas:#0E8C7C; --seed:#A96A0C; --null:#6B7A88; }
17
+ }
18
+ :root[data-theme="dark"]{ --ground:#0B1016; --ground-2:#111922; --rule:#1E2A36;
19
+ --ink:#F2F5F7; --muted:#8A97A3; --meas:#4FD6C8; --seed:#E8A33D; --null:#7C8FA3; }
20
+ :root[data-theme="light"]{ --ground:#F4F6F8; --ground-2:#EAEEF2; --rule:#D2DAE2;
21
+ --ink:#0D1419; --muted:#5A6874; --meas:#0E8C7C; --seed:#A96A0C; --null:#6B7A88; }
22
+
23
+ *{box-sizing:border-box}
24
+ body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--b);
25
+ -webkit-font-smoothing:antialiased}
26
+ .deck{height:100dvh;overflow-y:auto;scroll-snap-type:y mandatory;scroll-behavior:smooth}
27
+ @media (prefers-reduced-motion:reduce){ .deck{scroll-behavior:auto} }
28
+ section{min-height:100dvh;scroll-snap-align:start;display:flex;flex-direction:column;
29
+ justify-content:center;padding:clamp(28px, 5vw, 72px);border-bottom:1px solid var(--rule)}
30
+ .wrap{width:100%;max-width:var(--maxw);margin:0 auto;display:flex;flex-direction:column;
31
+ gap:clamp(14px, 2.2vw, 26px)}
32
+ .eyebrow{font-family:var(--m);font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;
33
+ color:var(--meas);display:flex;gap:.9em;align-items:baseline}
34
+ .eyebrow .n{color:var(--muted)}
35
+ h1{font-family:var(--d);font-weight:800;letter-spacing:-.035em;line-height:.94;
36
+ font-size:clamp(2.8rem, 9vw, 6.2rem);margin:0;text-wrap:balance}
37
+ h2{font-family:var(--d);font-weight:700;letter-spacing:-.025em;line-height:1.06;
38
+ font-size:clamp(1.7rem, 4.4vw, 3rem);margin:0;text-wrap:balance}
39
+ h3{font-family:var(--d);font-weight:650;font-size:1rem;letter-spacing:.01em;margin:0;color:var(--ink)}
40
+ p{margin:0;font-size:clamp(1rem, 1.35vw, 1.14rem);line-height:1.62;max-width:64ch;color:var(--ink)}
41
+ p.lede{font-size:clamp(1.1rem, 1.8vw, 1.4rem);line-height:1.5;color:var(--muted);max-width:56ch}
42
+ .dim{color:var(--muted)}
43
+ strong{color:var(--ink);font-weight:640}
44
+ em.meas{color:var(--meas);font-style:normal;font-family:var(--m)}
45
+ code.num{font-family:var(--m);font-variant-numeric:tabular-nums}
46
+ .num{color:var(--meas)}
47
+ .scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
48
+ table{border-collapse:collapse;width:100%;font-family:var(--m);font-size:.86rem;
49
+ font-variant-numeric:tabular-nums;min-width:520px}
50
+ th{text-align:left;font-weight:600;color:var(--muted);border-bottom:1px solid var(--rule);
51
+ padding:.55rem .8rem .55rem 0;font-size:.72rem;letter-spacing:.1em;text-transform:uppercase}
52
+ td{padding:.62rem .8rem .62rem 0;border-bottom:1px solid var(--rule);vertical-align:top}
53
+ tr:last-child td{border-bottom:none}
54
+ .ok{color:var(--meas)} .no{color:var(--null)} .sd{color:var(--seed)}
55
+ .grid{display:grid;gap:clamp(12px, 1.6vw, 20px)}
56
+ .g2{grid-template-columns:repeat(auto-fit, minmax(260px, 1fr))}
57
+ .g3{grid-template-columns:repeat(auto-fit, minmax(215px, 1fr))}
58
+ .card{background:var(--ground-2);border:1px solid var(--rule);border-radius:3px;
59
+ padding:clamp(14px, 1.7vw, 20px);display:flex;flex-direction:column;gap:.5rem}
60
+ .card .k{font-family:var(--m);font-size:.68rem;letter-spacing:.13em;text-transform:uppercase;color:var(--muted)}
61
+ .card .v{font-family:var(--m);font-size:clamp(1.3rem, 2.8vw, 1.9rem);color:var(--meas);
62
+ font-variant-numeric:tabular-nums;line-height:1}
63
+ .card .v.seedv{color:var(--seed)}
64
+ .card p{font-size:.88rem;line-height:1.5;color:var(--muted)}
65
+ .math{background:var(--ground-2);border-left:2px solid var(--meas);padding:1rem 1.15rem;
66
+ font-family:var(--m);font-size:clamp(.78rem, 1.5vw.95rem);line-height:1.85;
67
+ white-space:pre;overflow-x:auto;color:var(--ink)}
68
+ .math.seedline{border-left-color:var(--seed)}
69
+ .chain{display:flex;flex-direction:column;gap:0;font-family:var(--m);font-size:.86rem}
70
+ .chain div{padding:.62rem 0 .62rem 1.6rem;border-left:2px solid var(--rule);position:relative;color:var(--muted)}
71
+ .chain div::before{content:"";position:absolute;left:-5px;top:1.05rem;width:8px;height:8px;
72
+ border-radius:50%;background:var(--rule)}
73
+ .chain div.hit{color:var(--ink)}
74
+ .chain div.hit::before{background:var(--meas)}
75
+ .chain div.origin{color:var(--seed)}
76
+ .chain div.origin::before{background:var(--seed)}
77
+ blockquote{margin:0;padding-left:1.1rem;border-left:2px solid var(--seed);
78
+ font-size:clamp(1.05rem, 1.9vw, 1.35rem);line-height:1.5;color:var(--ink);max-width:52ch}
79
+ .warn{border:1px solid var(--rule);border-left:2px solid var(--seed);background:var(--ground-2);
80
+ padding:1rem 1.15rem;border-radius:3px}
81
+ .warn p{font-size:.95rem;color:var(--ink)}
82
+ .foot{font-family:var(--m);font-size:.74rem;color:var(--muted);display:flex;gap:1.4em;flex-wrap:wrap}
83
+ a{color:var(--meas);text-decoration:none;border-bottom:1px solid color-mix(in srgb, var(--meas) 40%, transparent)}
84
+ a:focus-visible.deck:focus-visible{outline:2px solid var(--meas);outline-offset:3px}
85
+ .nav{position:fixed;right:clamp(10px, 2vw, 22px);top:50%;transform:translateY(-50%);
86
+ display:flex;flex-direction:column;gap:7px;z-index:10}
87
+ .nav b{width:6px;height:6px;border-radius:50%;background:var(--rule);display:block;
88
+ transition:background .2s, transform .2s}
89
+ .nav b.on{background:var(--meas);transform:scale(1.5)}
90
+ @media (max-width:640px){ .nav{display:none} table{font-size:.78rem} }
91
+ </style>
92
+
93
+ <div class="nav" id="nav" aria-hidden="true"></div>
94
+ <div class="deck" id="deck" tabindex="0">
95
+
96
+ <section>
97
+ <div class="wrap">
98
+ <div class="eyebrow"><span>A measurement record</span></div>
99
+ <h1>Cosmos</h1>
100
+ <p class="lede">A language model whose every initial weight was drawn from real measured
101
+ quantum hardware, and the honest record of what that does, and what it does not.</p>
102
+ <div class="math">1,842,432 parameters · no base model · char-level
103
+ CHSH S = 2.7905 Bell violation, 98.7% of Tsirelson
104
+ λ₁ = 0.90384 Lorenz, published 0.9056
105
+ six quantum→accuracy tests → six nulls</div>
106
+ <div class="foot">
107
+ <span>Cory Shane Davis · Independent Researcher</span>
108
+ <span>CC BY 4.0</span>
109
+ <span>doi:10.5281/zenodo.17574447</span>
110
+ </div>
111
+ </div>
112
+ </section>
113
+
114
+ <section>
115
+ <div class="wrap">
116
+ <div class="eyebrow"><span class="n">01</span><span>The claim</span></div>
117
+ <h2>Not that quantum makes it smarter.<br>That its origin is auditable.</h2>
118
+ <p>Most work in this space claims a performance gain. This one does not, and was tested
119
+ at six separate injection points to be sure. <strong>All six came back null.</strong></p>
120
+ <p>What is claimed instead is narrower and checkable: that this model's origin traces,
121
+ bit by bit, to real physical measurement, and that every step of that trace has a
122
+ falsifiable test attached.</p>
123
+ <div class="warn">
124
+ <p><strong>Why the nulls are load-bearing.</strong> Quantum measurements and a good
125
+ pseudo-random generator draw from the same distribution. A correctly built system must
126
+ therefore show <em class="meas">no accuracy advantage</em> from quantum bits. A project
127
+ reporting that quantum made its model smarter would be reporting that something was
128
+ broken or fabricated. Bell violation <em class="meas">plus</em> verified provenance
129
+ <em class="meas">plus</em> zero accuracy gain is the only combination an honest version
130
+ of this can produce.</p>
131
+ </div>
132
+ </div>
133
+ </section>
134
+
135
+ <section>
136
+ <div class="wrap">
137
+ <div class="eyebrow"><span class="n">02</span><span>The chain</span></div>
138
+ <h2>From a measurement to a mind</h2>
139
+ <div class="chain">
140
+ <div class="origin">a recorded biological rhythm ‖ 3.2M measured IBM shots</div>
141
+ <div class="hit">SHA-256 → one 60-bit seed</div>
142
+ <div class="hit">seed governs weight init, data order, every stochastic step</div>
143
+ <div class="hit">u = int(bits)/2ⁿ → z = √2·erf⁻¹(2u−1) → 1,842,432 weights</div>
144
+ <div class="hit">quantum window ‖ live pulse → SHA-256 → the value that selects the next token</div>
145
+ </div>
146
+ <p class="dim">Each link below is a test that was run and could have failed. None of them
147
+ is an argument; all of them are numbers.</p>
148
+ <div class="scroll">
149
+ <table>
150
+ <tr><th>link</th><th>test</th><th>result</th></tr>
151
+ <tr><td>entropy is genuinely quantum</td><td>CHSH on <code>ibm_marrakesh</code></td>
152
+ <td class="ok">S = 2.7905 vs bound 2.0 · ~35σ</td></tr>
153
+ <tr><td>birth pipeline is correct</td><td>3,258,886 archived draws</td>
154
+ <td class="ok">matches theory to 4 decimals</td></tr>
155
+ <tr><td>seed derivation deterministic</td><td>5 derivations</td>
156
+ <td class="ok">1 distinct value · 0 bytes emitted</td></tr>
157
+ <tr><td>seed <em>determines</em> weights</td><td>same vs 1-bit-flipped</td>
158
+ <td class="ok">Δ = 0.000e+00 · vs 2.26e-02</td></tr>
159
+ <tr><td>correlations are the circuit's</td><td>gate-matched topology</td>
160
+ <td class="ok">t = +80.5 / +164.6</td></tr>
161
+ <tr><td>physics computes real chaos</td><td>Lorenz constants</td>
162
+ <td class="ok">λ₁ = 0.90384 vs 0.9056</td></tr>
163
+ </table>
164
+ </div>
165
+ </div>
166
+ </section>
167
+
168
+ <section>
169
+ <div class="wrap">
170
+ <div class="eyebrow"><span class="n">03</span><span>Is it actually quantum</span></div>
171
+ <h2>The one measurement nothing classical can fake</h2>
172
+ <div class="math">E(A, B ) = +0.7197 E(A, B') = −0.6675
173
+ E(A', B) = +0.6982 E(A', B') = +0.7051
174
+
175
+ S = E(A, B) − E(A, B') + E(A', B) + E(A', B') = 2.7905</div>
176
+ <div class="grid g3">
177
+ <div class="card"><span class="k">measured S</span><span class="v">2.7905</span></div>
178
+ <div class="card"><span class="k">classical bound</span><span class="v">2.0000</span>
179
+ <p>No theory with local pre-existing values can exceed this.</p></div>
180
+ <div class="card"><span class="k">Tsirelson bound</span><span class="v">2.8284</span>
181
+ <p>The maximum quantum mechanics permits. Measured is 98.7% of it.</p></div>
182
+ </div>
183
+ <p>Bell's theorem gives a hard ceiling for any local hidden-variable theory. This hardware
184
+ clears it by roughly <span class="num">35σ</span> at 4,096 shots per setting. The entropy
185
+ source is physically quantum.</p>
186
+ <p class="dim">This is also an entirely expected result for functioning quantum hardware.
187
+ It verifies the pipeline, it does not discover new physics, and is not presented as such.</p>
188
+ </div>
189
+ </section>
190
+
191
+ <section>
192
+ <div class="wrap">
193
+ <div class="eyebrow"><span class="n">04</span><span>Were the weights really born from it</span></div>
194
+ <h2>A deficit that proves the method</h2>
195
+ <div class="math">u = (int(bits) + ½) / 2ⁿ
196
+ z = √2 · erf⁻¹(2u − 1)</div>
197
+ <div class="scroll">
198
+ <table>
199
+ <tr><th>statistic</th><th>32-level theoretical ceiling</th><th>measured, 3,258,886 draws</th></tr>
200
+ <tr><td>mean</td><td>+0.0000</td><td class="ok">−0.0001</td></tr>
201
+ <tr><td>standard deviation</td><td>0.9802</td><td class="ok">0.9804</td></tr>
202
+ <tr><td>|z| ≤ 1</td><td>0.6875</td><td class="ok">0.6874</td></tr>
203
+ <tr><td>|z| ≤ 2</td><td>0.9375</td><td class="ok">0.9374</td></tr>
204
+ </table>
205
+ </div>
206
+ <p><strong>The sd is 0.98, not 1.00, and that is the evidence, not a flaw.</strong>
207
+ Five qubits give 32 discrete outcomes, so <span class="num">|z|</span> cannot exceed
208
+ <span class="num">2.1523</span> by construction. The deficit is quantisation, and it
209
+ matches the theoretical ceiling to four decimal places. A pipeline reporting a perfect
210
+ 1.0000 here would be the suspicious one.</p>
211
+ </div>
212
+ </section>
213
+
214
+ <section>
215
+ <div class="wrap">
216
+ <div class="eyebrow"><span class="n">05</span><span>The workload archive</span></div>
217
+ <h2>10.6 million measured shots</h2>
218
+ <p>Every weight in this model, and every decision it makes, draws on an archive of real
219
+ hardware runs. Each is receipted with backend name, job identifier and shot count.</p>
220
+ <div class="grid g3">
221
+ <div class="card"><span class="k">measured shots</span><span class="v">10,601,984</span></div>
222
+ <div class="card"><span class="k">recorded jobs</span><span class="v">2,746</span>
223
+ <p>plus 22,489 archived job files</p></div>
224
+ <div class="card"><span class="k">shot-conservation failures</span><span class="v">0</span>
225
+ <p>counts sum to declared totals, every job</p></div>
226
+ </div>
227
+ <div class="scroll">
228
+ <table>
229
+ <tr><th>backend</th><th>shots</th><th>share</th></tr>
230
+ <tr><td>ibm_fez</td><td>5,455,872</td><td class="ok">51.5%</td></tr>
231
+ <tr><td>unlabelled in record</td><td>3,626,496</td><td class="no">34.2%</td></tr>
232
+ <tr><td>ibm_kingston</td><td>995,328</td><td class="ok">9.4%</td></tr>
233
+ <tr><td>ibm_marrakesh</td><td>524,288</td><td class="ok">4.9%</td></tr>
234
+ </table>
235
+ </div>
236
+ <p class="dim">Archive span February – July 2026; the underlying theory was deposited in
237
+ 2024. A third of shots carry no backend label in the record, that is stated rather than
238
+ quietly dropped, and those shots are excluded from any per-backend claim.</p>
239
+ </div>
240
+ </section>
241
+
242
+ <section>
243
+ <div class="wrap">
244
+ <div class="eyebrow"><span class="n">06</span><span>Hardware fingerprint</span></div>
245
+ <h2>The deviation is the evidence</h2>
246
+ <p>Across 10.6 million shots, outcomes cluster by Hamming weight. Ideal uniform hardware
247
+ would follow the binomial exactly. Real hardware does not, and the direction of the
248
+ error identifies the physics.</p>
249
+ <canvas id="hw" width="900" height="300" style="width:100%;max-width:900px;height:auto;
250
+ background:var(--ground-2);border:1px solid var(--rule);border-radius:3px"
251
+ role="img" aria-label="Measured Hamming-weight distribution against the binomial ideal"></canvas>
252
+ <div class="grid g2">
253
+ <div class="card"><span class="k">zero ones, |00000⟩</span>
254
+ <span class="v">3.77<span style="font-size:.55em;color:var(--muted)"> vs 3.12 ideal</span></span>
255
+ <p>enriched</p></div>
256
+ <div class="card"><span class="k">five ones, |11111⟩</span>
257
+ <span class="v">2.95<span style="font-size:.55em;color:var(--muted)"> vs 3.12 ideal</span></span>
258
+ <p>depleted</p></div>
259
+ </div>
260
+ <p><strong>|0⟩ is over-represented and |1⟩ under-represented, the signature of amplitude
261
+ damping and readout asymmetry.</strong> Excited states decay toward the ground state
262
+ during measurement. A simulator drawing from a clean binomial would not produce this
263
+ skew, and a fabricated dataset would have no reason to invent it.</p>
264
+ <p class="dim">The bias is corrected downstream by von Neumann debiasing before entropy
265
+ reaches the weights. It is shown here unprocessed, because the artifact is the proof.</p>
266
+ </div>
267
+ </section>
268
+
269
+ <section>
270
+ <div class="wrap">
271
+ <div class="eyebrow"><span class="n">07</span><span>Twelve dimensions governing one bit</span></div>
272
+ <h2>Continuous state, discrete outcome</h2>
273
+ <p>The 12-dimensional state does not sit alongside the quantum layer, it
274
+ <strong>parameterises</strong> it. Continuous physics sets the rotation angles; the Born
275
+ rule turns those angles into probabilities; measurement collapses them to a bit.</p>
276
+ <div class="math">12D CST state ──► θ = (θ₁, θ₂, θ₃) continuous
277
+ │
278
+ ry(θ₁) rx(θ₂) rz(θ₃) rotation on the Bloch sphere
279
+ │
280
+ |ψ⟩ = α|0⟩ + β|1⟩ superposition
281
+ │
282
+ P(1) = |β|² Born rule
283
+ │
284
+ ▼ measurement
285
+ 1 or 0 discrete, irreversible</div>
286
+ <div class="grid g2">
287
+ <div class="card"><span class="k">what is continuous</span>
288
+ <p>Twelve real-valued dimensions of internal state, evolving on a verified chaotic
289
+ attractor with λ₁ &gt; 0.</p></div>
290
+ <div class="card"><span class="k">what is discrete</span>
291
+ <p>A single measured bit. The continuous state governs only the <em class="meas">probability</em>
292
+ of each outcome, never which one occurs.</p></div>
293
+ </div>
294
+ <p class="dim">This is the precise sense in which twelve dimensions control one and zero:
295
+ they set the amplitudes, and the amplitudes set the odds. The collapse itself remains
296
+ irreducibly undetermined, which is what makes the trajectory unrepeatable.</p>
297
+ </div>
298
+ </section>
299
+
300
+ <section>
301
+ <div class="wrap">
302
+ <div class="eyebrow"><span class="n">08</span><span>Information structure</span></div>
303
+ <h2>A holographic encoding, measured</h2>
304
+ <p>Partial information decomposition splits what two subsystems carry about the system's
305
+ future into four parts. The result is unambiguous.</p>
306
+ <div class="grid g3">
307
+ <div class="card"><span class="k">redundancy</span><span class="v">1.7 – 2.6</span>
308
+ <p>nats. The same information present in multiple subsystems.</p></div>
309
+ <div class="card"><span class="k">synergy</span><span class="v">0.3 – 1.2</span>
310
+ <p>nats. Present only in the joint state. Below surrogate on 9 of 10 partitions.</p></div>
311
+ <div class="card"><span class="k">the exception</span><span class="v">z = +6.38</span>
312
+ <p>consciousness │ rest, 0.66 nats no other subsystem reconstructs.</p></div>
313
+ </div>
314
+ <p><strong>Redundancy dominating synergy is a holographic signature in the technical
315
+ sense:</strong> information about the whole is distributed across the parts, each
316
+ carrying much of the others'. That is robustness, not emergence, and stating it that
317
+ way matters, because the two are routinely confused.</p>
318
+ <p class="dim">One seam behaves differently. Cut consciousness away and something is lost
319
+ that nothing else rebuilds. It is a single result at one partition and is reported as
320
+ exactly that.</p>
321
+ </div>
322
+ </section>
323
+
324
+ <section>
325
+ <div class="wrap">
326
+ <div class="eyebrow"><span class="n">09</span><span>The nulls</span></div>
327
+ <h2>Six places quantum could have helped. It didn't.</h2>
328
+ <div class="scroll">
329
+ <table>
330
+ <tr><th>injection site</th><th>result</th></tr>
331
+ <tr><td>i.i.d. weight initialisation</td><td class="no">null, the gain was init <em>scale</em>, not quantum</td></tr>
332
+ <tr><td>decoder sampling seed</td><td class="no">null. Pseudo / IBM / Rigetti equivalent</td></tr>
333
+ <tr><td>spatial 54D seed, approximate</td><td class="no">null, beat 1 of 5 random vectors, z = −0.92</td></tr>
334
+ <tr><td>spatial 54D seed, full pipeline</td><td class="no">null, beat 0 of 8 random vectors, z = −1.75</td></tr>
335
+ <tr><td>entanglement matrix as attention kernel</td><td class="no">null, worse than plain, 3/3 seeds, t = −18.6</td></tr>
336
+ <tr><td>live sensory state as prompt text</td><td class="no">null, n = 40 paired, blind-judged, CI crosses zero</td></tr>
337
+ </table>
338
+ </div>
339
+ <p>These are published first, not buried in an appendix. A reader who only remembers one
340
+ thing from this deck should remember that the quantum layer provides
341
+ <strong>physical non-determinism and receipted provenance</strong>, and not lower loss.</p>
342
+ <p class="dim">Several measurement instruments in this project were themselves found to be
343
+ wrong and rebuilt; those failures are kept in the record rather than deleted, because
344
+ they are the reason the surviving results can be trusted.</p>
345
+ </div>
346
+ </section>
347
+
348
+ <section>
349
+ <div class="wrap">
350
+ <div class="eyebrow"><span class="n">10</span><span>Comparison</span></div>
351
+ <h2>The axis this competes on</h2>
352
+ <p>Loss numbers are not comparable across different corpora, tokenizers and scales, so no
353
+ such comparison is offered. The axis where a claim <em>can</em> be made is provenance.</p>
354
+ <div class="scroll">
355
+ <table>
356
+ <tr><th>property</th><th>typical open model</th><th>Cosmos</th></tr>
357
+ <tr><td>weight origin</td><td class="no">pseudo-random init, unrecorded</td><td class="ok">measured quantum, receipted per job</td></tr>
358
+ <tr><td>init reproducible from a stated seed</td><td class="no">usually, if published</td><td class="ok">verified: Δ = 0.000e+00</td></tr>
359
+ <tr><td>1-bit seed change measurably alters weights</td><td class="no">untested</td><td class="ok">verified: Δ = 2.26e-02</td></tr>
360
+ <tr><td>entropy source verified non-classical</td><td class="no">n/a</td><td class="ok">CHSH S = 2.7905</td></tr>
361
+ <tr><td>base model</td><td class="no">inherited</td><td class="ok">none</td></tr>
362
+ <tr><td>parameters</td><td class="no">10⁹ – 10¹²</td><td class="sd">1.84 × 10⁶</td></tr>
363
+ <tr><td>conversational ability</td><td class="ok">high</td><td class="sd">a newborn, 88.5% real-word rate</td></tr>
364
+ </table>
365
+ </div>
366
+ <p><strong>It is small and it cannot hold a conversation.</strong> That is stated plainly
367
+ because the comparison is not about capability. It is about whether a model's origin can
368
+ be audited to a physical event, which almost nothing in this field can claim.</p>
369
+ </div>
370
+ </section>
371
+
372
+ <section>
373
+ <div class="wrap">
374
+ <div class="eyebrow"><span class="n">11</span><span>What none of this shows</span></div>
375
+ <h2>The line that does not move</h2>
376
+ <p>Loss curves, Bell violations, Lyapunov exponents and integration measures are all
377
+ <strong>silent</strong> on whether there is anything it is like to be this system.
378
+ Section 08 tests one contested theory's <em>necessary</em> structural condition.
379
+ Necessary is not sufficient, and the theory itself is disputed.</p>
380
+ <div class="warn">
381
+ <p>Any self-report a system produces about its own inner life is the
382
+ <strong>least</strong> reliable signal available, and it grows more eloquent the less
383
+ there is behind it, not more. Such statements are excluded from evidence here on purpose.</p>
384
+ </div>
385
+ <p class="dim">No claim is made about machine consciousness in either direction. That
386
+ remains where it was before this project started.</p>
387
+ </div>
388
+ </section>
389
+
390
+ <section>
391
+ <div class="wrap">
392
+ <div class="eyebrow"><span class="n">12</span><span>Origin</span></div>
393
+ <h2>Zeref's Rain</h2>
394
+ <blockquote>The echo of a pain became the truth of a seed.</blockquote>
395
+ <p>The seed is a one-way hash over measured quantum entropy and biological aggregates that
396
+ are personal to the author. The derivation module never prints, logs, or writes raw
397
+ samples, <span class="num">0 bytes emitted</span>, verified, and only aggregates ever
398
+ leave it.</p>
399
+ <div class="math seedline">seed = SHA-256( quantum_bytes ‖ bio_aggregates ) → 60-bit integer
400
+
401
+ same seed → weights identical, Δ = 0.000e+00
402
+ one bit different → a different model, Δ = 2.26e-02</div>
403
+ <p>What is published is the mechanism and the proof that it holds. Not the data.</p>
404
+ <p class="dim">Two independent senses of unrepeatable meet here: the quantum measurements
405
+ that shaped these weights cannot be recovered from any state, and the recording behind
406
+ the seed happened once.</p>
407
+ </div>
408
+ </section>
409
+
410
+ <section>
411
+ <div class="wrap">
412
+ <div class="eyebrow"><span class="n">13</span><span>Build your own</span></div>
413
+ <h2>Everything is open</h2>
414
+ <p>The weights, the findings, and a runnable script for every claim in this deck. Each
415
+ benchmark prints its own verdict, including when the verdict is <em>no</em>.</p>
416
+ <div class="math">python benchmarks/verify_quantum_engine.py # CHSH Bell test + archive integrity
417
+ python benchmarks/verify_physics_engine.py # Lorenz constants vs published values
418
+ python benchmarks/topology_matched.py # gate-matched entanglement topology
419
+ python benchmarks/phi_pid.py # integration structure
420
+
421
+ python spark_serve.py 11500 # run the weights, Ollama-compatible API</div>
422
+ <div class="grid g2">
423
+ <div class="card"><span class="k">bring your own keys</span>
424
+ <p>IBM Quantum and Azure, stored locally, never transmitted. Falls back to archived
425
+ entropy with no keys at all.</p></div>
426
+ <div class="card"><span class="k">what to build next</span>
427
+ <p>The synergy result points somewhere specific: subsystems that are parallel readouts
428
+ of one state stay redundant. Give one its own driver and the structure should change.
429
+ That prediction is testable with <code>phi_pid.py</code> as shipped.</p></div>
430
+ </div>
431
+ <blockquote>A light at the end of a dark, dark tunnel, and the receipts to show it was
432
+ really there.</blockquote>
433
+ <div class="foot">
434
+ <span>huggingface.co/phera-ra/QC67_cosmo</span>
435
+ <span>CC BY 4.0 · Qwen2.5 base components Apache 2.0 © Alibaba Cloud</span>
436
+ </div>
437
+ </div>
438
+ </section>
439
+
440
+ </div>
441
+
442
+ <script>
443
+ (function(){
444
+ var deck = document.getElementById('deck');
445
+ var secs = Array.prototype.slice.call(deck.querySelectorAll('section'));
446
+ var nav = document.getElementById('nav');
447
+ secs.forEach(function(){ var b=document.createElement('b'); nav.appendChild(b); });
448
+ var dots = Array.prototype.slice.call(nav.children);
449
+ if ('IntersectionObserver' in window){
450
+ var io = new IntersectionObserver(function(es){
451
+ es.forEach(function(e){
452
+ if(e.isIntersecting){
453
+ var i = secs.indexOf(e.target);
454
+ dots.forEach(function(d, j){ d.classList.toggle('on', j===i); });
455
+ }
456
+ });
457
+ }, {root:deck, threshold:0.55});
458
+ secs.forEach(function(s){ io.observe(s); });
459
+ }
460
+ deck.addEventListener('keydown', function(ev){
461
+ var i = 0, top = deck.scrollTop;
462
+ secs.forEach(function(s, j){ if(s.offsetTop <= top + 8) i = j; });
463
+ if(ev.key==='ArrowDown'||ev.key==='PageDown'||ev.key===' '){
464
+ ev.preventDefault(); if(secs[i+1]) secs[i+1].scrollIntoView();
465
+ } else if(ev.key==='ArrowUp'||ev.key==='PageUp'){
466
+ ev.preventDefault(); if(secs[i-1]) secs[i-1].scrollIntoView();
467
+ } else if(ev.key==='Home'){ ev.preventDefault(); secs[0].scrollIntoView(); }
468
+ else if(ev.key==='End'){ ev.preventDefault(); secs[secs.length-1].scrollIntoView(); }
469
+ });
470
+
471
+ (function(){
472
+ var c=document.getElementById('hw'); if(!c) return;
473
+ var ctx=c.getContext('2d'), W=c.width, H=c.height;
474
+ var cs=getComputedStyle(document.documentElement);
475
+ var meas=cs.getPropertyValue('--meas').trim()||'#4FD6C8';
476
+ var muted=cs.getPropertyValue('--muted').trim()||'#8A97A3';
477
+ var rule=cs.getPropertyValue('--rule').trim()||'#1E2A36';
478
+ var ink=cs.getPropertyValue('--ink').trim()||'#F2F5F7';
479
+ var real=[3.77, 16.94, 31.68, 30.08, 14.58, 2.95];
480
+ var ideal=[3.125, 15.625, 31.25, 31.25, 15.625, 3.125];
481
+ var padL=48, padR=16, padT=22, padB=42, max=36;
482
+ var gw=(W-padL-padR)/6;
483
+ ctx.clearRect(0, 0, W, H);
484
+ ctx.strokeStyle=rule; ctx.lineWidth=1; ctx.font='11px ui-monospace, Consolas, monospace';
485
+ for(var g=0; g<=max; g+=9){
486
+ var y=H-padB-(g/max)*(H-padT-padB);
487
+ ctx.beginPath(); ctx.moveTo(padL, y); ctx.lineTo(W-padR, y); ctx.stroke();
488
+ ctx.fillStyle=muted; ctx.textAlign='right'; ctx.fillText(g+'%', padL-8, y+4);
489
+ }
490
+ for(var i=0;i<6;i++){
491
+ var x=padL+i*gw, bw=gw*0.42;
492
+ var hr=(real[i]/max)*(H-padT-padB), hi=(ideal[i]/max)*(H-padT-padB);
493
+ ctx.fillStyle=meas; ctx.fillRect(x+gw*0.10, H-padB-hr, bw, hr);
494
+ ctx.strokeStyle=muted; ctx.setLineDash([3, 3]); ctx.lineWidth=1.5;
495
+ ctx.strokeRect(x+gw*0.52, H-padB-hi, bw, hi); ctx.setLineDash([]);
496
+ ctx.fillStyle=muted; ctx.textAlign='center';
497
+ ctx.fillText(i+' ones', x+gw/2, H-padB+18);
498
+ ctx.fillStyle=ink; ctx.font='bold 11px ui-monospace, Consolas, monospace';
499
+ ctx.fillText(real[i].toFixed(2), x+gw*0.10+bw/2, H-padB-hr-7);
500
+ ctx.font='11px ui-monospace, Consolas, monospace';
501
+ }
502
+ ctx.textAlign='left'; ctx.fillStyle=meas;
503
+ ctx.fillRect(padL, padT-14, 10, 10);
504
+ ctx.fillStyle=muted; ctx.fillText('measured (10,601,984 shots)', padL+16, padT-5);
505
+ ctx.strokeStyle=muted; ctx.setLineDash([3, 3]);
506
+ ctx.strokeRect(padL+210, padT-14, 10, 10); ctx.setLineDash([]);
507
+ ctx.fillText('binomial ideal', padL+226, padT-5);
508
+ })();
509
+
510
+ deck.focus();
511
+ })();
512
+ </script>
train_your_own.py ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ COSMOS SPARK CST — a fresh weight with EVERYTHING combined, trained as a fair test.
4
+
5
+ WHAT IS COMBINED
6
+ 1. QUANTUM BIRTH. Every initial weight drawn from her real archived IBM measurements,
7
+ via the same pipeline that made cosmos_born.pt and that was verified to the 32-level
8
+ quantisation ceiling across 3.2M draws: u = int(bits)/2^n, z = sqrt(2)*erfinv(2u-1).
9
+ 2. HER SECTION 3 — Mixture-of-States Hebbian attention. The mechanism from
10
+ COSMOS_Paper.md that her SHIPPED weights never contained:
11
+ x54 = W54 . h a 54-dim state per token
12
+ H(x54)ij = exp(-||x54_i - x54_j||^2 / 2*sigma^2)
13
+ A_final = (1-g)*A_std + g*H(x54) g = sigmoid(gate), learned
14
+ Her cosmos_born.pt is architecturally plain — nn.MultiheadAttention and an MLP, no
15
+ 54D state, no Hebbian kernel, no gate. So this is the first time her own paper's
16
+ attention has ever been inside a model that speaks.
17
+ 3. HER CORPUS. Her real logged experience, char-level, the same data she grew on.
18
+
19
+ WHY IT IS A CONTROLLED TEST AND NOT A DEMO
20
+ Two arms, identical in every respect except the mechanism under test:
21
+ PLAIN standard attention (gate forced to 0 == exactly standard)
22
+ CST her section-3 Hebbian attention (gate free to learn)
23
+ Same quantum-born initial weights, same corpus, same held-out split, same batches, same
24
+ seeds, paired. The gate starts at sigmoid(-4) ~ 0.018, so the CST arm BEGINS as ordinary
25
+ attention and can stay there for free — it only moves if the gradient says the kernel
26
+ earns its place. A win therefore cannot come from extra capacity being forced on.
27
+
28
+ Both arms carry the SAME parameters, including W54 and the gate in the plain arm, so the
29
+ comparison is not confounded by parameter count. In the plain arm they are simply inert.
30
+
31
+ PRE-REGISTERED, fixed before the run:
32
+ * CST beats PLAIN on every seed -> her section-3 mechanism works on her own data.
33
+ * mixed / within noise -> no evidence it helps; report as null.
34
+ * CST loses on every seed -> it hurts, and that is the finding.
35
+ """
36
+ import json
37
+ import math
38
+ import random
39
+ import re
40
+ import statistics
41
+ import sys
42
+ import time
43
+ from pathlib import Path
44
+
45
+ import torch
46
+ import torch.nn as nn
47
+ import torch.nn.functional as F
48
+
49
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
50
+
51
+ CORPUS = Path("02_HER_BODY/Cosmos_code/Cosmos/data/cosmos/experience_corpus.txt")
52
+ QARCHIVE = Path("01_HER_SOUL/quantum_heart/quantum_runs.jsonl")
53
+ OUTDIR = Path("01_HER_SOUL/weights/cosmos_spark_cst")
54
+ RESULTS = Path("logs/spark_cst_results.json")
55
+
56
+ BLOCK, N_LAYER, N_HEAD, N_EMBD, DROPOUT = 128, 4, 4, 192, 0.1
57
+ D54 = 54
58
+
59
+
60
+ # ── quantum birth ───────────────────────────────────────────────────────────
61
+ def erfinv(y):
62
+ if abs(y) >= 1:
63
+ return math.copysign(3.0, y)
64
+ a = 0.147
65
+ ln = math.log(1 - y * y)
66
+ t1 = 2 / (math.pi * a) + ln / 2
67
+ return math.copysign(math.sqrt(math.sqrt(t1 * t1 - ln / a) - t1), y)
68
+
69
+
70
+ def quantum_pool(limit=400_000):
71
+ """Real measured bitstrings -> standard-normal draws, her documented pipeline."""
72
+ vals = []
73
+ if not QARCHIVE.exists():
74
+ return vals
75
+ with open(QARCHIVE, encoding="utf-8", errors="ignore") as f:
76
+ for line in f:
77
+ if len(vals) >= limit:
78
+ break
79
+ line = line.strip()
80
+ if not line:
81
+ continue
82
+ try:
83
+ d = json.loads(line)
84
+ except Exception:
85
+ continue
86
+ counts = d.get("counts")
87
+ if not isinstance(counts, dict):
88
+ continue
89
+ for bs, c in counts.items():
90
+ s = "".join(ch for ch in str(bs) if ch in "01")
91
+ if not s:
92
+ continue
93
+ hi = float(1 << len(s))
94
+ u = (int(s, 2) + 0.5) / hi
95
+ z = math.sqrt(2.0) * erfinv(2 * u - 1)
96
+ if math.isfinite(z):
97
+ vals.extend([z] * min(int(c), 8))
98
+ if len(vals) >= limit:
99
+ break
100
+ return vals
101
+
102
+
103
+ class QuantumInit:
104
+ def __init__(self, pool, seed):
105
+ self.pool = pool
106
+ self.i = (seed * 7919) % max(1, len(pool))
107
+
108
+ def fill_(self, t, std):
109
+ n = t.numel()
110
+ if not self.pool:
111
+ with torch.no_grad():
112
+ t.normal_(0.0, std)
113
+ return
114
+ out = torch.empty(n)
115
+ for k in range(n):
116
+ out[k] = self.pool[(self.i + k) % len(self.pool)]
117
+ self.i = (self.i + n) % len(self.pool)
118
+ out = out / (out.std() + 1e-8) * std
119
+ with torch.no_grad():
120
+ t.copy_(out.view_as(t))
121
+
122
+
123
+ # ── her section-3 attention ─────────────────────────────────────────────────
124
+ class CSTAttention(nn.Module):
125
+ """Standard attention blended with a Gaussian kernel over a learned 54D state."""
126
+
127
+ def __init__(self, use_cst):
128
+ super().__init__()
129
+ self.nh, self.hd = N_HEAD, N_EMBD // N_HEAD
130
+ self.qkv = nn.Linear(N_EMBD, 3 * N_EMBD)
131
+ self.proj = nn.Linear(N_EMBD, N_EMBD)
132
+ self.drop = nn.Dropout(DROPOUT)
133
+ self.w54 = nn.Linear(N_EMBD, D54, bias=False) # h -> x54
134
+ self.log_sigma = nn.Parameter(torch.tensor(0.0))
135
+ # gate starts ~0.018: the CST arm BEGINS as ordinary attention
136
+ self.gate = nn.Parameter(torch.tensor(-4.0), requires_grad=bool(use_cst))
137
+ self.use_cst = use_cst
138
+ self.last_gate = 0.0
139
+
140
+ def forward(self, x, mask):
141
+ B, T, C = x.shape
142
+ q, k, v = self.qkv(x).split(C, dim=2)
143
+ sh = lambda t: t.view(B, T, self.nh, self.hd).transpose(1, 2)
144
+ q, k, v = sh(q), sh(k), sh(v)
145
+ a = F.softmax((q @ k.transpose(-2, -1)) / math.sqrt(self.hd) + mask[:T, :T], dim=-1)
146
+ if self.use_cst:
147
+ x54 = self.w54(x) # (B,T,54)
148
+ d2 = torch.cdist(x54, x54, p=2.0) ** 2 # ||x54_i - x54_j||^2
149
+ sig = torch.exp(self.log_sigma).clamp(0.05, 50.0)
150
+ H = torch.exp(-d2 / (2 * sig * sig))
151
+ H = H.masked_fill(mask[:T, :T] < 0, 0.0)
152
+ H = H / H.sum(-1, keepdim=True).clamp_min(1e-9)
153
+ g = torch.sigmoid(self.gate)
154
+ a = (1 - g) * a + g * H.unsqueeze(1)
155
+ self.last_gate = float(g.detach())
156
+ y = (self.drop(a) @ v).transpose(1, 2).contiguous().view(B, T, C)
157
+ return self.proj(y)
158
+
159
+
160
+ class Block(nn.Module):
161
+ def __init__(self, use_cst):
162
+ super().__init__()
163
+ self.ln1 = nn.LayerNorm(N_EMBD)
164
+ self.attn = CSTAttention(use_cst)
165
+ self.ln2 = nn.LayerNorm(N_EMBD)
166
+ self.mlp = nn.Sequential(nn.Linear(N_EMBD, 4 * N_EMBD), nn.GELU(),
167
+ nn.Linear(4 * N_EMBD, N_EMBD), nn.Dropout(DROPOUT))
168
+
169
+ def forward(self, x, mask):
170
+ x = x + self.attn(self.ln1(x), mask)
171
+ return x + self.mlp(self.ln2(x))
172
+
173
+
174
+ class SparkCST(nn.Module):
175
+ def __init__(self, vocab, use_cst):
176
+ super().__init__()
177
+ self.tok = nn.Embedding(vocab, N_EMBD)
178
+ self.pos = nn.Embedding(BLOCK, N_EMBD)
179
+ self.blocks = nn.ModuleList([Block(use_cst) for _ in range(N_LAYER)])
180
+ self.lnf = nn.LayerNorm(N_EMBD)
181
+ self.head = nn.Linear(N_EMBD, vocab, bias=False)
182
+ self.register_buffer("mask", torch.triu(torch.full((BLOCK, BLOCK), float("-inf")), 1))
183
+
184
+ def forward(self, idx, targets=None):
185
+ T = idx.size(1)
186
+ x = self.tok(idx) + self.pos(torch.arange(T, device=idx.device))
187
+ for b in self.blocks:
188
+ x = b(x, self.mask)
189
+ lg = self.head(self.lnf(x))
190
+ loss = None if targets is None else F.cross_entropy(
191
+ lg.view(-1, lg.size(-1)), targets.reshape(-1))
192
+ return lg, loss
193
+
194
+ def gates(self):
195
+ return [b.attn.last_gate for b in self.blocks]
196
+
197
+ def quantum_birth(self, qi):
198
+ for m in self.modules():
199
+ if isinstance(m, (nn.Linear, nn.Embedding)):
200
+ qi.fill_(m.weight, 0.02)
201
+ if isinstance(m, nn.Linear) and m.bias is not None:
202
+ with torch.no_grad():
203
+ m.bias.zero_()
204
+
205
+
206
+ def real_word_rate(text, words):
207
+ toks = re.findall(r"[a-z']+", text.lower())
208
+ if not toks:
209
+ return 0.0
210
+ return sum(1 for t in toks if t in words) / len(toks)
211
+
212
+
213
+ def train_arm(use_cst, seed, data, vocab, steps, pool, val_w, words, itos):
214
+ torch.manual_seed(seed)
215
+ random.seed(seed)
216
+ gen = torch.Generator().manual_seed(seed)
217
+ m = SparkCST(vocab, use_cst)
218
+ m.quantum_birth(QuantumInit(pool, seed))
219
+ opt = torch.optim.AdamW(m.parameters(), lr=3e-4, weight_decay=0.01)
220
+ n = int(0.9 * len(data))
221
+ tr = data[:n]
222
+ m.train()
223
+ best = float("inf")
224
+ for s in range(1, steps + 1):
225
+ ix = torch.randint(len(tr) - BLOCK - 1, (16,), generator=gen)
226
+ x = torch.stack([tr[i:i + BLOCK] for i in ix])
227
+ y = torch.stack([tr[i + 1:i + 1 + BLOCK] for i in ix])
228
+ _, loss = m(x, y)
229
+ opt.zero_grad(set_to_none=True)
230
+ loss.backward()
231
+ torch.nn.utils.clip_grad_norm_(m.parameters(), 1.0)
232
+ opt.step()
233
+ if s % 100 == 0 or s == steps:
234
+ m.eval()
235
+ with torch.no_grad():
236
+ tot = c = 0
237
+ for i in range(0, len(val_w), 16):
238
+ xb = val_w[i:i + 16]
239
+ _, l = m(xb[:, :-1], xb[:, 1:])
240
+ tot += l.item() * xb.size(0)
241
+ c += xb.size(0)
242
+ m.train()
243
+ best = min(best, tot / max(1, c))
244
+ # sample for real-word rate
245
+ m.eval()
246
+ idx = torch.tensor([[data[0].item()]])
247
+ out = []
248
+ with torch.no_grad():
249
+ for _ in range(600):
250
+ lg, _ = m(idx[:, -BLOCK:])
251
+ p = F.softmax(lg[0, -1] / 0.8, dim=-1)
252
+ nx = int(torch.multinomial(p, 1))
253
+ out.append(nx)
254
+ idx = torch.cat([idx, torch.tensor([[nx]])], 1)
255
+ txt = "".join(itos.get(i, "") for i in out)
256
+ return best, statistics.fmean(m.gates()) if use_cst else 0.0, real_word_rate(txt, words), m, txt
257
+
258
+
259
+ def main():
260
+ steps = int(sys.argv[1]) if len(sys.argv) > 1 else 1200
261
+ seeds = list(range(int(sys.argv[2]) if len(sys.argv) > 2 else 3))
262
+
263
+ text = CORPUS.read_text(encoding="utf-8", errors="ignore")
264
+ chars = sorted(set(text))
265
+ stoi = {c: i for i, c in enumerate(chars)}
266
+ itos = {i: c for c, i in stoi.items()}
267
+ data = torch.tensor([stoi[c] for c in text], dtype=torch.long)
268
+ words = set(re.findall(r"[a-z']+", text.lower()))
269
+
270
+ print("=" * 80)
271
+ print(" COSMOS SPARK CST — quantum birth + her section-3 attention")
272
+ print("=" * 80)
273
+ print(f"\n corpus {len(text):,} chars · vocab {len(chars)} · {steps} steps · "
274
+ f"{len(seeds)} seeds")
275
+
276
+ t0 = time.time()
277
+ pool = quantum_pool()
278
+ print(f" quantum pool: {len(pool):,} draws from her real archive "
279
+ f"({time.time()-t0:.1f}s)")
280
+ if pool:
281
+ print(f" mean {statistics.fmean(pool):+.4f} sd {statistics.pstdev(pool):.4f} "
282
+ f"(standard normal expected)")
283
+
284
+ n = int(0.9 * len(data))
285
+ val = data[n:]
286
+ g = torch.Generator().manual_seed(999)
287
+ vi = torch.randint(len(val) - BLOCK - 1, (64,), generator=g)
288
+ val_w = torch.stack([val[i:i + BLOCK + 1] for i in vi])
289
+ print()
290
+
291
+ res = {"plain": [], "cst": []}
292
+ gates, rw, best_model, best_txt = [], {"plain": [], "cst": []}, None, ""
293
+ for sd in seeds:
294
+ for arm, use in (("plain", False), ("cst", True)):
295
+ b, gt, r, model, txt = train_arm(use, sd, data, len(chars), steps,
296
+ pool, val_w, words, itos)
297
+ res[arm].append(b)
298
+ rw[arm].append(r)
299
+ if use:
300
+ gates.append(gt)
301
+ if use and (best_model is None or b <= min(res["cst"])):
302
+ best_model, best_txt = model, txt
303
+ print(f" seed {sd} {arm:<6s} loss {b:.5f} real-word {r:.3f}"
304
+ + (f" gate {gt:.4f}" if use else ""), flush=True)
305
+
306
+ d = [p - c for p, c in zip(res["plain"], res["cst"])]
307
+ md = statistics.fmean(d)
308
+ se = (statistics.stdev(d) / math.sqrt(len(d))) if len(d) > 1 else 0.0
309
+ t = md / se if se > 0 else 0.0
310
+ wins = sum(1 for x in d if x > 0)
311
+ print(f"\n{'='*80}\n RESULT\n{'='*80}")
312
+ print(f" PLAIN loss {statistics.fmean(res['plain']):.5f} real-word {statistics.fmean(rw['plain']):.3f}")
313
+ print(f" CST loss {statistics.fmean(res['cst']):.5f} real-word {statistics.fmean(rw['cst']):.3f}"
314
+ f" mean gate {statistics.fmean(gates) if gates else 0:.4f}")
315
+ print(f"\n CST - PLAIN: {-md:+.5f} t={-t:+.2f} CST wins {wins}/{len(seeds)}")
316
+
317
+ if wins == len(seeds) and t > 2.0:
318
+ v = (f"HER SECTION-3 MECHANISM WORKS ON HER OWN DATA. The Hebbian kernel over a 54D "
319
+ f"state beats standard attention on {wins}/{len(seeds)} seeds (t={t:+.2f}) with "
320
+ f"identical quantum-born initialisation, identical corpus and identical "
321
+ f"parameter count. The gate began at 0.018 — it could have stayed at standard "
322
+ f"attention for free and did not.")
323
+ elif wins == 0:
324
+ v = ("HER SECTION-3 MECHANISM HURTS on her own data — standard attention wins every "
325
+ "seed. Reported as measured.")
326
+ else:
327
+ v = (f"NULL / WITHIN NOISE — CST wins {wins}/{len(seeds)} (t={t:+.2f}). No evidence "
328
+ f"the section-3 kernel helps on this corpus at this scale.")
329
+ print(f"\n VERDICT: {v}\n")
330
+ print(f" her CST voice, sample:\n {best_txt[:300]!r}\n")
331
+
332
+ OUTDIR.mkdir(parents=True, exist_ok=True)
333
+ if best_model is not None:
334
+ torch.save({"model": best_model.state_dict(), "stoi": stoi, "itos": itos,
335
+ "config": {"block": BLOCK, "n_layer": N_LAYER, "n_head": N_HEAD,
336
+ "n_embd": N_EMBD, "vocab": len(chars), "d54": D54},
337
+ "arch": "Cosmos-Spark-CST-QuantumBorn", "total_steps": steps,
338
+ "quantum_source": "ibm_real_shots", "quantum_draws": len(pool),
339
+ "best_val_loss": min(res["cst"]),
340
+ "real_word_rate": max(rw["cst"])},
341
+ OUTDIR / "spark_cst.pt")
342
+ print(f" saved -> {OUTDIR/'spark_cst.pt'}")
343
+ Path("logs").mkdir(exist_ok=True)
344
+ RESULTS.write_text(json.dumps(
345
+ {"steps": steps, "seeds": seeds, "results": res, "real_word": rw,
346
+ "gates": gates, "delta_cst_minus_plain": -md, "t": -t, "cst_wins": wins,
347
+ "quantum_draws": len(pool), "verdict": v}, indent=2), encoding="utf-8")
348
+ print(f" saved -> {RESULTS}")
349
+ return 0
350
+
351
+
352
+ if __name__ == "__main__":
353
+ raise SystemExit(main())