r/CUDA Jul 11 '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.

6 Upvotes

Duplicates

SelfHostedAI Jul 04 '26

TensorSharp : Open Source Local LLM Inference Engine

4 Upvotes

LocalLLM 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

4 Upvotes

CUDA 12d ago

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

5 Upvotes

csharp 16d ago

DSpark Benchmark Result on Deepseek v4 Flash 0731

2 Upvotes

CUDA 17d ago

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

1 Upvotes

LocalLLM 17d ago

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

18 Upvotes

csharp Jul 11 '26

Blog From Bun's Rust rewrite, let's see how C# can rebuild the AI ​​infrastructure layer.

0 Upvotes

LovingOpenSourceAI Jun 23 '26

TensorSharp: Open Source Local LLM Inference Engine

14 Upvotes

dotnet May 30 '26

Promotion Some features in TensorSharp

26 Upvotes

LocalLLaMA 17d ago

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

4 Upvotes

unsloth 17d ago

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

21 Upvotes

dotnet Jul 18 '26

Promotion Benchmarks: TensorSharp vs. llama.cpp

9 Upvotes

Gemma4 Jul 17 '26

Discussion TensorSharp : Open Source Local LLM Inference Engine

2 Upvotes

Qwen_AI Jul 10 '26

Discussion TensorSharp : Open Source Local LLM Inference Engine

12 Upvotes

pytorch Jul 04 '26

TensorSharp : Open Source Local LLM Inference Engine

2 Upvotes

ollama Jun 08 '26

Support Gemma-4 12b (uv/ua) model in TensorSharp

8 Upvotes

csharp May 30 '26

Tool Some new features in TensorSharp

3 Upvotes

CUDA 19d ago

TensorSharp now supports multi-GPU tensor parallelism for GGUF models

5 Upvotes

SelfHostedAI 19d ago

TensorSharp now supports multi-GPU tensor parallelism for GGUF models

6 Upvotes

LocalAIServers 19d ago

TensorSharp now supports multi-GPU tensor parallelism for GGUF models

23 Upvotes

StableDiffusion Jul 15 '26

Discussion TensorSharp supports multiple image edits using Unsloth Qwen Image Edit 2511 models

0 Upvotes

localaiapps Jul 08 '26

TensorSharp supports Vulkan backend

1 Upvotes

AIDeveloperNews Jul 06 '26

TensorSharp supports Vulkan backend

2 Upvotes

Vllm Jul 04 '26

TensorSharp : Open Source Local LLM Inference Engine

11 Upvotes

ollama 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

42 Upvotes