"Do not send data to centralized AI data centers: embed intelligence directly into the light traveling through global networks."
๐ Languages: English | ๐ฎ๐น Leggi in Italiano (Italian Version)
Project LightSwitch is an experimental software prototype and hardware architecture for In-Network & Photonic Artificial Intelligence Compute. It simulates executing Large Language Model (LLM) inference and matrix transformations directly inside optical fibers, switching cabins, and satellite laser links while packets are in transit, eliminating the GPU Von Neumann memory bottleneck and reducing compute energy by $95% - 98%$.
[ CLIENT (Copper / Wi-Fi) ]
โ (Tokenized prompt)
[ SWITCHING CABIN / EDGE PoP (P4 Switch / FPGA) ] โ Computes Initial Model Layers (15 ns)
โ (WDM Optical Carrier Modulation @ 1550nm C-Band)
[ TERRESTRIAL & SUBMARINE OPTICAL FIBER ] โ Photons travel at 200,000 km/s in silica
โ (Ternary Optical Phase Interference {-1, 0, 1})
[ LEO SATELLITE CONSTELLATION ] โ Inter-satellite laser links at 300,000 km/s (Speed of light in vacuum)
โ (Downlink & Token Decapsulation)
[ DESTINATION GATEWAY ] โ Final output token already computed upon arrival! (Zero GPU queue latency)
.
โโโ README.md # English Documentation & Quickstart
โโโ README_IT.md # Italian Documentation & Quickstart
โโโ requirements.txt # Optional dependencies (rich, numpy, matplotlib)
โโโ config.py # Optical physical constants & simulation parameters
โโโ core/
โ โโโ encoder.py # WDM optical wavelength modulation (C-Band 1530-1565nm)
โ โโโ switch.py # In-network optical switch and in-transit compute engine
โ โโโ decoder.py # Generative text un-embedder and token streaming
โ โโโ llm_bridge.py # Real LLM connector (Ollama / OpenAI / Groq / Fallback)
โ โโโ state_space_mamba.py # 1.58-bit linear State-Space (Mamba) recurrent engine
โ โโโ matrix_sparse.py # 1.58-bit ternary additive engine {-1, 0, 1}
โโโ simulation/
โ โโโ fiber_channel.py # Single-mode silica fiber delay & attenuation model (SMF-28)
โ โโโ pipeline.py # Multi-hop end-to-end execution pipeline
โ โโโ heterogeneous_network.py # Global WAN model (Copper, P4 Cabins, Fibers, LEO Satellites)
โ โโโ packet_classifier.py # Hardware packet classifier (<1.5 ns TCAM parser)
โ โโโ noise_and_fec.py # Optical noise model (ASE/Thermal) & ITU-T G.709 FEC
โ โโโ datacenter_spine_leaf.py # Private AI data center campus Spine-Leaf simulator
โโโ benchmarks/
โ โโโ metrics.py # FLOPs, Latency, and Energy telemetry (picoJoules vs milliJoules)
โ โโโ compare_gpu.py # Mathematical comparison vs NVIDIA H100 GPU server
โ โโโ hardware_costs.py # 3-Year TCO financial engine (CAPEX & OPEX)
โโโ docs/
โ โโโ WHITEPAPER.md # Formal scientific whitepaper & mathematical models
โ โโโ OBJECTIONS_AND_DEFENSE.md # Technical defense against top 4 engineering objections
โ โโโ hardware_architecture.md # Technical hardware guide for COTS chips & optical interconnects
โ โโโ IMPACT_AND_ROADMAP.md # Global launch manifesto, grants (EIC Pathfinder), and roadmap
โโโ tests/
โ โโโ test_all.py # Automated test suite (11 tests, 100% passing)
โโโ app.py # Interactive Guided Visual Studio & Chat
โโโ main.py # Interactive CLI with Rich terminal visualization
python3 app.py
python3 -m unittest discover tests
| Hardware Architecture | Chip Type | CAPEX (Hardware) | Power Consumption | 3-Year Electricity (OPEX)* | 3-Year Total TCO | Savings vs GPU |
|---|---|---|---|---|---|---|
| Traditional AI Server (8x NVIDIA H100) | Monolithic GPU | โฌ280,000 | 10,200 W | โฌ70,815 | โฌ350,815 | Baseline |
| 3x FPGA SmartNIC Cluster | AMD Xilinx (COTS) | โฌ8,400 | 225 W | โฌ1,562 | โฌ9,962 | -97% ๐ |
| 3x Programmable P4 Switch Cluster | Intel Tofino 2 (COTS) | โฌ25,500 | 750 W | โฌ5,207 | โฌ30,707 | -91% ๐ |
| 3x Silicon Photonics CPO Engine | Ayar Labs (COTS) | โฌ36,000 | 105 W | โฌ729 | โฌ36,729 | -90% ๐ |
*Calculated with industrial electricity rate of โฌ0.22/kWh and cooling PUE = 1.2.
Released under the open-source MIT License.
Python
100.0%
"Do not send data to centralized AI data centers: embed intelligence directly into the light traveling through global networks."
๐ Languages: English | ๐ฎ๐น Leggi in Italiano (Italian Version)
Project LightSwitch is an experimental software prototype and hardware architecture for In-Network & Photonic Artificial Intelligence Compute. It simulates executing Large Language Model (LLM) inference and matrix transformations directly inside optical fibers, switching cabins, and satellite laser links while packets are in transit, eliminating the GPU Von Neumann memory bottleneck and reducing compute energy by $95% - 98%$.
[ CLIENT (Copper / Wi-Fi) ]
โ (Tokenized prompt)
[ SWITCHING CABIN / EDGE PoP (P4 Switch / FPGA) ] โ Computes Initial Model Layers (15 ns)
โ (WDM Optical Carrier Modulation @ 1550nm C-Band)
[ TERRESTRIAL & SUBMARINE OPTICAL FIBER ] โ Photons travel at 200,000 km/s in silica
โ (Ternary Optical Phase Interference {-1, 0, 1})
[ LEO SATELLITE CONSTELLATION ] โ Inter-satellite laser links at 300,000 km/s (Speed of light in vacuum)
โ (Downlink & Token Decapsulation)
[ DESTINATION GATEWAY ] โ Final output token already computed upon arrival! (Zero GPU queue latency)
.
โโโ README.md # English Documentation & Quickstart
โโโ README_IT.md # Italian Documentation & Quickstart
โโโ requirements.txt # Optional dependencies (rich, numpy, matplotlib)
โโโ config.py # Optical physical constants & simulation parameters
โโโ core/
โ โโโ encoder.py # WDM optical wavelength modulation (C-Band 1530-1565nm)
โ โโโ switch.py # In-network optical switch and in-transit compute engine
โ โโโ decoder.py # Generative text un-embedder and token streaming
โ โโโ llm_bridge.py # Real LLM connector (Ollama / OpenAI / Groq / Fallback)
โ โโโ state_space_mamba.py # 1.58-bit linear State-Space (Mamba) recurrent engine
โ โโโ matrix_sparse.py # 1.58-bit ternary additive engine {-1, 0, 1}
โโโ simulation/
โ โโโ fiber_channel.py # Single-mode silica fiber delay & attenuation model (SMF-28)
โ โโโ pipeline.py # Multi-hop end-to-end execution pipeline
โ โโโ heterogeneous_network.py # Global WAN model (Copper, P4 Cabins, Fibers, LEO Satellites)
โ โโโ packet_classifier.py # Hardware packet classifier (<1.5 ns TCAM parser)
โ โโโ noise_and_fec.py # Optical noise model (ASE/Thermal) & ITU-T G.709 FEC
โ โโโ datacenter_spine_leaf.py # Private AI data center campus Spine-Leaf simulator
โโโ benchmarks/
โ โโโ metrics.py # FLOPs, Latency, and Energy telemetry (picoJoules vs milliJoules)
โ โโโ compare_gpu.py # Mathematical comparison vs NVIDIA H100 GPU server
โ โโโ hardware_costs.py # 3-Year TCO financial engine (CAPEX & OPEX)
โโโ docs/
โ โโโ WHITEPAPER.md # Formal scientific whitepaper & mathematical models
โ โโโ OBJECTIONS_AND_DEFENSE.md # Technical defense against top 4 engineering objections
โ โโโ hardware_architecture.md # Technical hardware guide for COTS chips & optical interconnects
โ โโโ IMPACT_AND_ROADMAP.md # Global launch manifesto, grants (EIC Pathfinder), and roadmap
โโโ tests/
โ โโโ test_all.py # Automated test suite (11 tests, 100% passing)
โโโ app.py # Interactive Guided Visual Studio & Chat
โโโ main.py # Interactive CLI with Rich terminal visualization
python3 app.py
python3 -m unittest discover tests
| Hardware Architecture | Chip Type | CAPEX (Hardware) | Power Consumption | 3-Year Electricity (OPEX)* | 3-Year Total TCO | Savings vs GPU |
|---|---|---|---|---|---|---|
| Traditional AI Server (8x NVIDIA H100) | Monolithic GPU | โฌ280,000 | 10,200 W | โฌ70,815 | โฌ350,815 | Baseline |
| 3x FPGA SmartNIC Cluster | AMD Xilinx (COTS) | โฌ8,400 | 225 W | โฌ1,562 | โฌ9,962 | -97% ๐ |
| 3x Programmable P4 Switch Cluster | Intel Tofino 2 (COTS) | โฌ25,500 | 750 W | โฌ5,207 | โฌ30,707 | -91% ๐ |
| 3x Silicon Photonics CPO Engine | Ayar Labs (COTS) | โฌ36,000 | 105 W | โฌ729 | โฌ36,729 | -90% ๐ |
*Calculated with industrial electricity rate of โฌ0.22/kWh and cooling PUE = 1.2.
Released under the open-source MIT License.
Python
100.0%