Themis.Inference.Gguf
4.6.0
dotnet add package Themis.Inference.Gguf --version 4.6.0
NuGet\Install-Package Themis.Inference.Gguf -Version 4.6.0
<PackageReference Include="Themis.Inference.Gguf" Version="4.6.0" />
<PackageVersion Include="Themis.Inference.Gguf" Version="4.6.0" />
<PackageReference Include="Themis.Inference.Gguf" />
paket add Themis.Inference.Gguf --version 4.6.0
#r "nuget: Themis.Inference.Gguf, 4.6.0"
#:package Themis.Inference.Gguf@4.6.0
#addin nuget:?package=Themis.Inference.Gguf&version=4.6.0
#tool nuget:?package=Themis.Inference.Gguf&version=4.6.0
Themis.Inference.Gguf
Themis.Inference.Gguf is an optional .NET 10 package for RLCD GGUF decision
inference and model packing. It does not contain model weights, start the
llama.cpp embeddings server, or add ONNX Runtime dependencies.
Install it when using the extracted APIs:
dotnet add package Themis.Inference.Gguf
Applications using GGUF functionality should reference this package directly
and use Themis.Inference.Gguf.Runtime. The main Themis.Inference package no
longer carries a transitive GGUF dependency.
RLCD GGUF decisions
Register the decision router and provider directly when using GGUF without the default ONNX services:
using Themis.Core;
using Themis.Core.Extensions;
using Themis.Inference.Gguf.Runtime;
services.AddThemisDecisionRouter(new DecisionRouterOptions("laya-production")
{
RouteUnspecifiedRequestsToDefaultModel = true
});
services.AddThemisRlcdGgufDecisionInference(options =>
{
options.BundleDirectory = @"C:\models\laya-gguf";
options.EmbeddingsEndpoint = new Uri("http://localhost:8080/embedding");
});
The bundle contains the GGUF backbone and local RLCD decision head. The external llama.cpp server must expose embeddings for the same backbone; Themis does not start or configure that server.
The built-in RLCD preprocessing and decision-head implementation stays
internal. To replace it while retaining the default GGUF provider, implement
IRlcdGgufDecisionContractFactory and IRlcdGgufDecisionContract, then
register the factory:
services.AddThemisRlcdGgufDecisionContractFactory<MyDecisionContractFactory>();
For a custom contractType, the manifest can omit the built-in decision-head,
tokenizer, configuration files, and head dimensions. Put contract-specific
fields in the manifest's CustomMetadata (unknown JSON properties) and
validate them in the factory's ValidateManifest method. The shared loader
still validates schema version 1, the llama.cpp-embeddings runtime, the
backbone file, declared artifact paths, and checksums; changing those bundle
or runtime boundaries requires a custom provider/loader.
The provider passes the selected contract a public IGgufEmbeddingClient.
Register IGgufEmbeddingClient with
AddThemisGgufEmbeddingClient<TClient>() to replace the default llama.cpp
HTTP transport. This allows custom request and answer semantics without
replacing the default provider lifecycle or embedding boundary.
For an unprepared local folder, packing can be opted into during registration.
The GGUF package requires the model, decision-head, tokenizer, and config
filenames, so supply their defaults once through the registration overload
rather than creating a ModelPackRequest for each run:
services.AddThemisRlcdGgufDecisionInference(
options =>
{
options.BundleDirectory = @"C:\models\laya-gguf";
options.PackOnMissingManifest = true;
},
packer =>
{
packer.DefaultModelFile = "laya-Q8_0.gguf";
packer.DefaultHeadFile = "laya-head.safetensors";
packer.DefaultTokenizerFile = "tokenizer.json";
packer.DefaultConfigFile = "rl_agent_config.json";
});
Packing remains disabled unless PackOnMissingManifest is set. Remote model
downloads additionally require AllowModelDownloads = true; downloads remain
disabled by default.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- Themis.Common (>= 4.6.0)
- Themis.Core (>= 4.6.0)
- Themis.Inference.Shared (>= 4.6.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.