# SpawnDev.ILGPU.ML: Neural network inference & training in C# across any GPU (Browser & Desktop)

> Source: <https://forum.level1techs.com/t/spawndev-ilgpu-ml-neural-network-inference-training-in-c-across-any-gpu-browser-desktop/260474#post_1>
> Published: 2026-11-11 22:46:23+00:00

Hey everyone!

I’ve been watching Wendell’s videos on Level1Techs for a long time and really appreciate how supportive this community is of open-source projects, so I wanted to share something I’ve been building and refining: **SpawnDev.ILGPU.ML**.

It is a neural network inference and training engine written entirely in C# that compiles C# compute kernels directly for whatever device is in front of it via SpawnDev.ILGPU.

**The big kicker:** **No ONNX Runtime, no native inference binaries, and no server required.** It runs entirely locally on the desktop (Windows, Linux, macOS via CUDA, OpenCL, or SIMD CPU) or right inside the browser via Blazor WebAssembly (WebGPU, WebGL, or WebAssembly).

**One Codebase, Six Backends:** WebGPU, WebGL, Wasm, CUDA, OpenCL, and SIMD CPU. Everything is tested across lanes.

**Zero-Copy Architecture:** Pixels, activations, and weights stay on the GPU. In the browser, data streams from `fetch` and OPFS straight into GPU buffers without bloating the .NET heap.

**Model Formats Auto-Detected:** Drop in ONNX, TFLite, GGUF, SafeTensors, TF GraphDef, PyTorch checkpoints, or Core ML. It builds a unified graph IR with a built-in graph optimizer (constant folding, fusion, dead-node elimination).

**Generative AI & 3D Pipelines:** Runs things like FLUX 3 / FLUX.2, Stable Diffusion (with LoRA, ControlNet, and ComfyUI patches), LTX-Video & Wan 2.2 for video gen, TRELLIS.2 for text/image-to-3D, SkinTokens/UniRig for auto-rigging, Kimodo for animation, and GGUF LLMs (with KV-cache decode and TurboQuant).

**On-Device Training:** Supports LoRA fine-tuning of GGUF language models directly on your hardware (e.g., fine-tuning `llama3.1:8b` on an RTX 4070).

If you want to kick the tires without installing anything, the live demo runs entirely client-side on your GPU (models download once and cache locally). You can find the demo on the GitHub repo page (this forum blocks links).

github / LostBeard / SpawnDev.ILGPU.ML

I’d love to hear your thoughts, answer any architectural questions, or see what people think of running heavy generative and 3D workflows straight out of a browser tab via WebGPU!

Todd

aka LostBeard
