Skip to content
Mesilim LLC Lin ML

Mesilim LLC Lin ML

github.com • November 29, 2026

LinML (Linux ML) is WinML for Linux : an independent, open-source Linux counterpart to Windows ML (WinML) .

Just as WinML provides a unified, hardware-abstracted execution layer on Windows, LinML delivers a Linux-first inference integration layer, CLI, and catalog library for ONNX Runtime . It brings the ergonomic principles of WinML—such as the ExecutionProviderCatalog , honest device discovery, and clean hardware abstraction—to Linux environments, providing honest execution provider discovery, explicit selection policies, reproducible inference execution, and diagnosable fallback across CPU, CUDA, TensorRT, TensorRT-RTX, OpenVINO, MIGraphX, and QNN.

LinML also provides LinML.Catalog , the Linux counterpart to WinML's ExecutionProviderCatalog , which automates vendoring, SHA-256 integrity verification, dynamic registration, and session attachment for external plugin execution providers.

Quick Start 1. Install Pre-built CLI (Recommended) 2. Install C# NuGet Packages 3. Install Python Package ( linml ) 4. Build from Source

1. Install Pre-built CLI (Recommended)

2. Install C# NuGet Packages

3. Install Python Package ( linml )

Plugin Execution Providers

CLI Reference Global Options & Exit Codes Provider Discovery ( linml providers list ) Diagnostic Readiness Probe ( linml doctor ) Model Inspection ( linml inspect ) Model Inference ( linml run ) Benchmarking Suite ( linml bench ) Persistent Session Serving ( linml serve )

Global Options & Exit Codes

Provider Discovery ( linml providers list )

Diagnostic Readiness Probe ( linml doctor )

Model Inspection ( linml inspect )

Model Inference ( linml run )

Benchmarking Suite ( linml bench )

Persistent Session Serving ( linml serve )

Python Client Library ( linml )

LinML.Catalog Library

See CHANGELOG.md for full release history.

See the Compatibility Report for detailed hardware matrices, driver requirements, and known constraints.

1. Install Pre-built CLI (Recommended)

LinML CLI is distributed as a standalone, self-contained binary for Linux x86_64 and aarch64 (ARM64) with all native ONNX Runtime dependencies bundled. No .NET installation is required.

Pre-built archives ( linml- -linux-x64.tar.gz , linml- -linux-arm64.tar.gz ) and SHA-256 checksums are also downloadable directly from GitHub Releases .

Verify the installation:

2. Install C# NuGet Packages

LinML.Catalog and LinML.Contracts are published to NuGet.org and GitHub Packages:

3. Install Python Package ( linml )

LinML is also distributed as a Python package with zero required runtime dependencies and optional NumPy integration:

High-level inference with NumPy:

Linux x86_64 / aarch64 with glibc 2.28+ (tested on: Ubuntu 24.04+, Debian 12+, Fedora 40+, RHEL 9 / Rocky / Alma 9, openSUSE Tumbleweed / Leap 15.6+, Arch Linux)

