Rust weight-streaming engine runs FLUX.2 9B on a 12GB RTX 3060, ~9% faster with 2GB resident pool

madtune22 · reddit · 2026-09-23

Reddit user madtune22 released StreamLoader, a Rust engine that streams GPU weights from SafeTensors via mmap, pinned host memory, reusable VRAM buffers and CUDA-event prefetching, exposing tensors to PyTorch through DLPack. Tested with FLUX.2-klein-9B on an RTX 3060 12GB; a ResidentPool keeping 2GB resident improved generation time 9% vs full streaming. A Qwen-Image-2.1 port worked without Rust changes. Code is open for feedback on prefetch design, residency strategies, and stress-test architectures.

Original post →

More from Infra

Infra channel →