Aspose.LLM for .NET
Welcome to Aspose.LLM for .NET

Aspose.LLM for .NET lets you integrate large language models into your .NET applications and run them locally — on CPU or GPU, without calling a hosted inference service. Create an API instance from a preset (Qwen 2.5, Qwen 3, Gemma 3, Llama 3.2, Phi 4, DeepSeek, and others), start chat sessions, send messages with optional image input, and save or load conversation state.
The library targets .NET Standard 2.0 and ships native llama.cpp runtimes for CPU, CUDA, HIP, Metal, and Vulkan — downloaded automatically on first use. A single NuGet package (Aspose.LLM) adds everything you need to one project.
Start with system requirements, installation, and the Hello, world! example — or jump straight into the quick-win recipes.
Product overview
Learn about Aspose.LLM for .NET, its architecture, capabilities, and supported models.
Getting started
Install, license, and run your first example.
Developer’s reference
Conceptual reference for every public type and pattern.
- AsposeLLMApi facade, presets, chat sessions, session persistence
- Parameters — 8 bags: model source, inference, context, chat, sampler, engine, binary manager, multimodal context
- Cache management, multimodal, acceleration
- Dependency injection, extensibility, logging and diagnostics
- License, API reference
See the full Developer’s reference hub.
Use cases
Build common scenarios with Aspose.LLM for .NET — full runnable code for each.
- Simple chat, multi-turn chat, save and restore session
- Custom preset, bring your own GGUF, system prompt recipes
- Vision Q&A, batch processing, multiple concurrent sessions
- CPU-only, CUDA GPU, offline, ASP.NET Core
- Long context tuning, low memory tuning
See the full Use cases hub.
How-to recipes
Short focused answers for common questions.
- Select a model by task
- Understand quantization
- Tune for speed vs quality
- Handle cancellation
- Reduce first-token latency
- Estimate memory requirements
See the full How-to recipes hub.
Troubleshooting
Diagnose and fix common problems.
- Binary download fails
- Out of memory
- GPU not detected
- Model not loading
- Garbled output
- License errors
- Performance issues
See the full Troubleshooting hub.