starling
Local AI in .NET, with no Python sidecar and no API key: embeddings, entity extraction, image and video search and chat on ONNX Runtime (CPU/CUDA), through Micr
What is starling?
Local AI in .NET, with no Python sidecar and no API key: embeddings, entity extraction, image and video search and chat on ONNX Runtime (CPU/CUDA), through Microsoft.Extensions.AI.
Overview of starling
What it is
Starling is a .NET library that packages open AI models as ordinary NuGet packages. It runs locally on ONNX Runtime (CPU or CUDA) without a Python sidecar or an API key. The models integrate with Microsoft.Extensions.AI interfaces such as IEmbeddingGenerator and IChatClient, allowing code written for hosted providers to switch to local models with minimal changes. Each model is pinned to an exact upstream commit, verified by SHA-256, and checked against the original implementation before release.
Key features
- Runs entirely in .NET with no Python dependency and no API key required.
- Provides embeddings, entity extraction, image and video search, and chat capabilities.
- Integrates with Microsoft.Extensions.AI (IEmbeddingGenerator, IChatClient) for easy swapping between hosted and local models.
- Models are pinned to specific upstream commits, verified by SHA-256, and tested against original implementations.
- Supports both CPU and CUDA execution via ONNX Runtime.
- Includes sample programs for local RAG, multilingual ticket triage, and text-to-image search.
Use cases
- Local question answering over a folder of documents (Markdown, text files) using embeddings and a small chat model.
- Multilingual ticket triage: train a router on English tickets and route tickets in German, Spanish, French, Japanese with the same model, extracting entities with GLiNER2.
- Searching a folder of photos using a text query by embedding both text and images in the same space.
- Semantic search in multiple languages (e.g., finding which river runs through Cologne in German).
- Streaming chat with a local model through IChatClient.
Getting started
Requires the .NET 10 SDK. To run a multilingual semantic search example:shdotnet new console -o search && cd searchdotnet add package Starlings.Models.E5.Extensions.AIdotnet add package Microsoft.ML.OnnxRuntime --version 1.30.0Replace Program.cs with the code provided in the README, then run:shdotnet runThe first run downloads the model (about 487 MB) into the user cache; later runs work offline. For local chat, add packages Starlings.Models.Qwen35.Extensions.AI and Microsoft.ML.OnnxRuntimeGenAI 0.17.1, then use the provided C# code.
License and pricing
The project is licensed under Apache-2.0 and is open source. No pricing information is stated.
Based on the project's public README and repository metadata.