SharpMind

A pure C#/.NET LLM engine — inference, training, and agent tooling in one solution. No wrapped native library, no P/Invoke, no platform-specific binaries.

Live in this page

SmolLM2-135M-Instruct, running client-side

(VERY SLOW) Loads and runs entirely in your browser via WebAssembly — no server, no API call leaving this tab. GitHub Pages serves the compiled runtime fine; it just can't set the cross-origin headers WASM threading needs, so this runs single-threaded on scalar kernels regardless of the machine it's on.

Loading
SmolLM2-135M-Instruct · Q3_K_M
SharpMind
Say something below once the engine reports ready.

This is the real engine running in your browser. The GGUF model is fetched from HuggingFace, loaded into the Blazor virtual filesystem, and runs inference via compiled C# — no server, no native dependencies. First load takes a moment while the ~75 MB model downloads. Source on GitHub.

What it is

One engine, not a wrapper around one

Most .NET options for running a language model are bindings over a native library written in C or C++. SharpMind's inference, training, and quantization kernels are C# from the ground up — which is also why the demo above can run directly in this page.

Inference & training
A full training loop — its own autograd engine, backprop, mixture-of-experts support — not just fine-tuning a checkpoint someone else trained. The same engine that serves a model can train one from scratch.
Zero native dependencies
No compiled C library to ship per platform. Runs anywhere the .NET runtime does — desktop, server, or, as of this patch, a browser tab via WebAssembly.
Agent tooling, gated
A built-in tool-calling loop with explicit File and Network permission checks enforced at the point of actual I/O — not just function-calling with no policy layer above it.
OpenAI-compatible server
/v1/chat/completions, streaming and non-streaming, plus model management — so anything that already speaks that API can talk to SharpMind without knowing it's C#.

Get started

Build it yourself

Clone, build, and point it at a GGUF or .smm model file.

# clone and build
git clone https://github.com/Integral2u/SharpMind.git
cd SharpMind
dotnet build

# run the terminal chat client
dotnet run --project SharpMind.CUI

# or start the OpenAI-compatible server
dotnet run --project SharpMind.Server.CLI -- --models ./models

See the README for supported model formats, the agent tooling API, and the HTTP server's full endpoint list.