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
| Package | Required For | Direct dependencies |
|---|---|---|
AbstractionsNuGet ↗ | runtime-neutral contracts | None in the package family |
TensorsNuGet ↗ | tensor layout and storage metadata | None in the package family |
AccelerationNuGet ↗ | explicit backend registration, probing, selection, and fallback evidence | None in the package family |
GgufNuGet ↗ | GGUF inspection and validation | Tensors |
SamplingNuGet ↗ | token selection and stop handling | Abstractions |
Kernels.CpuNuGet ↗ | managed CPU math | Tensors |
TokenizationNuGet ↗ | tokenizer and chat-template work | Abstractions, Gguf |
Models.LlamaNuGet ↗ | LLaMA graph/session internals | Abstractions, Gguf, Kernels.Cpu, Sampling, Tensors, Tokenization |
Backends.CpuManagedNuGet ↗ | the package-visible managed CPU backend and explicit CPU fallback identity | Acceleration |
Backends.CudaNuGet ↗ | CUDA backend registration and fail-closed CUDA diagnostics | Acceleration |
Backends.DirectMLNuGet ↗ | DirectML backend registration and fail-closed DirectML diagnostics | Acceleration |
Backends.VulkanNuGet ↗ | Vulkan backend registration and fail-closed Vulkan diagnostics | Acceleration |
Backends.RocmNuGet ↗ | ROCm backend registration and fail-closed ROCm diagnostics | Acceleration |
Backends.MetalNuGet ↗ | Metal backend registration and fail-closed Metal diagnostics | Acceleration |
Backends.Cuda.Native.win-x64NuGet ↗ | the Windows x64 modern CUDA native-asset package slot | None in the package family |
Backends.Cuda.LegacyK80.win-x64NuGet ↗ | the separate Windows x64 Tesla K80 compute-capability 3.7 native-asset package slot | None in the package family |
LocalEndpointNuGet ↗ | application integration | Acceleration, Backends.CpuManaged, Models.Llama, Tokenization |
Backend lifecycle
- Register: the host explicitly adds backend instances to
RuntimeBackendRegistry. - Declare: each backend exposes identity, execution kind, supported runtime identifiers, native-asset state, and capability flags.
- Probe: the backend checks local evidence and returns devices, diagnostics, and availability.
- Select:
RuntimeBackendSelectorapplies an explicit require/prefer policy and records CPU fallback. - Execute: only a separately proven execution adapter may perform model work. Registration and declared compatibility are not substitutes.
Backends.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
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
- Encode a host-prepared prompt under explicit special-token policy.
- Evaluate prompt tokens into model and KV-cache state.
- Produce logits for the next token position.
- Select a token under explicit sampling state; LocalEndpoint uses deterministic greedy selection.
- Decode safe UTF-8 output and evaluate token/text stop conditions.
- Commit position and observable generation state, then repeat within the request bound.
Resource ownership
Roadmap integration point
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.
