Is pure C the answer to making AI models actually accessible?
Been digging into this Flux 2 Klein implementation that's written entirely in C - no Python wrapper, no framework bloat, just straight inference code. And honestly... it's making me rethink a lot of assumptions.
The thing that gets me is how we've normalized this massive dependency stack for running AI models. You want to run inference? Cool, install PyTorch (several GB), CUDA toolkit, maybe some ONNX runtime, Python itself with its whole ecosystem... and then pray it all plays nice together.
This pure C approach strips all that away. The entire inference engine is maybe a few thousand lines of code you can actually read and understand. No black box frameworks. No version conflicts. You could probably fit the whole thing on a floppy disk if those still existed.
Sure, it's not as flexible - you're locked into this specific model architecture. And yeah, writing CUDA kernels in C is not exactly beginner-friendly. But there's something refreshing about code that just... does the thing. Load weights, push tensors through, get output. Done.
Makes me wonder if we've been overengineering this whole space. Not saying everyone should rewrite everything in C, but having options that don't require half your SSD seems valuable? Especially for edge deployment or resource-constrained scenarios.
I've been wrestling with this exact frustration lately when trying to get some ML tools running on my older laptop. The dependency hell is real - spent an entire afternoon just getting CUDA versions to match up with the right PyTorch build. What really gets me is how we've collectively decided that gigabytes of dependencies is just "the cost of doing business" with AI. But I'm curious about the tradeoffs here - are we talking about significantly slower inference times when you strip away all those optimized frameworks, or is the performance gap actually smaller than we'd expect?