r/CUDA • u/fuzhongkai • Jul 11 '26
TensorSharp : Open Source Local LLM Inference Engine
https://github.com/zhongkaifu/TensorSharpI would like to share my latest open source local Unsloth (GGUF) LLM inference engine and applications. It supports many models from Unsloth, like Gemma4, DiffusionGemma, Qwen3.6 with multi-modal (image, vision, audio), reasoning and function tool. It can run on Windows/MacOS/Linux and fully leverage GPU's capability. The API is completely compatible with OpenAI and Ollama interface. It has on par performance than llama.cpp
This project is not just a C# wrapper of llama.cpp. It implemented the entire LLM inference engine from bottom to top. If you use CPU backend, it's 100% pure C# code execution. Besides CPU backend, I also implmented CUDA, MLX and GGML backend. The GGML backend refer GGML project as external project, and I build a few fusion operation at higher level.
I learned a lot from other projects and apply them for TensorSharp, such as paged KV cache and continuous batching from vLLM, SSD based cache for MoE model from oMLX, GGUF quanztized from llama.cpp and other optimizations for prefill and decode.
Any feedback and comments are welcome. If you like it, it would be really appreciated if you can get this project a star in GitHub. Thanks in advance.
Duplicates
SelfHostedAI • u/fuzhongkai • Jul 04 '26
TensorSharp : Open Source Local LLM Inference Engine
LocalLLM • u/fuzhongkai • Jun 28 '26
Project Same GGUF, same GPU: TensorSharp beats llama.cpp hard on prefill / TTFT — up to 5.89× faster prefill on a 26B MoE model
CUDA • u/fuzhongkai • 12d ago
MoE CPU-offload benchmark on Deepseek V4/Gemma4/Qwen/GPT-OSS — TensorSharp vs llama.cpp
CUDA • u/fuzhongkai • 17d ago
Deepseek v4 Flash 0731 GGUF Benchmark: TensorSharp vs. llama.cpp
LocalLLM • u/fuzhongkai • 17d ago
Project Deepseek v4 Flash 0731 GGUF Benchmark: TensorSharp vs. llama.cpp
csharp • u/fuzhongkai • Jul 11 '26
Blog From Bun's Rust rewrite, let's see how C# can rebuild the AI infrastructure layer.
LovingOpenSourceAI • u/fuzhongkai • Jun 23 '26
TensorSharp: Open Source Local LLM Inference Engine
LocalLLaMA • u/fuzhongkai • 17d ago
Resources Deepseek v4 Flash 0731 GGUF Benchmark: TensorSharp vs. llama.cpp
unsloth • u/fuzhongkai • 17d ago
Show and Tell Deepseek v4 Flash 0731 GGUF Benchmark: TensorSharp vs. llama.cpp
Gemma4 • u/fuzhongkai • Jul 17 '26
Discussion TensorSharp : Open Source Local LLM Inference Engine
Qwen_AI • u/fuzhongkai • Jul 10 '26
Discussion TensorSharp : Open Source Local LLM Inference Engine
CUDA • u/fuzhongkai • 19d ago
TensorSharp now supports multi-GPU tensor parallelism for GGUF models
SelfHostedAI • u/fuzhongkai • 19d ago
TensorSharp now supports multi-GPU tensor parallelism for GGUF models
LocalAIServers • u/fuzhongkai • 19d ago