cd /news/artificial-intelligence/show-hn-tensorsharp-open-source-loca… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-53583] src=tensorsharp.ai β†— pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Show HN: TensorSharp: Open-Source Local LLM Inference Engine

TensorSharp, an open-source local LLM inference engine for GGUF models, has been released by developer Zhongkai Fu. The .NET-based engine runs on personal hardware, supports NVIDIA, AMD, Intel, and Apple Silicon, and offers Ollama- and OpenAI-compatible APIs, providing a private, cost-free alternative to cloud-based AI services.

read3 min views1 publishedJul 10, 2026

A native .NET LLM inference engine for GGUF models β€” with a command-line tool, a browser chat server, and Ollama- & OpenAI-compatible APIs for programmatic access.

Everything runs on your own hardware: your laptop, workstation, or server. No data leaves the machine, there are no per-token fees, and the same engine powers a quick command-line test, a shared internal chatbot, and a production REST endpoint. This wiki is the complete guide β€” pick a starting point below or use / to search.

Explore the wiki #

πŸš€

Getting Started

Prerequisites, build, download a model, and stream your first reply.

⌨️

Command Line

Run prompts, images, audio, batches, and benchmarks from the CLI.

🌐

Server & Web UI

Host a browser chatbot and HTTP endpoints on localhost.

πŸ”Œ

HTTP API

Call it from curl, Python, or any Ollama/OpenAI client.

🧩

C# Library

Embed the engine directly in your .NET application.

πŸ“š

API Reference

Searchable tables of flags, env vars, endpoints, and types.

🧠

Models

Supported architectures, downloads, multimodal, and reasoning.

πŸ“–

Glossary & FAQ

New to LLMs? Plain-language definitions and common questions.

Quick start in ~30 seconds #

After installing the .NET 10 SDK, you are four commands away from a streaming reply (model download aside).

Clone & build

The native GGML library compiles automatically on the first build.

git clone https://github.com/zhongkaifu/TensorSharp.git
cd TensorSharp
dotnet build TensorSharp.slnx -c Release

Download a model

A small, well-tested starting point is

Gemma-4-E4B (Q8_0) from Hugging Face. More inModel downloads. -

Run it

Pick the

for your hardware.--backend

echo "Explain mixture-of-experts in one sentence." > prompt.txt

./TensorSharp.Cli --model gemma-4-E4B-it-Q8_0.gguf --input prompt.txt --backend ggml_metal

./TensorSharp.Cli --model gemma-4-E4B-it-Q8_0.gguf --input prompt.txt --backend ggml_cuda

Prefer a UI + API?

Start the server and open the browser chat β€” it also serves the compatibility endpoints.

./TensorSharp.Server --model gemma-4-E4B-it-Q8_0.gguf --backend ggml_metal

Why TensorSharp? #

Private by default

Inference happens on your hardware. Prompts, documents, and images never leave the machine.

No per-token bill

Run as much as your hardware allows β€” predictable cost, no metered API.

Drop-in compatible

Speaks the Ollama and OpenAI wire formats, so existing tools and SDKs just work.

Runs anywhere

NVIDIA (CUDA), AMD / Intel / NVIDIA (Vulkan), Apple Silicon (Metal/MLX), or pure CPU β€” with automatic fallbacks.

Modern model support

Gemma, Qwen, GPT-OSS, Nemotron-H, Mistral, plus vision, audio, reasoning & tools.

Built in .NET

A native C# engine you can embed in your apps, not just a black-box binary.

🏁

Benchmarked vs llama.cpp

On identical GGUF files and the same GPU it trades wins with the C++ engine: the 26B-A4B MoE prefills 1.32Γ— faster with first tokens 1.30Γ— sooner, 12B wins or ties every decode scenario (1.17Γ—), and JSON-mode decode streams 7.7Γ— faster on E4B.

Who is this for? #

TensorSharp serves a wide range of visitors. Here is the fastest path for each.

Beginners & students

Start with the Glossary & FAQ, then Getting Started.

Developers

Jump to the HTTP API, C# Library, and API Reference.

Senior / principal engineers

Read Advanced Features β€” paged KV, continuous batching, speculative decoding.

Managers, CTOs & CEOs

See the business value and capability matrix.

Sales & marketing

Use the feature catalog and benchmarks for positioning.

Researchers & professors

Explore model architectures and the head-to-head benchmarks.

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @tensorsharp 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-tensorsharp-…] indexed:0 read:3min 2026-07-10 Β· β€”