H4ZEY86/Fractal-BLT

A zero-allocation .NET 10 NativeAOT AI runtime streaming MoE weights directly from NVMe to GPU over PCIe.

0

stars

50

commits

C#

primary language

Sep 8, 2026

updated

Browse cluster: C# and .NET Azure Development

README

FRACTAL-BLT

https://h4zey86.github.io/Fractal-BLT/

Disk-Native, Zero-Allocation Mixture-of-Experts (MoE) Inference Runtime in .NET 10 NativeAOT

.NET 10 NativeAOT Zero-Allocation NVMe-to-GPU DMA RTX 5070 Ti Optimized License: Apache 2.0 Build Status Docker Support Donate PayPal

🧭 Navigation & Guides


🚀 Architectural Manifesto

Traditional AI runtimes are crippled by heavy software stacks (Python, PyTorch, CPython runtimes) and rigid tokenizers that waste massive compute cycles on predictable boilerplate. Fractal-BLT is a bare-metal systems reimagining of local artificial intelligence. By fusing .NET 10 NativeAOT, unbuffered direct I/O (O_DIRECT / FILE_FLAG_NO_BUFFERING), Shannon entropy byte patchification, unmanaged Graph Convolution Network (GCN) routing, and jitted raw PTX CUDA execution, Fractal-BLT bypasses the VRAM bottleneck entirely—streaming mixture-of-experts weights straight from Gen4/Gen5 NVMe storage across the PCIe bus directly into GPU memory with zero managed heap allocations.


🚀 Performance Showcase: Zero-Allocation .NET 10 & CUDA Inference

Experience high-throughput, local sovereign AI inference powered by custom C# NativeAOT, memory-mapped NVMe-to-VRAM DMA transfers, and JIT-compiled PTX kernels.

https://github.com/user-attachments/assets/ae5b55f8-469e-4494-95e7-d488a656c6e0


Live SSE Telemetry captured via Windows Terminal and `Run-Demo.ps1` automation harness.

Quick Run

Want to test the zero-allocation telemetry pipeline locally on your machine? Run the automated PowerShell harness:

powershell -ExecutionPolicy Bypass -File .\Run-Demo.ps1

🏗️ System Architecture Flow

graph TD
    A[Raw UTF-8 Byte Stream] -->|Sliding-Window Shannon Entropy| B(Fractal-BLT Encoder)
    B -->|Span PatchBoundaries| C(Fractal-GNN Router)
    C -->|Unmanaged Adjacency GCN Matrix| D{Expert ID Selected}
    D -->|O_DIRECT Unbuffered Read| E[Fractal-Streamer NVMe]
    E -->|cuMemHostRegister Pinned DMA| F[Fractal-Bridge PCIe]
    F -->|cuLaunchKernel SGEMV JIT PTX| G[NVIDIA RTX 5070 Ti]
    G -->|Zero-Copy PipeWriter SSE| H[Kestrel /v1/chat/completions]

🛠️ The Tech Stack

  • FractalStreamer: Bypasses OS page caches using unbuffered cross-platform file handles to pull .safetensors shards straight from storage.
  • FractalBridge: Manages CUDA driver P/Invokes (cuModuleLoadData, cuLaunchKernel), pinning host buffers and orchestrating zero-copy PCIe DMA transfers.
  • FractalBltEncoder: Computes real-time sliding-window Shannon entropy ($H = - \sum p_i \log_2 p_i$) over raw byte buffers using zero-allocation stackalloc arrays.
  • FractalGnnRouter: Constructs an unmanaged $N \times N$ RBF similarity matrix on the thread stack, performing 1-hop graph message passing to route patches to experts indexed via C# 12 [InlineArray(64)].
  • FractalServe: Exposes an OpenAI-compatible /v1/chat/completions endpoint utilizing Kestrel SlimBuilder and raw PipeWriter Server-Sent Events (SSE) streaming.

📊 Performance Benchmarks (Gauntlet Telemetry)

