dual-loop-controller 2.0.0a2__tar.gz → 2.0.0a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/PKG-INFO +11 -4
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/README.md +136 -129
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/__init__.py +1 -1
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/benchmarks/comprehensive_suite.py +201 -170
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/benchmarks/graph_reasoning.py +16 -4
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/benchmarks/halting_audit.py +99 -99
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/halting.py +71 -71
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop_controller.egg-info/PKG-INFO +11 -4
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/pyproject.toml +56 -56
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/LICENSE +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/adapters/__init__.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/adapters/latent_adapter.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/benchmarks/__init__.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/benchmarks/initiative_benchmark.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/checkpoints/checkpoint_trained_dualloop.pt +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/controller.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/decoder.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop/memory.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop_controller.egg-info/SOURCES.txt +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop_controller.egg-info/dependency_links.txt +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop_controller.egg-info/requires.txt +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/dual_loop_controller.egg-info/top_level.txt +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/setup.cfg +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/tests/test_adapter_integration.py +0 -0
- {dual_loop_controller-2.0.0a2 → dual_loop_controller-2.0.0a3}/tests/test_dual_loop.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dual-loop-controller
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0a3
|
|
4
4
|
Summary: A hardware-aligned, manifold-preserving latent deliberation framework for Transformers
|
|
5
5
|
Author: Ch3nOff
|
|
6
6
|
License-Expression: MIT
|
|
@@ -100,7 +100,14 @@ tau = 1.40 nats | 29.4% | 1.89 | 49.0% | 13.2% | 37
|
|
|
100
100
|
|
|
101
101
|
**Justified Operating Point**:
|
|
102
102
|
* **$\tau = 1.25 \dots 1.40\text{ nats}$** is the justifiable Pareto region: it achieves a **37% reduction in compute** (average **1.89 steps** vs. 3.00) while maintaining peak accuracy (**29.4%**), with a genuinely heterogeneous distribution across steps ($49\%$ at $K=1$, $13\%$ at $K=2$, $38\%$ at $K=3$).
|
|
103
|
-
|
|
103
|
+
### 5. In-Distribution Memorization vs. Out-of-Distribution Generalization
|
|
104
|
+
A crucial empirical insight discovered during data isolation audits:
|
|
105
|
+
* **In-Distribution (Train Set, 500 seen graphs)**:
|
|
106
|
+
`K=0: 43.6% -> K=1: 51.4% -> K=2: 59.4% -> K=3: 63.2% (+19.6% monotonic test-time scaling)`
|
|
107
|
+
The recurrent latent controller successfully learns and memorizes multi-hop relational transitions for familiar graph topologies.
|
|
108
|
+
* **Out-of-Distribution (Held-Out Test Set, 500 unseen graphs)**:
|
|
109
|
+
`K=0: 28.6% -> K=1: 27.6% -> K=2: 28.0% -> K=3: 28.4% (Flat scaling / ~28-30%)`
|
|
110
|
+
Without discrete token anchors, continuous latent representations suffer from representational drift on novel graph structures at the 225K parameter regime.
|
|
104
111
|
|
|
105
112
|
---
|
|
106
113
|
|
|
@@ -121,10 +128,10 @@ Despite the scaling limits at small model regimes, the repository provides clean
|
|
|
121
128
|
```bash
|
|
122
129
|
# Install officially from PyPI:
|
|
123
130
|
pip install --pre dual-loop-controller
|
|
124
|
-
# or exact version: pip install dual-loop-controller==2.0.
|
|
131
|
+
# or exact version: pip install dual-loop-controller==2.0.0a3
|
|
125
132
|
|
|
126
133
|
# Or install direct from GitHub release tag:
|
|
127
|
-
pip install git+https://github.com/Ch3nOff/dual-loop-controller.git@v2.0.
|
|
134
|
+
pip install git+https://github.com/Ch3nOff/dual-loop-controller.git@v2.0.0a3
|
|
128
135
|
|
|
129
136
|
# Or clone locally and install in editable mode:
|
|
130
137
|
git clone https://github.com/Ch3nOff/dual-loop-controller.git
|
|
@@ -1,129 +1,136 @@
|
|
|
1
|
-
# Dual-Loop Cognitive Controller v2.0
|
|
2
|
-
> **A Hardware-Aligned Latent Deliberation Framework for Transformers: Architecture & Empirical Analysis**
|
|
3
|
-
|
|
4
|
-
[](https://pypi.org/project/dual-loop-controller/)
|
|
5
|
-
[](tests/)
|
|
6
|
-
[](https://pytorch.org/)
|
|
7
|
-
[](#empirical-findings)
|
|
8
|
-
[](LICENSE)
|
|
9
|
-
|
|
10
|
-
Standard Autoregressive Transformers perform uniform $O(1)$ layer computation per token regardless of task complexity. While Chain-of-Thought (CoT) prompting allows multi-step reasoning, it expends significant output token bandwidth and introduces serial generation latency.
|
|
11
|
-
|
|
12
|
-
The **Dual-Loop Cognitive Controller** investigates decoupling deliberation from token generation into two loops:
|
|
13
|
-
1. **Outer Loop (Executive Deliberation / System 2)**: Runs recursive state transitions in a continuous latent space without emitting intermediate tokens.
|
|
14
|
-
2. **Inner Loop (Language Generation / System 1)**: Reads the matured latent thoughts ($H_{\text{thought}}$) as a soft prefix to decode final text responses.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Empirical Findings & Negative Results (The Unvarnished Truth)
|
|
19
|
-
|
|
20
|
-
To maintain strict scientific integrity, this repository reports **the actual, measured behavior of the model trained end-to-end (225,959 parameters, 35 epochs, 3,500 samples, 16 nodes, chance baseline = 6.25%)**, rather than idealized projections.
|
|
21
|
-
|
|
22
|
-
### 1. The Model Learns Real Relational Signals
|
|
23
|
-
* **Final Test Accuracy (3-Hop Graph Reasoning)**: **29.4%** vs. random chance **6.25%** (~4.7x better than random guessing).
|
|
24
|
-
* This confirms that the weight-tied recurrent Transformer and CWM buffer are capable of gradient propagation and multi-step pattern learning.
|
|
25
|
-
|
|
26
|
-
### 2. The Absence of Monotonic Test-Time Compute Scaling
|
|
27
|
-
A central theoretical hypothesis of recurrent latent pondering is that increasing inference steps ($K$) will progressively improve answer accuracy. **On this 225K parameter implementation, this claim does not hold**:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
========================================================================================
|
|
31
|
-
EMPIRICAL TEST-TIME COMPUTE EVALUATION (Checkpoint: checkpoint_trained_dualloop.pt)
|
|
32
|
-
========================================================================================
|
|
33
|
-
Ponder Steps (K) | Test Accuracy (500 samples) | Mean Predictive Entropy (nats)
|
|
34
|
-
----------------------------------------------------------------------------------------
|
|
35
|
-
K = 0 (No Ponder)| 27.4% - 30.6% | 1.332 - 1.362 nats
|
|
36
|
-
K = 1 | 28.2% | 1.370 nats
|
|
37
|
-
K = 2 | 30.6% | 1.307 nats
|
|
38
|
-
K = 3 (Trained) | 30.4% | 1.268 nats
|
|
39
|
-
K = 4 | 30.0% | 1.268 nats
|
|
40
|
-
K = 5 | 31.6% | 1.275 nats
|
|
41
|
-
========================================================================================
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**Scientific Diagnosis**:
|
|
45
|
-
* **Flat/Noisy Trajectory**: $K=0$ (bypassing the Outer Loop entirely) performs at parity with or slightly exceeds intermediate $K$ values.
|
|
46
|
-
* **Representational Drift**: Tracing individual predictions step-by-step reveals that while some cases improve with pondering, others degrade (e.g. correct at $K=0..1$, but diverging to incorrect candidates at $K=2..3$ due to distractor pull).
|
|
47
|
-
* **Scale Artifact vs. Fundamental Limit**: At 225K parameters, the latent space lacks the geometric capacity to preserve stable multi-step deductions without explicit discrete token anchors. Pondering without token-level supervision introduces noise as much as refinement.
|
|
48
|
-
|
|
49
|
-
### 3. Degradation Under Context Distractors (Stress Test)
|
|
50
|
-
When distractor edge count increases on 3-hop graphs, performance decays steadily:
|
|
51
|
-
* **6 Edges**: 31.0%
|
|
52
|
-
* **8 Edges**: 21.0%
|
|
53
|
-
* **12 Edges**: 13.7%
|
|
54
|
-
* **16 Edges**: 10.3%
|
|
55
|
-
|
|
56
|
-
### 4. Dynamic Halting Audit & The Pareto Trade-Off
|
|
57
|
-
A naive threshold like `0.5 nats` fails because the model operates at `~1.25–1.40 nats` (resulting in static $K=3.00$). Evaluating per-sample dynamic halting across a threshold sweep reveals the true **Accuracy vs. Compute Pareto Frontier**:
|
|
58
|
-
|
|
59
|
-
```text
|
|
60
|
-
========================================================================================
|
|
61
|
-
PER-SAMPLE DYNAMIC HALTING PARETO FRONTIER (500 Test Samples)
|
|
62
|
-
========================================================================================
|
|
63
|
-
Entropy Threshold | Test Accuracy | Avg Steps | % Halt @ K=1 | % Halt @ K=2 | % Halt @ K=3
|
|
64
|
-
----------------------------------------------------------------------------------------
|
|
65
|
-
tau = 0.80 nats | 28.0% | 2.81 | 7.6% | 3.8% | 88.6%
|
|
66
|
-
tau = 1.15 nats | 28.0% | 2.42 | 24.2% | 9.6% | 66.2%
|
|
67
|
-
tau = 1.25 nats | 28.8% | 2.23 | 32.2% | 12.2% | 55.6%
|
|
68
|
-
tau = 1.40 nats | 29.4% | 1.89 | 49.0% | 13.2% | 37.8%
|
|
69
|
-
========================================================================================
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Justified Operating Point**:
|
|
73
|
-
* **$\tau = 1.25 \dots 1.40\text{ nats}$** is the justifiable Pareto region: it achieves a **37% reduction in compute** (average **1.89 steps** vs. 3.00) while maintaining peak accuracy (**29.4%**), with a genuinely heterogeneous distribution across steps ($49\%$ at $K=1$, $13\%$ at $K=2$, $38\%$ at $K=3$).
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
#
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
|
|
1
|
+
# Dual-Loop Cognitive Controller v2.0
|
|
2
|
+
> **A Hardware-Aligned Latent Deliberation Framework for Transformers: Architecture & Empirical Analysis**
|
|
3
|
+
|
|
4
|
+
[](https://pypi.org/project/dual-loop-controller/)
|
|
5
|
+
[](tests/)
|
|
6
|
+
[](https://pytorch.org/)
|
|
7
|
+
[](#empirical-findings)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
Standard Autoregressive Transformers perform uniform $O(1)$ layer computation per token regardless of task complexity. While Chain-of-Thought (CoT) prompting allows multi-step reasoning, it expends significant output token bandwidth and introduces serial generation latency.
|
|
11
|
+
|
|
12
|
+
The **Dual-Loop Cognitive Controller** investigates decoupling deliberation from token generation into two loops:
|
|
13
|
+
1. **Outer Loop (Executive Deliberation / System 2)**: Runs recursive state transitions in a continuous latent space without emitting intermediate tokens.
|
|
14
|
+
2. **Inner Loop (Language Generation / System 1)**: Reads the matured latent thoughts ($H_{\text{thought}}$) as a soft prefix to decode final text responses.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Empirical Findings & Negative Results (The Unvarnished Truth)
|
|
19
|
+
|
|
20
|
+
To maintain strict scientific integrity, this repository reports **the actual, measured behavior of the model trained end-to-end (225,959 parameters, 35 epochs, 3,500 samples, 16 nodes, chance baseline = 6.25%)**, rather than idealized projections.
|
|
21
|
+
|
|
22
|
+
### 1. The Model Learns Real Relational Signals
|
|
23
|
+
* **Final Test Accuracy (3-Hop Graph Reasoning)**: **29.4%** vs. random chance **6.25%** (~4.7x better than random guessing).
|
|
24
|
+
* This confirms that the weight-tied recurrent Transformer and CWM buffer are capable of gradient propagation and multi-step pattern learning.
|
|
25
|
+
|
|
26
|
+
### 2. The Absence of Monotonic Test-Time Compute Scaling
|
|
27
|
+
A central theoretical hypothesis of recurrent latent pondering is that increasing inference steps ($K$) will progressively improve answer accuracy. **On this 225K parameter implementation, this claim does not hold**:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
========================================================================================
|
|
31
|
+
EMPIRICAL TEST-TIME COMPUTE EVALUATION (Checkpoint: checkpoint_trained_dualloop.pt)
|
|
32
|
+
========================================================================================
|
|
33
|
+
Ponder Steps (K) | Test Accuracy (500 samples) | Mean Predictive Entropy (nats)
|
|
34
|
+
----------------------------------------------------------------------------------------
|
|
35
|
+
K = 0 (No Ponder)| 27.4% - 30.6% | 1.332 - 1.362 nats
|
|
36
|
+
K = 1 | 28.2% | 1.370 nats
|
|
37
|
+
K = 2 | 30.6% | 1.307 nats
|
|
38
|
+
K = 3 (Trained) | 30.4% | 1.268 nats
|
|
39
|
+
K = 4 | 30.0% | 1.268 nats
|
|
40
|
+
K = 5 | 31.6% | 1.275 nats
|
|
41
|
+
========================================================================================
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Scientific Diagnosis**:
|
|
45
|
+
* **Flat/Noisy Trajectory**: $K=0$ (bypassing the Outer Loop entirely) performs at parity with or slightly exceeds intermediate $K$ values.
|
|
46
|
+
* **Representational Drift**: Tracing individual predictions step-by-step reveals that while some cases improve with pondering, others degrade (e.g. correct at $K=0..1$, but diverging to incorrect candidates at $K=2..3$ due to distractor pull).
|
|
47
|
+
* **Scale Artifact vs. Fundamental Limit**: At 225K parameters, the latent space lacks the geometric capacity to preserve stable multi-step deductions without explicit discrete token anchors. Pondering without token-level supervision introduces noise as much as refinement.
|
|
48
|
+
|
|
49
|
+
### 3. Degradation Under Context Distractors (Stress Test)
|
|
50
|
+
When distractor edge count increases on 3-hop graphs, performance decays steadily:
|
|
51
|
+
* **6 Edges**: 31.0%
|
|
52
|
+
* **8 Edges**: 21.0%
|
|
53
|
+
* **12 Edges**: 13.7%
|
|
54
|
+
* **16 Edges**: 10.3%
|
|
55
|
+
|
|
56
|
+
### 4. Dynamic Halting Audit & The Pareto Trade-Off
|
|
57
|
+
A naive threshold like `0.5 nats` fails because the model operates at `~1.25–1.40 nats` (resulting in static $K=3.00$). Evaluating per-sample dynamic halting across a threshold sweep reveals the true **Accuracy vs. Compute Pareto Frontier**:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
========================================================================================
|
|
61
|
+
PER-SAMPLE DYNAMIC HALTING PARETO FRONTIER (500 Test Samples)
|
|
62
|
+
========================================================================================
|
|
63
|
+
Entropy Threshold | Test Accuracy | Avg Steps | % Halt @ K=1 | % Halt @ K=2 | % Halt @ K=3
|
|
64
|
+
----------------------------------------------------------------------------------------
|
|
65
|
+
tau = 0.80 nats | 28.0% | 2.81 | 7.6% | 3.8% | 88.6%
|
|
66
|
+
tau = 1.15 nats | 28.0% | 2.42 | 24.2% | 9.6% | 66.2%
|
|
67
|
+
tau = 1.25 nats | 28.8% | 2.23 | 32.2% | 12.2% | 55.6%
|
|
68
|
+
tau = 1.40 nats | 29.4% | 1.89 | 49.0% | 13.2% | 37.8%
|
|
69
|
+
========================================================================================
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Justified Operating Point**:
|
|
73
|
+
* **$\tau = 1.25 \dots 1.40\text{ nats}$** is the justifiable Pareto region: it achieves a **37% reduction in compute** (average **1.89 steps** vs. 3.00) while maintaining peak accuracy (**29.4%**), with a genuinely heterogeneous distribution across steps ($49\%$ at $K=1$, $13\%$ at $K=2$, $38\%$ at $K=3$).
|
|
74
|
+
### 5. In-Distribution Memorization vs. Out-of-Distribution Generalization
|
|
75
|
+
A crucial empirical insight discovered during data isolation audits:
|
|
76
|
+
* **In-Distribution (Train Set, 500 seen graphs)**:
|
|
77
|
+
`K=0: 43.6% -> K=1: 51.4% -> K=2: 59.4% -> K=3: 63.2% (+19.6% monotonic test-time scaling)`
|
|
78
|
+
The recurrent latent controller successfully learns and memorizes multi-hop relational transitions for familiar graph topologies.
|
|
79
|
+
* **Out-of-Distribution (Held-Out Test Set, 500 unseen graphs)**:
|
|
80
|
+
`K=0: 28.6% -> K=1: 27.6% -> K=2: 28.0% -> K=3: 28.4% (Flat scaling / ~28-30%)`
|
|
81
|
+
Without discrete token anchors, continuous latent representations suffer from representational drift on novel graph structures at the 225K parameter regime.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Architectural Implementation
|
|
86
|
+
|
|
87
|
+
Despite the scaling limits at small model regimes, the repository provides clean, production-grade PyTorch implementations of the core modules:
|
|
88
|
+
|
|
89
|
+
* **Cognitive Working Memory (`dual_loop/memory.py`)**: Compresses context into $M \ll N$ slots in GPU SRAM/L2 cache to avoid HBM memory bandwidth roundtrips.
|
|
90
|
+
* **Top-K Capacity Routing (`dual_loop/controller.py`)**: Enforces static tensor shapes $[B, K_{\text{cap}}, D]$ to eliminate CUDA warp divergence (MoD-style).
|
|
91
|
+
* **Calibrated Entropy Halting (`dual_loop/halting.py`)**: Adaptive stopping based on predictive uncertainty and convergence delta.
|
|
92
|
+
* **Latent Deliberation Adapter (`dual_loop/adapters/latent_adapter.py`)**: A plug-and-play mid-network adapter for pretrained LLMs (e.g., Llama, Qwen).
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Quickstart
|
|
97
|
+
|
|
98
|
+
### 1. Installation
|
|
99
|
+
```bash
|
|
100
|
+
# Install officially from PyPI:
|
|
101
|
+
pip install --pre dual-loop-controller
|
|
102
|
+
# or exact version: pip install dual-loop-controller==2.0.0a3
|
|
103
|
+
|
|
104
|
+
# Or install direct from GitHub release tag:
|
|
105
|
+
pip install git+https://github.com/Ch3nOff/dual-loop-controller.git@v2.0.0a3
|
|
106
|
+
|
|
107
|
+
# Or clone locally and install in editable mode:
|
|
108
|
+
git clone https://github.com/Ch3nOff/dual-loop-controller.git
|
|
109
|
+
cd dual-loop-controller
|
|
110
|
+
pip install -e .
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> [!NOTE]
|
|
114
|
+
> **Pretrained Weights Bundled**: A 225K parameter trained reference checkpoint (~912 KB) is bundled directly in `dual_loop/checkpoints/checkpoint_trained_dualloop.pt`. Fresh clones and pip installs run inference and audits out-of-the-box without requiring a training step first.
|
|
115
|
+
|
|
116
|
+
### 2. Running Component Tests (Verifying Shapes & Gradients)
|
|
117
|
+
```bash
|
|
118
|
+
python -m unittest discover -s tests -p "test_*.py"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 3. Verifying Dynamic Halting & Pareto Calibration
|
|
122
|
+
```bash
|
|
123
|
+
python verify_dynamic_inference.py
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 4. Running the Honest Benchmark Suite (Live Tensor Computations)
|
|
127
|
+
```bash
|
|
128
|
+
python -m dual_loop.benchmarks.comprehensive_suite
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 5. Re-Training from Scratch
|
|
132
|
+
```bash
|
|
133
|
+
python train.py --epochs 35 --hops 3 --k_steps 3 --d_model 64
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
For the complete technical paper and theoretical post-mortem, see [WHITEPAPER.md](WHITEPAPER.md).
|