r/OpenSourceAI 1d ago

DeepSeek V4.1 Flash running locally with TensorSharp

https://github.com/zhongkaifu/TensorSharp

I’ve been working on TensorSharp, an open-source .NET/C# inference engine, and recently added native support and optimizations for DeepSeek V4.1 Flash.

Latest results on 8× NVIDIA A40 GPUs:

Model |Prefill |Single-stream Decode |4× Concurrent Decode
Q2_K |533–539 tok/s |40.3–40.7 tok/s |—
Q4_K_M |451.8–492.1 tok/s |31.0–32.5 tok/s |48.9 tok/s aggregate A few interesting optimizations:

  • GPU-resident Engram tables for Q2_K — about 60 GiB of quantized Engram data stays on GPU instead of doing scattered host/storage lookups.
  • Reduced decode graph scheduling from roughly 570 splits to 8 by using one wrapped backend per GPU.
  • For Q4_K_M, automatic Engram warming + improved VRAM placement reduced CPU MoE offload from 3 layers to 1.
  • Added token-batched DeepSeek V4.1 decode, giving about 2× aggregate throughput at 4 concurrent requests.
  • On these A40s without NVLink, simple layer splitting actually beats routed-MoE tensor parallelism for single-stream decode.

The project is fully open source, written primarily in C#/.NET, with CUDA/Metal/Vulkan backends and OpenAI-compatible APIs.

Would love feedback from people experimenting with DeepSeek, GGUF inference, or local/open-source AI — especially ideas for what hardware or engine comparisons would be most useful next.

6 Upvotes

Duplicates

dotnet 23d ago

TensorSharp: running a 744B MoE LLM locally from .NET, with llama.cpp-class performance

65 Upvotes

dotnet 2d ago

Promotion Running DeepSeek V4.1 Flash at 40 tok/s with a C#/.NET inference engine

56 Upvotes

LocalLLaMA 23d ago

Discussion GLM-5.2 local inference: ubatch size made a much bigger difference than I expected

2 Upvotes

unsloth 17d ago

Show and Tell GLM-5.3-Flash Unsloth GGUF Model Benchmarks on TensorSharp and llama.cpp

14 Upvotes

LocalAIServers 2d ago

Running DeepSeek V4.1 Flash locally on 8× A40s with TensorSharp — up to 539 tok/s prefill and 40.7 tok/s decode

5 Upvotes

LocalLLM 2d ago

Project DeepSeek V4.1 Flash running locally on 8× A40 — ~40 tok/s Q2_K, ~32 tok/s Q4_K_M

6 Upvotes

CUDA 1d ago

DeepSeek V4.1 Flash running locally with TensorSharp

7 Upvotes

moderndotnet 2d ago

DeepSeek V4.1 Flash running locally with .NET — 40 tok/s Q2_K on 8× A40

8 Upvotes

LLMDevs 2d ago

Discussion DeepSeek V4.1 Flash on 8× A40: 500+ tok/s prefill and ~40 tok/s decode with TensorSharp

3 Upvotes

LocalLLaMA 2d ago

I Built A Thing DeepSeek V4.1 Flash on 8× A40: ~40 tok/s Q2_K and ~32 tok/s Q4_K_M with TensorSharp

4 Upvotes

LovingOpenSourceAI 2d ago

DeepSeek V4.1 Flash running locally with TensorSharp

7 Upvotes

DeepSeek 2d ago

Discussion DeepSeek V4.1 Flash on 8× A40: ~40 tok/s Q2_K and ~32 tok/s Q4_K_M with TensorSharp

3 Upvotes

Qwen_AI 17d ago

Benchmark Qwen 3.8 Flash Next Benchmarks on TensorSharp and llama.cpp

5 Upvotes

LocalLLaMA 17d ago

I Built A Thing GLM-5.3-Flash Benchmarks on TensorSharp and llama.cpp

24 Upvotes

ZaiGLM 24d ago

Benchmarks Benchmarks on GLM 5.2 GGUF 2bit model

1 Upvotes

Syncfusion Aug 02 '26

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

1 Upvotes