MetricFractal-BLT (.NET 10 NativeAOT)Standard Python / PyTorch vLLM
Startup Memory Footprint~10.06 MB~1.8 - 3.5 GB
Managed Heap Allocations0 Bytes (Hot Path)Heavy GC Pressure
Byte Patching Throughput45.05 MB/s (Single Thread)Python Interpreter Overhead
GNN Adjacency Routing541.3 µs per 8x8 MatrixPyTorch Autograd Overhead
VRAM Model CapacityInfinite (NVMe Swapped)Hard-capped by GPU VRAM

⚙️ Quickstart & Compilation

Prerequisites

  • .NET 10 SDK (with NativeAOT workloads installed)
  • NVIDIA CUDA Driver Toolkit (v12.x+)
  • An NVMe Gen4/Gen5 drive and an NVIDIA GPU (e.g., RTX 5070 Ti)

1. Clone & Build NativeAOT Binaries

git clone https://github.com/H4ZEY86/Fractal-BLT.git
cd Fractal-BLT
dotnet publish -c Release /p:PublishAot=true

2. Run the Telemetry Gauntlet

dotnet run --project FractalCore/FractalCore.csproj -c Release

3. Launch the API Server

dotnet run --project FractalServe/FractalServe.csproj -c Release
curl -N -X POST http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "fractal-moe", "messages": [{"role": "user", "content": "Write a quicksort in C#"}], "stream": true}'

💖 Support the Project

Fractal-BLT is entirely open-source. If you use this runtime in production or want to help cover the costs of CI/CD workflows, GPU Github Runners, and continued maintenance, please consider donating. (Note: The Opure Sovereign Enclave (OZTAE) is a separate, proprietary commercial product available for enterprise licensing).

Support Fractal-BLT via PayPal

📜 License

Distributed under the Apache 2.0 License. See LICENSE for details.

Contributors

H4ZEY86

50 commits

H4ZEY86/Fractal-BLT

A zero-allocation .NET 10 NativeAOT AI runtime streaming MoE weights directly from NVMe to GPU over PCIe.

0

stars

50

commits

C#

primary language

Sep 8, 2026

updated

Browse cluster: C# and .NET Azure Development

README

FRACTAL-BLT

https://h4zey86.github.io/Fractal-BLT/

Disk-Native, Zero-Allocation Mixture-of-Experts (MoE) Inference Runtime in .NET 10 NativeAOT

.NET 10 NativeAOT Zero-Allocation NVMe-to-GPU DMA RTX 5070 Ti Optimized License: Apache 2.0 Build Status Docker Support Donate PayPal

🧭 Navigation & Guides


🚀 Architectural Manifesto

Traditional AI runtimes are crippled by heavy software stacks (Python, PyTorch, CPython runtimes) and rigid tokenizers that waste massive compute cycles on predictable boilerplate. Fractal-BLT is a bare-metal systems reimagining of local artificial intelligence. By fusing .NET 10 NativeAOT, unbuffered direct I/O (O_DIRECT / FILE_FLAG_NO_BUFFERING), Shannon entropy byte patchification, unmanaged Graph Convolution Network (GCN) routing, and jitted raw PTX CUDA execution, Fractal-BLT bypasses the VRAM bottleneck entirely—streaming mixture-of-experts weights straight from Gen4/Gen5 NVMe storage across the PCIe bus directly into GPU memory with zero managed heap allocations.


🚀 Performance Showcase: Zero-Allocation .NET 10 & CUDA Inference

Experience high-throughput, local sovereign AI inference powered by custom C# NativeAOT, memory-mapped NVMe-to-VRAM DMA transfers, and JIT-compiled PTX kernels.

https://github.com/user-attachments/assets/ae5b55f8-469e-4494-95e7-d488a656c6e0


Live SSE Telemetry captured via Windows Terminal and `Run-Demo.ps1` automation harness.

Quick Run

