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.4.tar.gz (85.9 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.4-py3-none-any.whl (80.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyzenith-0.1.4.tar.gz
  • Upload date:
  • Size: 85.9 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.4.tar.gz
Algorithm Hash digest
SHA256 334dbaa044a62faa3f1504a91b15c10aadc4e29af1188e040fc8d236bcd8d4c1
MD5 a4f1b2109cbdf9edfa27f9c1b0523aa4
BLAKE2b-256 3fb216d4081679bc5044d04a7f5621d1c064f16b5e973fa25f957d411f7d8219

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyzenith-0.1.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: pyzenith-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1f9b7a67850613871fd61dc06c52fc7a519ce41938f0e5aaea3a3051c5b7042c
MD5 5eb9672a17aedcd762c7fba63cd6fdc4
BLAKE2b-256 5a22c8e2b23fa01cbecde72afadf6f68ac0c0f0741e549868986ef70bec53455

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyzenith-0.1.4-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