.NET 10 SDK (install via scripts/setup-wsl.sh or Microsoft's dotnet-install )

(Optional) NVIDIA GPU with CUDA 12.8+ or 13.0+

Note: Alpine Linux (musl) is not supported — ONNX Runtime requires glibc.

Note: Alpine Linux (musl) is not supported — ONNX Runtime requires glibc.

Plugin Execution Providers

OpenVINO, TensorRT-RTX, MIGraphX and QNN are plugin execution providers. LinML does not link them into the CLI. It vendors a pinned build of each into ~/.local/linml-deps , checks its SHA-256, and registers it with ONNX Runtime at run time. Install them with linml catalog install , or with the standalone commands below, which need neither the LinML CLI nor a clone of this repository.

The CLI finds these in ~/.local/linml-deps automatically. Pass --root to linml catalog or linml providers list to use another location.

Sharing model. Vendoring is per-user by design: is shared by every application on the machine that runs as the same user and uses LinML's default roots, so the one-time download cost of an EP is paid once per user, not once per application. There is intentionally no system-wide install location (, ): a shared library vendor cannot coordinate root-owned state across unprivileged applications without a package manager, and on Linux that coordination job belongs to the distro, not to LinML. Applications that need isolation or a bundled offline layout can pass (CLI) or a custom catalog root (API) and vendor privately; the integrity pinning is identical either way.

An Intel CPU (with AVX), Intel integrated or discrete GPU, or Intel NPU. The plugin loads on other hardware, but it exposes no devices there (observed on an AMD Ryzen host).

ONNX Runtime 1.23 or newer. LinML ships ONNX Runtime 1.31.

The plugin is published on PyPI as an x86_64 Linux wheel only.

An NVIDIA GPU, with a driver that supports CUDA 13. NVIDIA's TensorRT-RTX 1.6 matrix targets compute capabilities 7.5, 8.6, 8.9, 12.0 and 12.13. linml setup recommends the plugin for RTX Ampere and newer GPUs.

ONNX Runtime 1.24 or newer. LinML ships ONNX Runtime 1.31.

WSL2: the stock wheel exposes no GPU devices, because WSL's virtual PCI bus blocks enumeration. Install the patched build as well (see Standalone download ).

aarch64: the wheel is built for manylinux_2_35 (glibc 2.35 or newer). The aarch64 build is not yet verified on aarch64 hardware.

The wheel ships NVIDIA's license terms and acknowledgements, and TensorRT-RTX is subject to them.

Linux aarch64 with a Qualcomm Snapdragon NPU (Hexagon HTP). On x86_64 hosts the catalog reports QNN as not applicable.

ONNX Runtime 1.24.1 or newer.

Not verified on hardware: no Snapdragon NPU was available for testing.

An AMD GPU, with ROCm installed at /opt/rocm and MIGraphX 2.17 or newer. The plugin loads libmigraphx_c.so.3 . Check it with ls /opt/rocm/lib/libmigraphx_c.so.3 .

ONNX Runtime 1.24 or newer.

Standalone download (no CLI, no clone)

These commands use only curl , sha256sum , unzip , and mktemp . Each downloads from the pinned URL, verifies the SHA-256, and installs into ~/.local/linml-deps . Each runs in a subshell, so a failed check stops that block and not your terminal.

TensorRT-RTX wheel (x86_64 or aarch64). Run this on every TensorRT-RTX host, including WSL2:

TensorRT-RTX patched build (WSL2 only). Run this after the wheel block above. The patched build links the runtime libraries that only the wheel bundles:

MIGraphX (AMD ROCm hosts):

Or download the one script that does all of the above, and run it:

The script needs curl , sha256sum and python3 . Its pins are the ones in the commands above.

--require-provider makes a missing plugin fail with exit code 3 , instead of falling back to CPU. A successful TensorRT-RTX run prints Provider: NvTensorRTRTXExecutionProvider (requested: NvTensorRTRTXExecutionProvider) .

TensorRT-RTX on WSL2 is listed as registered; no EP devices , and runs fail with exit code 3 . The stock wheel alone exposes no devices under WSL2, and linml doctor says so. Install the patched build ( linml setup --trt-rtx-wsl2 , or the standalone block above). LINML_TRT_RTX_WSL2=0 keeps the stock wheel, which still exposes no devices on WSL2.

OpenVINO is listed but runs fail with exit code 3 . The plugin loaded, but this host has no Intel CPU, GPU or NPU. Run it on Intel hardware.

linml doctor reports MIGraphX as NOT APPLICABLE, or a run fails with libmigraphx_c.so.3: cannot open shared object file . The plugin needs an AMD GPU with ROCm and MIGraphX 2.17 or newer. The host does not have them. With --require-provider the run exits with code 3 .

available for linux-x64 only . That plugin has no build for this architecture. MIGraphX and OpenVINO are x86_64 only.

Remove the plugins: rm -rf ~/.local/linml-deps/ep-plugins/{openvino,trt-rtx,trt-rtx-wsl2,migraphx,qnn} .

Global Options & Exit Codes

All subcommands accept:

--json : Output machine-readable JSON to stdout instead of formatted plain text.

Execution Provider Catalog ( linml catalog )

Inspect the multi-provider catalog and download/install pinned plugin execution providers (OpenVINO, TensorRT-RTX, MIGraphX, QNN) directly through the CLI without external shell or Python dependencies: For OpenVINO, TensorRT-RTX, MIGraphX and QNN requirements and standalone downloads that need no CLI, see Plugin Execution Providers .

Hardware Auto-Setup ( linml setup )

Hardware-aware environment bootstrap and installer. Probes host compute accelerators (NVIDIA GPUs, Intel CPUs/GPUs, AMD ROCm GPUs, and CPU vector extensions) and automatically installs matching catalog execution provider plugins:

setup also vendors the native GPU runtime libraries the NVIDIA providers load (cuDNN 9 and TensorRT 10, via pinned pip install --target into ~/.local/linml-deps ) when an NVIDIA GPU is detected. linml loads them itself at startup, so LD_LIBRARY_PATH / source scripts/env-gpu-deps.sh is no longer required for the TensorRT and CUDA EPs; a library already resolvable by name (your own LD_LIBRARY_PATH or a system install) is left alone. Requires pip3 (or python3 -m pip ); without it that step is reported as skipped and the rest of setup still completes. GPU libraries are only installed on an NVIDIA linux-x64 host, also with --all .

OpenVINO is recommended only when an Intel CPU or GPU is detected: the plugin EP registers on other vendors but exposes no devices (observed on AMD Ryzen). --all still installs it.

--dry-run : Probe hardware and display proposed installation plan without downloading or modifying files.

--force : Force re-download and re-installation even if already present.

--all : Install all catalog plugins regardless of detected hardware.

--trt-rtx-wsl2 : Opt in to the LinML-hosted patched TensorRT-RTX EP for WSL2 (requires WSL2 and an RTX Ampere+ GPU; installs the stock trt-rtx wheel first for its runtime libraries). When WSL2 and a supported GPU are detected, linml setup lists it under "Opt-in available" but never installs it without this flag. On WSL2 the patched build is preferred over the stock wheel automatically.

--root : Custom catalog install root directory.

--json : Output machine-readable JSON hardware inventory, recommendations, and action plan.

Provider Discovery ( linml providers list )

Inspect the ONNX Runtime version, available execution providers, detected accelerators, and hardware diagnostics:

Output includes runtime version, registered providers (including dynamic plugins), and hardware evidence from nvidia-smi or sysfs:

Diagnostic Readiness Probe ( linml doctor )

Diagnose execution provider readiness before running production models. Detects missing shared libraries, driver mismatches, or missing cuDNN dependencies. Inspects both runtime providers and catalog plugin providers, reporting readiness and providing clear install hints (e.g. Run 'linml catalog install openvino' to vendor missing libraries ) for uninstalled plugins:

Model Inspection ( linml inspect )

Inspect ONNX model graph structure, input/output tensors, opset versions, custom metadata, and execution provider compatibility warnings without running inference . Useful for CI validation, model cataloging, and debugging EP suitability before deployment.

Example Human-Readable Output:

JSON Output Schema (abridged):

--model : Path to the ONNX model file (required).

--json : Output machine-readable JSON to stdout instead of formatted plain text.

1 : Inspection failed (model corrupt, parse error, etc.)

2 : Invalid arguments (missing --model , file not found)

CI gating : Validate model structure before deployment ( linml inspect --model model.onnx --json | jq '.graph.operators' )

EP suitability : Quick check if a model will run well on TensorRT, CUDA, OpenVINO, MIGraphX without provisioning hardware

Model cataloging : Record SHA-256, tensor signatures, and opset imports in a model registry

Debugging : Identify dynamic dimensions, unsupported operators, or opset mismatches before runtime failures

Model Inference ( linml run )

Execute one-shot inference on an ONNX model. If --provider requests a catalog plugin (such as trt-rtx , openvino , or migraphx ), LinML automatically resolves and registers vendored libraries from the catalog cache ( ~/.cache/linml/ep-plugins or ~/.local/linml-deps ) when --ep-library is omitted:

--provider : Preferred execution provider. Accepts aliases ( cpu , cuda , trt , trt-rtx , openvino / ov , migraphx , qnn ) or full EP names ( CUDAExecutionProvider ). Automatically resolves vendored catalog plugins when --ep-library is omitted.

--require-provider : Strict mode — exits with code 3 if the preferred provider cannot be used (disables fallback to CPU). If a requested plugin is missing, suggests linml catalog install .

--profile : Enables ONNX Runtime profiling and reports per-node operator placement.

--ep-option key=value or --ep-option provider:key=value : Provider-specific options (repeatable, e.g. --ep-option trt:trt_engine_cache_enable=1 ).

--ep-library name=path : Register a dynamic plugin EP shared library (repeatable, e.g. --ep-library NvTensorRTRTXExecutionProvider=/path/to/lib.so ).

--json : Output result as JSON.

(Supports float32 , float16 , int64 , and int32 ) . See Input Schema .

Benchmarking Suite ( linml bench )

Benchmark model inference latency, percentiles, throughput, and cold-start overhead across execution providers:

--model : Path to the ONNX model file (required).

--inputs : Path to the inputs JSON file (required).

--provider : Preferred execution provider to benchmark.

--all-ready : Benchmark all ready providers on the system side-by-side.

--warmup : Number of warmup iterations before timing (default: 5 ).

--iterations : Number of timed measurement iterations (default: 50 ).

--ep-option key=value : Provider-specific options (repeatable).

--ep-library name=path : Register a dynamic plugin EP shared library (repeatable).

--root : Custom catalog install root directory.

--json : Output machine-readable JSON metrics including cold start, mean, min, max, p50, p90, p95, and p99.

Persistent Session Serving ( linml serve )

When performing repeated inference, one-shot process startup adds overhead. linml serve keeps a long-lived ONNX session warm in memory and serves inference requests either as an HTTP REST daemon or over JSON Lines stdio :

1. HTTP REST Daemon Mode ( --port )

Run as a local HTTP microservice:

Endpoints : GET /health or GET /v1/health : Readiness probe returning model metadata, selected provider, and fallback chain. POST /v1/models/predict or POST /predict : Submit JSON tensor inputs {"tensors":[...]} and receive structured InferenceResult . POST /shutdown or POST /v1/shutdown : Gracefully shut down the server.

GET /health or GET /v1/health : Readiness probe returning model metadata, selected provider, and fallback chain.

POST /v1/models/predict or POST /predict : Submit JSON tensor inputs {"tensors":[...]} and receive structured InferenceResult .

POST /shutdown or POST /v1/shutdown : Gracefully shut down the server.

2. JSON Lines Stdio Mode (Default)

When --port is omitted, requests are streamed over stdin/stdout:

Protocol : stdin : Send one input JSON request per line: {"tensors":[...]} stdout : Emits one InferenceResult JSON object per line. Errors: Emits {"error":"..."} for bad inputs without terminating the server. Shutdown: Send EOF ( Ctrl+D or closing stdin) to shut down cleanly with exit code 0 .

stdin : Send one input JSON request per line: {"tensors":[...]}

stdout : Emits one InferenceResult JSON object per line.

Errors: Emits {"error":"..."} for bad inputs without terminating the server.

Shutdown: Send EOF ( Ctrl+D or closing stdin) to shut down cleanly with exit code 0 .

Latency Advantage : Post-warmup latency drops from ~2.6 seconds per cold startup down to ~1 ms per request .

Python Client Library ( linml )

The linml Python package brings LinML's hardware abstraction, daemon serving, and diagnostic inspection to Python ML pipelines and Jupyter notebooks.

1. In-Memory Inference Session

linml.InferenceSession manages an underlying linml serve process with an in-memory session, delivering ~1 ms inference latency with automatic resource cleanup:

2. HTTP REST Daemon Client ( linml.InferenceClient )

Connect directly to any remote or containerized linml serve --port microservice:

3. Model Inspection & Diagnostics

Inspect model graph topology, inputs/outputs, and execution provider compatibility warnings from Python:

LinML.Catalog Library

LinML.Catalog is the Linux counterpart to the Windows ML ExecutionProviderCatalog . It unifies execution provider discovery, readiness probing, vendoring of pinned plugin EPs (with SHA-256 integrity verification), registration, and session attachment.

Built-in EPs : CPUExecutionProvider , CUDAExecutionProvider , and TensorrtExecutionProvider

Plugin EPs : OpenVINOExecutionProvider (1.6.1), NvTensorRTRTXExecutionProvider (0.5.0), and MIGraphXExecutionProvider (2611.1)

The CLI and library a unified plugin registry ( PluginLibraryRegistry ), so libraries configured via --ep-library or LINML_EP_LIBRARIES are immediately visible to the catalog and vice versa.

LinML enforces strict dependency separation across its components:

LinML.Contracts : Pure contracts, model abstractions, request/response models, and readiness types. Zero external dependencies on ONNX Runtime.

LinML.Policy : Implementation of provider selection rules and fallback policies. Depends only on LinML.Contracts .

LinML.Catalog : Library for vendoring, staging, and registering plugin EPs. Published package on NuGet.

LinML.Runtime.Onnx : Adapter bridging Contracts to native ONNX Runtime sessions, probes, and hardware discovery.

LinML.Cli : Composition root combining all layers into the linml executable.

ADR 0001: Runtime and Deployment Strategy

ADR 0002: Multi-EP and Plugin Strategy

Hardware Compatibility Report

Diagnostics Schema & Serve Protocol

Input Schema Reference

WSL2 Development Workflow

This project is licensed under the MIT License .