Skip to content

Commit cab2d75

Browse files
vicky kumarvicky kumar
authored andcommitted
Replace SVG with Mermaid diagrams, add interactive architecture.html link
1 parent 1c1d5d9 commit cab2d75

2 files changed

Lines changed: 59 additions & 135 deletions

File tree

README.md

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
| Scene | Description |
2020
|-------|-------------|
2121
| [Intro](https://fiscalmindset.github.io/Synapse-Graph/first_frame.html) | Project overview, features, graph visualization |
22-
| [Architecture](https://fiscalmindset.github.io/Synapse-Graph/architecture.html) | Interactive component diagram |
22+
| [Architecture (Interactive)](https://fiscalmindset.github.io/Synapse-Graph/architecture.html) | Clickable component diagram |
2323
| [Tech Stack](https://fiscalmindset.github.io/Synapse-Graph/tech_stack.html) | Dependencies |
2424
| [Demo](https://fiscalmindset.github.io/Synapse-Graph/video_scene.html) | Demo video |
2525
| [OpenMetadata](https://fiscalmindset.github.io/Synapse-Graph/openmetadata_usage.html) | Governance plane |
@@ -59,9 +59,37 @@ Turns model internals into **inspectable infrastructure** with familiar data-pla
5959

6060
## Architecture
6161

62-
![Synapse-Graph Architecture](architecture.svg)
62+
```mermaid
63+
flowchart LR
64+
subgraph Dashboard["🎨 Operator Dashboard"]
65+
D["Next.js<br/>React<br/>@xyflow/react"]
66+
end
67+
68+
subgraph Proxy["⚡ Neural Proxy (FastAPI)"]
69+
P["Generation + Tracing<br/>Governance + SSE<br/>HeadMaskStore"]
70+
end
71+
72+
subgraph Generation["🔥 Generation"]
73+
O["Ollama<br/>(Preferred)"]
74+
end
75+
76+
subgraph Tracing["🔍 Tracing"]
77+
T["HF Tracer<br/>PyTorch hooks"]
78+
end
79+
80+
subgraph Governance["🛡️ Governance"]
81+
OM["OpenMetadata<br/>Topology + Lineage<br/>Tags → Masks"]
82+
DEF["⛔ DEFECTIVE<br/>→ Runtime Mask"]
83+
end
84+
85+
D -->|"REST + SSE"| P
86+
P -->|"Generation"| O
87+
P -->|"Tracing"| T
88+
P -->|"Topology<br/>Lineage<br/>Tags"| OM
89+
OM -->|"tag"| DEF
90+
```
6391

64-
*For interactive diagram with clickable components: [open architecture.html](architecture.html)*
92+
**Interactive diagram:** [Click here for full interactive architecture](https://fiscalmindset.github.io/Synapse-Graph/architecture.html)
6593

6694
---
6795

@@ -115,16 +143,25 @@ def _make_projection_mask_hook(layer_idx, head_idx):
115143

116144
## OpenMetadata Topology
117145

118-
```
119-
Service: Synapse_Neural_Service (type: MySQL)
120-
└── Database: Qwen_Qwen2.5-1.5B-Instruct
121-
└── Schema: Transformer_Graph
122-
├── Table: Prompt_Ingress
123-
│ └── Columns: Prompt_Text, Prompt_Token_Count
124-
├── Table: Response_Egress
125-
│ └── Column: Response_Text
126-
└── Table: Layer_N (per layer)
127-
└── Column: Head_N (per head, FLOAT)
146+
```mermaid
147+
erDiagram
148+
Service ||--o| Database : "Synapse_Neural_Service"
149+
Database ||--o| Schema : "Transformer_Graph"
150+
Schema ||--o| Table : "Layer_N (per layer)"
151+
Schema ||--o| Table : "Prompt_Ingress"
152+
Schema ||--o| Table : "Response_Egress"
153+
Table ||--o| Column : "Head_N (per head)"
154+
155+
Service {
156+
string name "Synapse_Neural_Service"
157+
string type "mysql"
158+
}
159+
160+
Column {
161+
string name "Head_N"
162+
string type "FLOAT"
163+
string tag "DEFECTIVE/QUARANTINED"
164+
}
128165
```
129166

130167
**Classification & Tags:**
@@ -223,6 +260,15 @@ Dashboard: `http://localhost:3000`
223260

224261
## Demo Workflow
225262

263+
```mermaid
264+
flowchart TD
265+
A["1. Start<br/>Boot dashboard"] --> B["2. Trace<br/>Submit prompt"]
266+
B --> C["3. Discover<br/>Run circuit discovery"]
267+
C --> D["4. Quarantine<br/>Push DEFECTIVE tags"]
268+
D --> E["5. Verify<br/>Re-run prompt<br/>Show masked heads"]
269+
E --> A
270+
```
271+
226272
1. **Start** — Boot dashboard, verify "Ollama live" or "HF fallback"
227273
2. **Trace** — Submit prompt → watch synapse graph light up
228274
3. **Discover** — Enter hallucination token → run circuit discovery
@@ -248,7 +294,6 @@ Synapse-Graph/
248294
│ ├── components/ # Dashboard, graph, charts
249295
│ └── lib/ # API client
250296
├── architecture.html # Interactive architecture diagram
251-
├── architecture.svg # SVG diagram for README
252297
└── first_frame.html # GitHub Pages presentation
253298
```
254299

architecture.svg

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)