Installation
Install Aspose.LLM for .NET from NuGet and add it to your project. A single package contains the full SDK — no additional references are needed.
Prerequisites
- A supported .NET runtime. See System requirements.
- A NuGet package source reachable from your build machine (nuget.org by default).
Add the package
dotnet CLI
From your project directory:
dotnet add package Aspose.LLM
To pin a specific version:
dotnet add package Aspose.LLM --version 26.5.0
Visual Studio
- Open your solution.
- Right-click the project, choose Manage NuGet Packages.
- Browse for Aspose.LLM and click Install.
- Accept the license prompt.
Package Manager Console
Install-Package Aspose.LLM
What ships in the package
The NuGet package contains a single managed assembly: Aspose.LLM.dll. The internal assemblies (Aspose.LLM.Abstractions, Aspose.LLM.Core, Aspose.LLM.Interop) are merged into it with ILRepack, so your project references only one DLL.
Direct NuGet dependencies:
System.Text.Json8.0.0 — session serialization.Microsoft.Extensions.Logging.Abstractions2.1.1 — optionalILoggerintegration.
Additional internal package references are merged into the main assembly and do not show up as separate references in your project.
Native llama.cpp binaries are not bundled. They are downloaded from GitHub on first use.
First-run native binary download
The first time you call AsposeLLMApi.Create(preset) in a fresh environment, the SDK downloads the native llama.cpp binaries that match your platform and acceleration backend. This is a one-time operation:
- Size: 100-500 MB, depending on the acceleration backend (CUDA downloads are larger than CPU).
- Source:
github.com/ggml-org/llama.cpp/releases/tag/<ReleaseTag>(default tag:b8816). - Location: a per-user cache folder; override via
BinaryManagerParameters.BinaryPathon the preset.
Subsequent runs use the local cache.
BinaryManagerParameters.BinaryPath at the pre-populated cache folder. The same applies to Hugging Face model downloads (EngineParameters.ModelCachePath).
Verify the install
A minimal compile-only check:
using Aspose.LLM;
using Aspose.LLM.Abstractions.Parameters.Presets;
// Build should succeed after the package is restored.
_ = typeof(AsposeLLMApi);
_ = typeof(Qwen25Preset);
For a runnable first example, continue to Hello, world!.
Updating
Update to a newer version via the same tooling:
dotnet add package Aspose.LLM --version 26.6.0
Between minor versions, the API is generally stable. Between major versions, review the release notes for any breaking changes, especially to the session persistence format.
What’s next
- Licensing — apply a license; required for inference.
- Hello, world! — run the first example.
- Architecture — understand the layers and what happens on first
Create.