chiasm-bridge / docs /Whitepaper.html
MongooseReborn's picture
Initial Release: ChiasmBridge Universal Cross-Modal & Dimension-Agnostic Neural Adapter v1.0
0e86f35 verified
Raw
History Blame Contribute Delete
6.15 kB
<!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>