File size: 6,148 Bytes
0e86f35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ChiasmBridge - Technical Overview & Architecture</title>
    <style>
        :root {
            --bg: #0f172a;
            --card-bg: rgba(30, 41, 59, 0.7);
            --border: #334155;
            --accent: #0284c7;
            --accent-glow: rgba(2, 132, 199, 0.3);
            --text: #f8fafc;
            --text-dim: #94a3b8;
            --code-bg: #1e1e2e;
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg);
            color: var(--text);
            line-height: 1.7;
            margin: 0;
            padding: 40px 20px;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
        }

        h1 {
            font-size: 2.4rem;
            color: #ffffff;
            border-bottom: 2px solid var(--accent);
            padding-bottom: 12px;
            margin-bottom: 8px;
        }

        .subtitle {
            color: var(--text-dim);
            font-size: 1rem;
            margin-bottom: 30px;
        }

        .card {
            background: var(--card-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 28px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }

        h2 {
            font-size: 1.6rem;
            color: #38bdf8;
            margin-top: 0;
            border-bottom: 1px solid var(--border);
            padding-bottom: 8px;
        }

        h3 {
            font-size: 1.2rem;
            color: #7dd3fc;
        }

        code {
            background: var(--code-bg);
            color: #38bdf8;
            padding: 3px 8px;
            border-radius: 4px;
            font-family: 'Fira Code', monospace;
            font-size: 0.9em;
        }

        pre code {
            display: block;
            padding: 16px;
            color: #a6adc8;
            overflow-x: auto;
        }

        .mermaid {
            background: #181825;
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--border);
            display: flex;
            justify-content: center;
            margin: 20px 0;
        }

        .badge {
            display: inline-block;
            background: var(--accent);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: bold;
            box-shadow: 0 0 10px var(--accent-glow);
        }
    </style>
    <!-- Mermaid.js Visual Diagram Renderer -->
    <script type="module">
        import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
        mermaid.initialize({ startOnLoad: true, theme: 'dark' });
    </script>
</head>
<body>

<div class="container">

    <h1>πŸŒ‰ Technical Overview: ChiasmBridge & Isomorphic Projection</h1>
    <div class="subtitle">
        <span class="badge">Release 1.0.0 (Binary Distribution)</span> &nbsp; β€’ &nbsp; 
        <strong>Hardware Platform:</strong> NVIDIA RTX CUDA GPUs &nbsp; β€’ &nbsp;
        <strong>Core Library:</strong> <code>libchiasm.so</code>
    </div>

    <!-- Section 1 -->
    <div class="card">
        <h2>🌐 1. High-Level Overview</h2>
        <p>Multi-modal Large Language Models (LLMs) often use vision encoders (e.g. 7B Vision models) with hidden output dimensions of <code>3,584</code>, while larger text LLMs (e.g. 24B LLMs) require input embedding dimensions of <code>5,120</code>.</p>

        <p>When attempting to pair a 7B Vision model with a 24B Text LLM, standard GGUF loaders fail due to dimension mismatch (<code>3,584 β‰  5,120</code>).</p>

        <p><strong>ChiasmBridge</strong> (<code>libchiasm.so</code>) solves this by performing <strong>Isomorphic Orthogonal Subspace Projection</strong> directly in CUDA GPU memory. It maps the 3,584 visual channels losslessly into the 24B model's 5,120-dim space with <strong>zero feature distortion and zero training required</strong>.</p>
    </div>

    <!-- Section 2: Visual Diagram -->
    <div class="card">
        <h2>πŸ›οΈ 2. Visual Architecture Diagram (Interactive Mermaid Render)</h2>
        <div class="mermaid">
flowchart TD
    subgraph Input ["1. Visual Input"]
        Image["πŸ‘οΈ Image / Screen Pixels"]
    end

    subgraph VisionEncoder ["2. 7B Vision Encoder"]
        Encoder["πŸ“· Vision Encoder\n(Outputs 3,584-dim Vision Tokens)"]
    end

    subgraph ChiasmBridge ["3. ChiasmBridge (libchiasm.so)"]
        Bridge["πŸŒ‰ Isomorphic Subspace Projection\n(CUDA VRAM Translation 3,584 -> 5,120)"]
    end

    subgraph TargetLLM ["4. Target Cognitive LLM"]
        LLM["🐺 24B LLM (kalos:24b)\n(Receives 5,120-dim Visual Tokens)"]
    end

    Image --> Encoder
    Encoder -->|3,584-dim Tokens| Bridge
    Bridge -->|5,120-dim Tokens| LLM
    LLM --> Response["πŸ’¬ Multimodal Visual Perception & Response"]
        </div>
    </div>

    <!-- Section 3 -->
    <div class="card">
        <h2>πŸ”¬ 3. Component Breakdown</h2>

        <h3>⚑ 1. 7B Vision Token Extraction</h3>
        <p>Extracts high-level visual features (colors, shapes, textures, objects) from raw image pixels, outputting 3,584-dimensional feature vectors per visual patch.</p>

        <h3>πŸŒ‰ 2. Isomorphic Subspace Projection (libchiasm.so)</h3>
        <p>Translates 3,584-dim vision tokens into the 24B model's 5,120-dim input space in CUDA VRAM. Preserves all 3,584 original visual channels 100% untouched and un-distorted.</p>
    </div>

    <!-- Section 4 -->
    <div class="card">
        <h2>πŸ› οΈ 4. Python Integration Example</h2>
        <pre><code>from chiasm_bridge import SAMBridge, SAMBridgeConfig

config = SAMBridgeConfig(source_dim=3584, target_dim=5120)
bridge = SAMBridge(config)

translated_tokens = bridge(raw_vision_tokens)</code></pre>
    </div>

</div>

</body>
</html>