SeasonLLM 0.1.0
dotnet add package SeasonLLM --version 0.1.0
NuGet\Install-Package SeasonLLM -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SeasonLLM" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SeasonLLM" Version="0.1.0" />
<PackageReference Include="SeasonLLM" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SeasonLLM --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SeasonLLM, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SeasonLLM@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SeasonLLM&version=0.1.0
#tool nuget:?package=SeasonLLM&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SeasonLLM
SeasonLLM is a small .NET wrapper around llama.cpp for local GGUF text generation.
It follows the same minimal style as SeasonImage:
- Static entry point for process-wide initialization and logging
- Separate model and context handles
- Simple completion and chat APIs
- Streaming token callbacks
- Tokenize / detokenize helpers
- Windows native runtimes can be bundled in
runtimes/win-x64/native
https://github.com/SeasonRealms/SeasonLLM
Current Scope
First-stage managed wrapper focus:
- GGUF model loading
- Context creation
- Prompt completion
- Chat completion via
llama_chat_apply_template - Streaming output
- Cancellation via
CancellationToken - Tokenization helpers
Quick Start
using SeasonLLM;
SeasonLLM.SetLogCallback((level, text) =>
{
Console.WriteLine($"[{level}] {text}");
});
using var model = SeasonLLM.CreateModel(new SeasonLlmModelOptions
{
ModelPath = @"C:\Models\Qwen3-4B-Instruct-Q4_K_M.gguf",
Backend = "cpu",
GpuLayers = 0,
UseMmap = true
});
using var ctx = model.CreateContext(new SeasonLlmContextOptions
{
ContextSize = 8192,
BatchSize = 512,
ThreadCount = Environment.ProcessorCount,
FlashAttention = false
});
var result = ctx.Chat(
[
new SeasonLlmChatMessage("system", "You are a concise assistant."),
new SeasonLlmChatMessage("user", "Explain what GGUF is in one paragraph.")
],
new SeasonLlmGenerationOptions
{
MaxTokens = 256,
Temperature = 0.7f,
TopK = 40,
TopP = 0.95f,
StopSequences = ["<|im_end|>"]
});
Console.WriteLine(result.Text);
Backend Selection
var backends = SeasonLLM.GetAvailableBackends();
Console.WriteLine(string.Join(", ", backends));
using var model = SeasonLLM.CreateModel(new SeasonLlmModelOptions
{
ModelPath = @"C:\Models\Qwen3-4B-Instruct-Q4_K_M.gguf",
Backend = "vulkan0",
// Also accepts values such as "cpu", "cuda0", "vulkan0,cpu"
GpuLayers = -1,
UseMmap = true
});
Backend limits which ggml devices llama.cpp can use instead of letting it auto-pick all available devices.
ParamsBackend is accepted for compatibility with SeasonImage-style configuration and is merged into the same native device list.
Streaming
ctx.CompleteStreaming(
"Write a short poem about local AI.",
chunk => Console.Write(chunk.Text),
new SeasonLlmGenerationOptions
{
MaxTokens = 128,
Temperature = 0.8f,
TopP = 0.95f
});
Notes
llama.cpplogging is global, just likeSeasonImageprogress and log callbacks.- The current wrapper keeps the public API intentionally small.
- Advanced features such as embeddings, LoRA, state save/load, grammar-constrained output, and KV sequence management can be added later on top of the same native binding layer.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-browser1.0 is compatible. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows10.0.19041 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- SeasonGGML (>= 0.1.0)
-
net10.0-android36.0
- SeasonGGML (>= 0.1.0)
-
net10.0-browser1.0
- SeasonGGML (>= 0.1.0)
-
net10.0-ios26.0
- SeasonGGML (>= 0.1.0)
-
net10.0-maccatalyst26.0
- SeasonGGML (>= 0.1.0)
-
net10.0-windows10.0.19041
- SeasonGGML (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 99 | 6/26/2026 |