Want to test the zero-allocation telemetry pipeline locally on your machine? Run the automated PowerShell harness:

powershell -ExecutionPolicy Bypass -File .\Run-Demo.ps1

🏗️ System Architecture Flow

graph TD
    A[Raw UTF-8 Byte Stream] -->|Sliding-Window Shannon Entropy| B(Fractal-BLT Encoder)
    B -->|Span PatchBoundaries| C(Fractal-GNN Router)
    C -->|Unmanaged Adjacency GCN Matrix| D{Expert ID Selected}
    D -->|O_DIRECT Unbuffered Read| E[Fractal-Streamer NVMe]
    E -->|cuMemHostRegister Pinned DMA| F[Fractal-Bridge PCIe]
    F -->|cuLaunchKernel SGEMV JIT PTX| G[NVIDIA RTX 5070 Ti]
    G -->|Zero-Copy PipeWriter SSE| H[Kestrel /v1/chat/completions]

🛠️ The Tech Stack

  • FractalStreamer: Bypasses OS page caches using unbuffered cross-platform file handles to pull .safetensors shards straight from storage.
  • FractalBridge: Manages CUDA driver P/Invokes (cuModuleLoadData, cuLaunchKernel), pinning host buffers and orchestrating zero-copy PCIe DMA transfers.
  • FractalBltEncoder: Computes real-time sliding-window Shannon entropy ($H = - \sum p_i \log_2 p_i$) over raw byte buffers using zero-allocation stackalloc arrays.
  • FractalGnnRouter: Constructs an unmanaged $N \times N$ RBF similarity matrix on the thread stack, performing 1-hop graph message passing to route patches to experts indexed via C# 12 [InlineArray(64)].
  • FractalServe: Exposes an OpenAI-compatible /v1/chat/completions endpoint utilizing Kestrel SlimBuilder and raw PipeWriter Server-Sent Events (SSE) streaming.

📊 Performance Benchmarks (Gauntlet Telemetry)

MetricFractal-BLT (.NET 10 NativeAOT)Standard Python / PyTorch vLLM
Startup Memory Footprint~10.06 MB~1.8 - 3.5 GB
Managed Heap Allocations0 Bytes (Hot Path)Heavy GC Pressure
Byte Patching Throughput45.05 MB/s (Single Thread)Python Interpreter Overhead
GNN Adjacency Routing541.3 µs per 8x8 MatrixPyTorch Autograd Overhead
VRAM Model CapacityInfinite (NVMe Swapped)Hard-capped by GPU VRAM

⚙️ Quickstart & Compilation

Prerequisites

  • .NET 10 SDK (with NativeAOT workloads installed)
  • NVIDIA CUDA Driver Toolkit (v12.x+)
  • An NVMe Gen4/Gen5 drive and an NVIDIA GPU (e.g., RTX 5070 Ti)

1. Clone & Build NativeAOT Binaries

git clone https://github.com/H4ZEY86/Fractal-BLT.git
cd Fractal-BLT
dotnet publish -c Release /p:PublishAot=true

2. Run the Telemetry Gauntlet

dotnet run --project FractalCore/FractalCore.csproj -c Release

3. Launch the API Server

dotnet run --project FractalServe/FractalServe.csproj -c Release
curl -N -X POST http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "fractal-moe", "messages": [{"role": "user", "content": "Write a quicksort in C#"}], "stream": true}'

💖 Support the Project

Fractal-BLT is entirely open-source. If you use this runtime in production or want to help cover the costs of CI/CD workflows, GPU Github Runners, and continued maintenance, please consider donating. (Note: The Opure Sovereign Enclave (OZTAE) is a separate, proprietary commercial product available for enterprise licensing).

Support Fractal-BLT via PayPal

📜 License

Distributed under the Apache 2.0 License. See LICENSE for details.

Contributors

H4ZEY86

50 commits

Languages

C#

86.4%

PowerShell

5.2%

JavaScript

3.6%

CSS

3.2%