Artificial Intelligence1 min read

Run local models in your .NET apps with Llama on Windows

By · Published by Everything Blog

In short

The utility features memory-fit indicators, hardware-tailored model suggestions, and quick chat access through an Alt+Space shortcut or web browser. To optimize machine performance, it automatically serves the underlying llama.cpp server and drops idle models from active memory after five minutes. Developers using the .NET 11 SDK can hook directly into these locally hosted models through standard OpenAI client libraries and Microsoft.Extensions.AI. The integration operates without requiring remote API keys or transmitting data across external networks.

Key points

  • Running models locally maintains total user privacy and removes recurring per-request fee…: Running models locally maintains total user privacy and removes recurring per-request fees associated with hosted artificial intelligence APIs.
  • Built-in hardware recommendations and memory-fit indicators help users download models th…: Built-in hardware recommendations and memory-fit indicators help users download models that safely operate within their physical device constraints.
  • Programmers building with the .NET 11 SDK can connect software directly to local models u…: Programmers building with the .NET 11 SDK can connect software directly to local models using standard Microsoft.Extensions.AI tooling.

Sources checked by our analysis pipeline: 1

Running AI models locally lets you keep your prompts and responses on your PC, work offline after downloading a model, and experiment without paying per request. Getting started can take some setup: finding a model that fits your hardware, downloading it, and running a server your apps can call.

Llama on Windows takes care of that for you. It’s a tray app that helps you find, download, and chat with open models on your PC. Once a model is running, your .NET apps can use it too.

In this post, you’ll install Llama, download a model, and call it from a .NET 11 C# file-based app.

You can find the complete code in the Llama on Windows .NET sample repository.

What is Llama on Windows?

Llama is a Windows 11 app that lives in your system tray. It’s built with .NET 10 and WinUI 3, it’s powered by llama.cpp, and it’s brought to you by the Hugging Face and llama.cpp teams. From the tray, you can:

- Browse models recommended for your hardware and download them in one click.

-…

Artificial Intelligence