LMRuntime.com / Public page

Architecture

The layered package and execution architecture from trusted local model identity through GGUF, tokenization, tensors, CPU kernels, LLaMA sessions, sampling, and the application facade.

UAIX.LmRuntime separates the model pipeline, backend-selection control plane, backend registration packages, native-asset identities, and application facade. Install the package that owns the exact layer your host must control.

Package dependency map

The diagram shows responsibility lanes. It does not imply that every package depends on every item above it. Exact direct dependencies appear in the table below, every package guide, and each NuGet page.

Layer ownership

PackageRequired ForDirect dependencies
Abstractions
NuGet ↗
runtime-neutral contractsNone in the package family
Tensors
NuGet ↗
tensor layout and storage metadataNone in the package family
Acceleration
NuGet ↗
explicit backend registration, probing, selection, and fallback evidenceNone in the package family
Gguf
NuGet ↗
GGUF inspection and validationTensors
Sampling
NuGet ↗
token selection and stop handlingAbstractions
Kernels.Cpu
NuGet ↗
managed CPU mathTensors
Tokenization
NuGet ↗
tokenizer and chat-template workAbstractions, Gguf
Models.Llama
NuGet ↗
LLaMA graph/session internalsAbstractions, Gguf, Kernels.Cpu, Sampling, Tensors, Tokenization
Backends.CpuManaged
NuGet ↗
the package-visible managed CPU backend and explicit CPU fallback identityAcceleration
Backends.Cuda
NuGet ↗
CUDA backend registration and fail-closed CUDA diagnosticsAcceleration
Backends.DirectML
NuGet ↗
DirectML backend registration and fail-closed DirectML diagnosticsAcceleration
Backends.Vulkan
NuGet ↗
Vulkan backend registration and fail-closed Vulkan diagnosticsAcceleration
Backends.Rocm
NuGet ↗
ROCm backend registration and fail-closed ROCm diagnosticsAcceleration
Backends.Metal
NuGet ↗
Metal backend registration and fail-closed Metal diagnosticsAcceleration
Backends.Cuda.Native.win-x64
NuGet ↗
the Windows x64 modern CUDA native-asset package slotNone in the package family
Backends.Cuda.LegacyK80.win-x64
NuGet ↗
the separate Windows x64 Tesla K80 compute-capability 3.7 native-asset package slotNone in the package family
LocalEndpoint
NuGet ↗
application integrationAcceleration, Backends.CpuManaged, Models.Llama, Tokenization

Backend lifecycle

  1. Register: the host explicitly adds backend instances to RuntimeBackendRegistry.
  2. Declare: each backend exposes identity, execution kind, supported runtime identifiers, native-asset state, and capability flags.
  3. Probe: the backend checks local evidence and returns devices, diagnostics, and availability.
  4. Select: RuntimeBackendSelector applies an explicit require/prefer policy and records CPU fallback.
  5. Execute: only a separately proven execution adapter may perform model work. Registration and declared compatibility are not substitutes.
Current distinctionBackends.CpuManaged reports available without native assets. The GPU registration packages expose fail-closed diagnostics until an executable adapter is proven by the host.

Managed model load path

Canonical pathSHA-256 + byte countGGUF structureTokenizer metadataLLaMA tensor bindingManaged model

LocalEndpoint performs the application-facing path. It constrains file identity before parsing, loads the bounded GGUF catalog, creates tokenizer state, validates model configuration, binds mapped weights, and exposes a disposable model scope.

Generation loop

  1. Encode a host-prepared prompt under explicit special-token policy.
  2. Evaluate prompt tokens into model and KV-cache state.
  3. Produce logits for the next token position.
  4. Select a token under explicit sampling state; LocalEndpoint uses deterministic greedy selection.
  5. Decode safe UTF-8 output and evaluate token/text stop conditions.
  6. Commit position and observable generation state, then repeat within the request bound.

Resource ownership

Runtime scopeOwns loaded models and the managed backend identity selected for the facade path.
ModelOwns mapped model bytes, parsed configuration, tokenizer, bound weights, and session creation.
SessionOwns position, KV-cache state, generation continuity, and immutable UAIX context evidence.
HostOwns files, hashes, licensing, prompt construction, persistence, network, tools, commands, UI, audit, cancellation, and deployment review.

Roadmap integration point

Host layer onlyThe Evidence-Gated Adaptive Runtime Control roadmap sits above this package graph. It observes public package state and may invoke only pre-authorized host actions; it does not become a hidden package dependency or alter model weights, tokenizer behavior, tensor values, or backend proof rules.

Host boundary

The packages do not download models, host an HTTP server, call a provider API, install GPU drivers, grant authority through memory, or silently change execution lanes. Hosts must retain explicit configuration, package locks, local probe results, model identities, and application-specific compatibility evidence.