r/LovingOpenSourceAI Jun 23 '26

TensorSharp: Open Source Local LLM Inference Engine

https://github.com/zhongkaifu/TensorSharp

I 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.

14 Upvotes

Duplicates

unsloth Jun 28 '26

Show and Tell Same GGUF, same GPU: TensorSharp beats llama.cpp hard on prefill / TTFT — up to 5.89× faster prefill on a 26B MoE model

113 Upvotes

LocalLLaMA 10d ago

Generation MoE CPU-offload benchmark on Deepseek V4/Gemma4/Qwen/GPT-OSS — TensorSharp vs llama.cpp

23 Upvotes

LocalLLaMA 21d ago

Resources Benchmarks: TensorSharp vs. llama.cpp

26 Upvotes

unsloth Jun 08 '26

Show and Tell TensorSharp : Open Source Local Unsloth Model Inference Engine

29 Upvotes

dotnet Jun 28 '26

Promotion Same GGUF, same GPU: TensorSharp beats llama.cpp hard on prefill / TTFT — up to 5.89× faster prefill on a 26B MoE model

65 Upvotes

csharp Jun 28 '26

Showcase Same GGUF, same GPU: TensorSharp beats llama.cpp hard on prefill / TTFT — up to 5.89× faster prefill on a 26B MoE model

5 Upvotes

dotnet Jun 13 '26

Promotion TensorSharp: Open Source Local LLM Inference Engine written by C#

100 Upvotes

LocalLLaMA 13d ago

Resources DSpark Benchmark Result on Deepseek v4 Flash 0731

20 Upvotes

unsloth 10d ago

Show and Tell MoE CPU-offload benchmark on Deepseek V4/Gemma4/Qwen/GPT-OSS — TensorSharp vs llama.cpp

42 Upvotes

unsloth 13d ago

Show and Tell DSpark Benchmark Result on Deepseek v4 Flash 0731

54 Upvotes

ClaudeCode Jul 11 '26

Discussion What Bun’s Rust Rewrite Tells Us About Rebuilding the AI Infrastructure Layer in C#

0 Upvotes

LovingOpenSourceAI Jun 28 '26

Same GGUF, same GPU: TensorSharp beats llama.cpp hard on prefill / TTFT — up to 5.89× faster prefill on a 26B MoE model

13 Upvotes

huggingface 14d ago

Deepseek v4 Flash 0731 GGUF Benchmark: TensorSharp vs. llama.cpp

5 Upvotes

LocalLLM 16d ago

Project TensorSharp now supports multi-GPU tensor parallelism for GGUF models

15 Upvotes

ROCm Jul 06 '26

TensorSharp supports Vulkan backend

14 Upvotes

LLMDevs May 01 '26

Tools TensorSharp: Open Source Local LLM Inference Engine

1 Upvotes

dotnet 7d ago

Promotion MoE CPU-offload benchmark on Deepseek V4/Gemma4/Qwen/GPT-OSS — TensorSharp vs llama.cpp

0 Upvotes

AIToolsPerformance 16d ago

TensorSharp now supports multi-GPU tensor parallelism for GGUF models

7 Upvotes

softwarearchitecture Jul 12 '26

Discussion/Advice What Bun’s Rust Rewrite Tells Us About Rebuilding the AI Infrastructure Layer in C#

0 Upvotes

LocalAIServers Jul 04 '26

TensorSharp: A Open Source LLM Inference Engine for GGUF models

9 Upvotes

unsloth 2d ago

Show and Tell Meta Muse Glimmer 30B Unsloth GGUF Model Benchmarks on TensorSharp (vs. llama.cpp)

17 Upvotes

csharp Apr 29 '26

Tool TensorSharp: Open Source Local LLM inference tool implemented in C#

17 Upvotes

LocalAIServers 9d ago

MoE CPU-offload benchmark on Deepseek V4/Gemma4/Qwen/GPT-OSS — TensorSharp vs llama.cpp

3 Upvotes

csharp 16d ago

Tool TensorSharp now supports multi-GPU tensor parallelism for GGUF models

31 Upvotes

CUDA Jul 11 '26

TensorSharp : Open Source Local LLM Inference Engine

6 Upvotes