ZeroLlm.Core
1.2.0
dotnet add package ZeroLlm.Core --version 1.2.0
NuGet\Install-Package ZeroLlm.Core -Version 1.2.0
<PackageReference Include="ZeroLlm.Core" Version="1.2.0" />
<PackageVersion Include="ZeroLlm.Core" Version="1.2.0" />
<PackageReference Include="ZeroLlm.Core" />
paket add ZeroLlm.Core --version 1.2.0
#r "nuget: ZeroLlm.Core, 1.2.0"
#:package ZeroLlm.Core@1.2.0
#addin nuget:?package=ZeroLlm.Core&version=1.2.0
#tool nuget:?package=ZeroLlm.Core&version=1.2.0
๐ง ZeroLlm: Sovereign Pure C# Small Language Model (SLM) Runtime
Architectural Standard: 100% Pure C#, Zero Unmanaged Wrappers (no
llama.cppor Python runtime required), Zero External Dependencies, Multi-Targeting across.NET 8.0,.NET Framework 4.6.2, and.NET Standard 2.0.
ZeroLlm is an in-process, high-throughput Small Language Model (SLM) runtime and Transformer execution engine engineered for mission-critical edge gateways, industrial controllers, and enterprise agent systems. Operating within Tier 3 (Perception & AI) of the ZeroPlatform ecosystem, it bridges high-speed tokenization (ZeroTokenizer), high-dimensional similarity (ZeroVector), and cognitive swarms (ZeroAgent).
๐๏ธ Key Subsystem Capabilities
| Component | Namespace | Description |
|---|---|---|
GgufReader & GgufWriter |
ZeroLlm.Core.Format |
Pure C# binary reader and serializer for GGUF v2/v3 model formats, tensor metadata tables, and aligned tensor offsets. |
PagedKvCache |
ZeroLlm.Core.Memory |
Virtual memory page-block allocator (16 tokens/block) preventing context memory fragmentation and enabling instant prompt prefix caching. |
RmsNorm |
ZeroLlm.Core.Layers |
Allocation-free Root Mean Square Layer Normalization kernel with epsilon stability. |
RoPE |
ZeroLlm.Core.Layers |
Rotary Position Embedding kernel rotating Query and Key projections with customizable frequency scaling. |
SwiGLU |
ZeroLlm.Core.Layers |
Swish-Gated Linear Unit activation kernel for feed-forward neural layers ($Swish(gate) \odot up$). |
GqaAttention |
ZeroLlm.Core.Layers |
Grouped-Query Attention (GQA) kernel with multi-query head mapping, causal attention masking, and Paged KV-Cache retrieval. |
LlmSampler |
ZeroLlm.Core.Sampling |
Logit sampler supporting Greedy (ArgMax), Temperature scaling, Top-K, Top-P (Nucleus), and Repetition penalty. |
LlmEngine |
ZeroLlm.Core.Engine |
End-to-end execution pipeline supporting synchronous completions and asynchronous token streaming (IAsyncEnumerable<string>). |
๐ Quickstart
1. Execute Text Completion
using ZeroLlm.Core.Engine;
using ZeroLlm.Core.Sampling;
using ZeroTokenizer.Core.Bpe;
// Configure model architecture
var config = new LlmModelConfig
{
VocabSize = 32000,
EmbeddingDim = 256,
LayerCount = 4,
HeadCount = 4,
HeadCountKv = 2
};
var model = LlmModel.CreateSynthetic(config);
var tokenizer = BpeTokenizer.CreateDefault();
using var engine = new LlmEngine(model, tokenizer, SamplingConfig.Greedy);
string response = await engine.CompleteAsync("System Status: OK. Commencing pipeline diagnosis.");
Console.WriteLine(response);
2. Stream Tokens Asynchronously
await foreach (string token in engine.GenerateStreamAsync("Inspect PLC telemetry"))
{
Console.Write(token);
}
๐ License
MIT License. Copyright ยฉ 2026 Phong Vรต.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroConcurrency (>= 1.4.0)
- ZeroPrimitives.Core (>= 1.7.0)
- ZeroTensor.Core (>= 1.5.0)
- ZeroTokenizer.Core (>= 1.0.0)
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroConcurrency (>= 1.4.0)
- ZeroPrimitives.Core (>= 1.7.0)
- ZeroTensor.Core (>= 1.5.0)
- ZeroTokenizer.Core (>= 1.0.0)
-
net8.0
- ZeroConcurrency (>= 1.4.0)
- ZeroPrimitives.Core (>= 1.7.0)
- ZeroTensor.Core (>= 1.5.0)
- ZeroTokenizer.Core (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ZeroLlm.Core:
| Package | Downloads |
|---|---|
|
ZeroAgent.Core
Pure C# enterprise-grade cognitive AI Agent runtime (ReAct loop, tool registry, episodic memory via ZeroVector, and multi-agent swarm) for .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.