chiasm-bridge / docs /SETUP_GUIDE.md
MongooseReborn's picture
Initial Release: ChiasmBridge Universal Cross-Modal & Dimension-Agnostic Neural Adapter v1.0
0e86f35 verified
|
Raw
History Blame Contribute Delete
2.41 kB

πŸš€ 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:
    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.

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

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).