File size: 2,405 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 | # π ChiasmBridge β Step-by-Step Setup & User Guide
Welcome to the **ChiasmBridge** setup guide. This document guides you through configuring `libchiasm.so` to bridge disparate feature vectors across ANY dimension boundary ($N \iff M$) and ANY modality (Vision, Audio/Speech, Haptics, and LLMs).
---
## π Prerequisites & Installation
1. **System Requirements:** Linux OS with NVIDIA GPU (Ampere or newer recommended) and CUDA drivers installed.
2. **Installation via Pip:**
```bash
git clone https://github.com/MongooseReborn/chiasm-bridge.git
cd chiasm-bridge
pip install .
```
---
## π οΈ Step 1: Basic Universal Usage (`chiasm`)
ChiasmBridge provides a lightweight Python package (`chiasm`) that interfaces natively with compiled CUDA shared library `libchiasm.so`.
```python
import torch
from chiasm import ChiasmBridge, ChiasmConfig
# 1. Define dynamic N -> M configuration (e.g. 3584 Vision -> 5120 LLM, 1024 Audio -> 4096 LLM)
config = ChiasmConfig(source_dim=3584, target_dim=5120)
bridge = ChiasmBridge(config)
# 2. Forward Projection (N -> M): Sensory Perception -> LLM Space
raw_sensory_tokens = torch.randn(1, 64, 3584) # [batch, seq_len, 3584]
translated_tokens = bridge.project_forward(raw_sensory_tokens) # [batch, seq_len, 5120]
print("Forward Projected Shape:", translated_tokens.shape) # torch.Size([1, 64, 5120])
# 3. Inverse Projection (M -> N): LLM Space -> Sensory Reconstruction
reconstructed_sensory = bridge.project_inverse(translated_tokens)
print("Inverse Reconstructed Shape:", reconstructed_sensory.shape) # torch.Size([1, 64, 3584])
```
---
## πΎ Step 2: Directory Structure
```text
chiasm-bridge/
βββ bin/
β βββ libchiasm.so # Pre-compiled CUDA Binary Shared Library (Stripped)
βββ chiasm/
β βββ __init__.py # Package Exports
β βββ sam_bridge.py # Bi-Directional Modular Neural Adapter
βββ docs/
β βββ WHITE_PAPER.md # Technical Architecture Overview
β βββ SETUP_GUIDE.md # Step-by-Step Setup Guide
β βββ Whitepaper.html # Web-formatted Whitepaper
β βββ test_modular_chiasm.py # Universal Modular Test Suite
βββ README.md
βββ setup.py # Pip Package Installer
```
---
*ChiasmBridge β Mongoose & Kalos Engine Architecture Team @ BlackForest Studio (2026).*
|