Skip to main content

Zenthrix

Hardware-Adaptive Edge Neural Graph Compiler

PyPI Release License CI

Zenthrix is an edge-native model compiler frontend for compiling open-weight neural networks (LLMs, SLMs, and vision models) into zero-copy, memory-optimized binaries tailored for consumer edge silicon — Apple Silicon, Qualcomm Snapdragon NPU, and Arm Cortex/Ethos.


Table of Contents


Key Features

  • Direct Ingestion — Native loaders for SafeTensors, ONNX, PyTorch Export (AOTInductor), and GGUF architectures, with no intermediate format conversion required.
  • Unified Memory Tiling — Schedules compute passes against unified memory architectures, reducing peak active RAM allocation by up to 40%.
  • Zero-Copy Runtime — Emits standalone, relocatable .zx binaries that execute locally without a heavy Python runtime dependency.
  • Privacy-First Compilation — Models compile entirely on-device; weights and computational graphs never leave the local environment.

Installation

Install the precompiled command-line client and runtime via pip:

pip install zenthrix

You can also install and run it with uv:

uv tool install zenthrix
zenthrix --version

For a one-off invocation without installing the command globally:

uvx zenthrix --version

System Requirements

Platform Minimum Version
macOS 14.0+ (Apple Silicon M1/M2/M3/M4)
Linux Ubuntu 22.04+ (aarch64 / x86_64)
Android NDK r25+ (for targeting Snapdragon platforms)

Quickstart

1. Compile a Model

Compilation requires the separately distributed native engine. Without it, the CLI reports an actionable error rather than producing an invalid .zx file.

Compile an ONNX or GGUF model targeting local hardware execution:

zenthrix compile \
  --model meta-llama/Llama-3.2-1B-Instruct \
  --format onnx \
  --target auto \
  --quantization int4 \
  --output ./llama-3.2-1b.zx

2. Inspect Models & Graph Optimizations

Inspect uncompiled source models (.safetensors, .gguf, .onnx) directly to view parameter counts, tensor shapes, and estimated memory footprint without requiring the native engine:

zenthrix inspect ./model.safetensors
zenthrix inspect ./model.gguf --json

For compiled .zx binaries, inspect projected memory profiles and operator fusions:

zenthrix inspect ./llama-3.2-1b.zx --memory-profile

3. Run Inference via CLI

Verify compiled throughput directly in your terminal:

zenthrix run \
  --model ./llama-3.2-1b.zx \
  --prompt "Explain quantum decoherence in two sentences." \
  --max-tokens 128

4. Python API Usage

import zenthrix

# Load and initialize the compiled runtime
engine = zenthrix.Engine(model_path="./llama-3.2-1b.zx")

# Execute a deterministic inference pass
output = engine.generate(
    prompt="Synthesize the primary risks of high inference latency.",
    temperature=0.2,
    max_tokens=256,
)

print(output.text)
print(f"Time to First Token (TTFT): {output.ttft_ms} ms")
print(f"Throughput: {output.tokens_per_second} tokens/sec")

Automation and Runtime Availability

The public package does not include the proprietary native compiler/runtime. compile, inspect, and run therefore return a non-zero status until a compatible runtime is provisioned; they never create placeholder artifacts or claim successful inference.

For automation, add --json to run, inspect, or compile. Expected failures are emitted as a JSON object with error and message fields:

{"error": "EngineUnavailableError", "message": "..."}

Successful inference uses text, ttft_ms, and tokens_per_second fields.

Supported Target Architectures

Silicon Target Optimization Backend Compute Units
Apple Silicon (M-Series / A-Series) Metal MSL & AMX Matrix Intrinsics GPU / Neural Engine
Qualcomm Snapdragon (8 Gen 2/3/4) Hexagon HTP Architecture (C++) NPU / HVX
Arm Neoverse / Cortex Arm NEON / SVE2 Assembly CPU Vector Extensions

Contributing

We welcome community contributions to adapters, loaders, and frontend parsers. All contributions require signing our Contributor License Agreement (CLA) during the pull request process.

See CONTRIBUTING.md for local environment setup instructions.

License

The Zenthrix CLI and client adapters are distributed under the Apache License 2.0. The underlying compilation engine dynamic binary is subject to the WithBrian Technologies Commercial EULA embedded in binary distributions.

Metadata

Release files for zenthrix 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zenthrix 0.2.0
File Size Uploaded
zenthrix-0.2.0.tar.gz 59.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zenthrix 0.2.0
File Interpreter ABI Platform
zenthrix-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 85.3 kB

Release files / zenthrix-0.2.0.tar.gz

Download URL zenthrix-0.2.0.tar.gz
Size 59.9 kB
Tags Source
SHA-256 checksum
How to use checksums
03bb03892dbb4cc4ed7a5caa29e4889c44a457bfee649c45f96e9148752cee2f
BLAKE2b-256 checksum
How to use checksums
688c32d5b3df80d503f19dddf631ac2cf78ddc41eae1c0890511b5cb539ea488
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / zenthrix-0.2.0-py3-none-any.whl

Download URL zenthrix-0.2.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d2354be9e3d64b2e5adc79e2c3af8acd9d5789d7176e3673ea48f379fda89f1
BLAKE2b-256 checksum
How to use checksums
947ab0866a971dd56170014acf7cde8efe86d681b2a4543929a8536f486de73e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page