Skip to main content

Cross-Platform ML Optimization Framework with ONNX Interpreter

Project description

Zenith

License Python Coverage Tests

Cross-Platform ML Optimization Framework

A model-agnostic and hardware-agnostic unification and optimization framework for Machine Learning.

Features

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU, CUDA, ROCm, TPU)
  • Mixed precision training and inference (FP16, BF16, INT8)
  • Property-based testing with mathematical guarantees

Installation

# Basic installation
pip install pyzenith

# With framework support
pip install pyzenith[onnx,pytorch,tensorflow,jax]

# Development installation
pip install -e ".[dev]"

Quick Start

import zenith
from zenith.core import GraphIR, DataType, Shape, TensorDescriptor

# Create a computation graph
graph = GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))

# Apply optimizations
from zenith.optimization import PassManager
pm = PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
optimized = pm.run(graph)

Architecture

+-------------------------------------------------------------+
|                    Python User Interface                    |
+-------------------------------------------------------------+
|              Framework-Specific Adapters Layer              |
|          (PyTorch, TensorFlow, JAX -> ONNX -> IR)           |
+-------------------------------------------------------------+
|       Core Optimization & Compilation Engine (C++)          |
|  - High-Level Graph Optimizer & IR                          |
|  - Kernel Scheduler & Auto-Tuner                            |
|  - Mathematical Kernel Library                              |
+-------------------------------------------------------------+
|           Hardware Abstraction Layer (HAL)                  |
|              CPU (SIMD) | CUDA | ROCm | TPU                 |
+-------------------------------------------------------------+

Documentation

Development

# Run tests
pytest tests/python/ -v

# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing

# Security scan
bandit -r zenith/ -ll

Current Status

  • Phase 4: Quality Assurance & Documentation
  • 198 tests passing
  • 66% code coverage
  • 0 HIGH severity security issues

Author

Wahyu Ardiansyah - Lead Architect

License

Apache License 2.0 - See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyzenith-0.1.0.tar.gz (86.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyzenith-0.1.0-py3-none-any.whl (80.7 kB view details)

Uploaded Python 3

File details

Details for the file pyzenith-0.1.0.tar.gz.

File metadata

  • Download URL: pyzenith-0.1.0.tar.gz
  • Upload date:
  • Size: 86.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyzenith-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c8abc4f059c2972d53fc4dc765764eeaffe82d228cce68859e28d85b5a000ba
MD5 280b35de272a2b74db82f9d49fa382e5
BLAKE2b-256 3e1f53a6c82a0bf2903e995f36d6ef73688685d5141186e42e02adf637652c0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyzenith-0.1.0.tar.gz:

Publisher: publish.yml on vibeswithkk/ZENITH

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyzenith-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyzenith-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 80.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyzenith-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d68dd41d76fbe2f0206dac45625d26157061d4b8dee3ffb938e86a582fbe4efb
MD5 bca8f725435ff7ce9dbac94364385764
BLAKE2b-256 7228efbe83e77c0c5d6881a11d0c145f312a4163d01a25f60f4bb10b660c8ff8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyzenith-0.1.0-py3-none-any.whl:

Publisher: publish.yml on vibeswithkk/ZENITH

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page