2009YU commited on
Commit
72dc73d
·
verified ·
1 Parent(s): d0da334

Add architecture diagrams and complexity notes

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md CHANGED
@@ -76,6 +76,21 @@ scripts/run_stagec_sharded_training_template.sh
76
 
77
  Stage C predicts the next token through a graph-native causal path:
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  ```text
80
  schema2 text
81
  -> token graph nodes and typed candidate edges
@@ -87,6 +102,38 @@ schema2 text
87
 
88
  The graph builder proposes token nodes and typed candidate edges. The model then learns edge gates, propagates messages through the token graph, scores context nodes, and decodes each generated token as a dynamic graph node. The decoder combines a learned prefix message from previous generated-token nodes with a learned context message from encoded graph nodes, then maps the updated graph-decoder state to next-token logits. This keeps the main objective as next-token prediction while making generation depend on typed graph structure rather than Transformer self-attention.
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  ## Current Capability Boundary
91
 
92
  Stage C can generate early English story-style continuations and shows measurable dependence on typed graph edges. It is not a reliable production LLM. Current weak areas include exact factual QA, numeric reasoning, robust instruction following, grammar stability, multilingual generation, and long-range concept binding.
 
76
 
77
  Stage C predicts the next token through a graph-native causal path:
78
 
79
+ ```mermaid
80
+ flowchart TD
81
+ A["Text / prompt / source segments / target text"] --> B["Tokenizer"]
82
+ B --> C["Token Graph Builder"]
83
+ C --> D["Token nodes"]
84
+ C --> E["Typed candidate edges"]
85
+ D --> G["TokenGraphEncoderV3"]
86
+ E --> G
87
+ G --> H["Encoded context graph states"]
88
+ H --> I["Dynamic Token Graph Decoder"]
89
+ I --> J["Generated token node"]
90
+ J --> I
91
+ I --> K["Next-token distribution"]
92
+ ```
93
+
94
  ```text
95
  schema2 text
96
  -> token graph nodes and typed candidate edges
 
102
 
103
  The graph builder proposes token nodes and typed candidate edges. The model then learns edge gates, propagates messages through the token graph, scores context nodes, and decodes each generated token as a dynamic graph node. The decoder combines a learned prefix message from previous generated-token nodes with a learned context message from encoded graph nodes, then maps the updated graph-decoder state to next-token logits. This keeps the main objective as next-token prediction while making generation depend on typed graph structure rather than Transformer self-attention.
104
 
105
+ Single-step decoding:
106
+
107
+ ```mermaid
108
+ flowchart LR
109
+ A["Encoded context graph<br/>N nodes"] --> D["Context gate"]
110
+ B["Generated prefix nodes<br/>window W"] --> C["Prefix gate"]
111
+ C --> E["Generated-token node t"]
112
+ D --> E
113
+ E --> F["Graph decoder update"]
114
+ F --> G["Vocabulary logits"]
115
+ G --> H["next token"]
116
+ H --> I["Append as graph node"]
117
+ ```
118
+
119
+ ## Complexity Growth
120
+
121
+ Dense Transformer self-attention grows roughly as:
122
+
123
+ ```text
124
+ O(n^2 * d)
125
+ ```
126
+
127
+ Stage C replaces sequence-wide all-token attention with graph candidate edges and dynamic graph decoding:
128
+
129
+ ```text
130
+ Graph encoder: O(L_g * (N + E) * d)
131
+ Dynamic prefix path: O(L_d * T * W * d)
132
+ Context tunnel path: O(L_d * T * N * d)
133
+ ```
134
+
135
+ where `N` is context graph nodes, `E` is candidate edges, `T` is generated length, and `W` is the bounded generated-prefix window. The current context tunnel still scans encoded context nodes; the accurate claim is not constant-time generation, but replacing dense sequence-wide self-attention with sparse typed graph propagation plus explicit context tunneling.
136
+
137
  ## Current Capability Boundary
138
 
139
  Stage C can generate early English story-style continuations and shows measurable dependence on typed graph edges. It is not a reliable production LLM. Current weak areas include exact factual QA, numeric reasoning, robust instruction following, grammar stability, multilingual generation, and long-range concept binding.