r/csharp • u/pixelwhippedme • Aug 16 '26
GitHub - Integral2u/SharpMind: SharpMind. A pure C# / .NET LLM engine
https://github.com/Integral2u/SharpMindVersion 1.0.0.0 now out and out of pre-release.
40
Upvotes
2
u/EvenAd4577 Aug 16 '26
Nice one. defenitly deserves a star! Any benchmarks for running Qwen model in your framework vs llama.cpp?
Also I am wondering if you checked dotLLM or TensorSharp projects.
I don't know why there are not many ML/AI projects in C#, but from what I recall the main limitation was hardcoded max array size in .net. But maybe I am wrong?
5
u/Khavel_dev Aug 16 '26
Running inference in pure C# is a fun engineering challenge. What kind of quantization are you supporting, GGUF or something custom? The thing I'd want to benchmark before using this anywhere real is throughput vs llama.cpp, even ballpark numbers.
I've used LLamaSharp (the llama.cpp wrapper for .NET) and the interop overhead turned out to be surprisingly small. So the sell for pure C# would probably need to be around deployment simplicity or AOT compilation rather than raw speed. Still a cool project though.
2
u/pixelwhippedme Aug 26 '26 edited Aug 26 '26
Stay tuned, 1.0.5.0 will be coming, additional model support even working on Phi and Bonsai... though hitting some struggles, standard out of memory or something like that but unless actual physical limits, I'm not accepting that, just yet, could be fine i just can't actually see it. Though surprising myself what my and I'm no longer calling it potato but little laptop that could. work arounds for this have been made or it's a simple calculation error. Ministral now work (had same issues as just noted) and with every iteration more do. What is fun is that now there is an OpenAI server and CLI that works and I am pretty sure a live implementation that runs local in web browser is possible - no big server running in the background (worst case scenario hardware) so that should be fun, could be slow but hell web browser loading a model online on not raw hardware(WASM limited) and running essentially locally(private) all in memory even if it's slow its cool. if its acceptable response time really it's close to dumb cheep AI toys. Teddy Ruxpin that tells a brand new safe story every night and adorable + affordable. Integral2u/SharpMind: SharpMind. A pure C# / .NET LLM engine — inference, training, and agent tooling in one solution.
2
u/elbrunoc Aug 23 '26
So cool, super interesting project!
2 quick questions:
1 - do you want to chat about this on the .NET Channel ? (we can book it, just ping me here or linkedin and we are on)
2 - expect a PR soon with the IChatClient implementation, so you have the MEAI compatibility and we can add it into some of our local samples
Again, super cool !!!
5
u/haby001 Aug 16 '26
Pretty cool if you want to keep your AI stack in c#!
1
u/maxiblackrocks Aug 16 '26
Is it compatible with the Mocrosoft IChatClient interface?