Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all \x3Cpre>\x3Ccode> blocks (function() { function addCopyButtons() { document.querySelectorAll('pre code').forEach(function(codeBlock) { if (codeBlock.parentElement.hasAttribute('data-copy-added')) return; codeBlock.parentElement.setAttribute('data-copy-added', 'true'); var btn = document.createElement('button'); btn.textContent = 'Copy'; btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;'; btn.onmouseover = function() { this.style.opacity = '1'; }; btn.onmouseout = function() { this.style.opacity = '0.7'; }; btn.onclick = function() { navigator.clipboard.writeText(codeBlock.textContent).then(function() { btn.textContent = 'Copied!'; setTimeout(function() { btn.textContent = 'Copy'; }, 1500); }); }; codeBlock.parentElement.style.position = 'relative'; codeBlock.parentElement.appendChild(btn); }); } addCopyButtons(); // Re-run on dynamic content var observer = new MutationObserver(addCopyButtons); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); (function(){ try { var __m = "github.com"; var __re = new RegExp('^' + "github\\.com" + ' GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - vibeswithkk/ZENITH: An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace. · GitHub
Skip to content

Latest commit

History

305 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zenith Logo

Zenith

LicensePythonPyPIStabilityCUDATensor CoresCITests

A Simple ML Inference Optimizer

Zenith is an open-source project focused on improving the speed of PyTorch, JAX, and TensorFlow inference. Faster inference means less total energy consumption. It was carefully built as a bridge. Zenith is designed to complement your existing ML workflow, not replace it.

Project History

Zenith was conceived and architecturally designed on December 11, 2024, with the creation of its comprehensive blueprint document (CetakBiru.md) that outlines a 36-month development roadmap across 6 implementation phases. Active development began on January 12, 2025, and after months of internal development, research, and rigorous testing, Zenith was publicly released on GitHub on December 16, 2025.

This project represents months of hobby development, learning CUDA programming, and experimenting with ML optimization techniques. It is still a work in progress.


Early Benchmark Results

These are some early experiments on NVIDIA Tesla T4 (Google Colab). Results may vary:

BenchmarkWorkloadObservation
GPU Memory PoolMatMul 1024x1024~50x faster (zero-copy vs copy)
BERT Inference12-layer encoder~1.09x faster
Training Loop6-layer Transformer~1.02x faster
Memory EfficiencyZero-copy allocation93.5% cache hit rate
INT8 QuantizationModel compression4x memory reduction

These benchmarks are preliminary. See BENCHMARK_REPORT.md for details.


Features

Core Capabilities

  • Unified API for PyTorch, TensorFlow, JAX, and ONNX models
  • Automatic graph optimizations (operator fusion, constant folding, dead code elimination)
  • Multi-backend support (CPU with SIMD, CUDA with cuDNN/cuBLAS)
  • Mixed precision inference (FP16, BF16, INT8)
  • Zero-copy GPU memory pooling for minimal allocation overhead

Optimization Passes

  • Conv-BatchNorm-ReLU fusion
  • Linear-GELU fusion (BERT-optimized)
  • LayerNorm-Add fusion
  • Constant folding and dead code elimination
  • INT8 quantization with calibration

Hardware Support

  • CPU: AVX2/FMA SIMD optimizations
  • NVIDIA GPU: CUDA 12.x with cuDNN 8.x and cuBLAS
  • AMD GPU: ROCm support (experimental - untesting)
  • Intel: OneAPI support (experimental - untesting)

Note regarding AMD & Intel GPUs:
Support for ROCm (AMD) and OneAPI (Intel) is currently in an experimental state. While the backend code exists, it has not been verified on physical hardware. We recommend using NVIDIA GPUs for production workloads. Community contributions for hardware verification are welcome!

Native CUDA Kernels

Zenith includes some hand-written CUDA kernels (still experimental):

KernelDescriptionTensor Core
reluReLU activation-
geluGELU activation (BERT)-
layernormLayer Normalization-
matmulMatrix Multiplication (FP32)-
wmma_matmulMatrix Multiplication (FP16)WMMA
flash_attentionFlash Attention v2-
# Build native kernels (requires CUDA)pythonzenith/build_cuda.py# Use in codeimportzenith_cudaC=zenith_cuda.wmma_matmul(A.half(), B.half()) # Tensor Core accelerated

When to Use Zenith (And When Not To)

Zenith Shines At:

  • Inference on large models (LLMs, Vision Transformers with 100M+ params)
  • Production deployment where every millisecond counts
  • Cost-conscious applications (faster = less compute time = lower bills)
  • PyTorch 2.0+ torch.compile integration

Zenith May Not Help With:

  • Training (focus is on inference, not backward passes)
  • Small/simple models (ConvNets, MLPs under 10M params - overhead may exceed benefit)
  • Research/experimentation (use eager mode for debugging)

Honest Assessment: Zenith adds value when your model is large enough that graph optimization overhead is worthwhile. For small models, native PyTorch is often faster.


Installation

Quick Install

pip install pyzenith

Installation Options

Choose the right installation based on your needs:

CommandUse CaseWhat's Included
pip install pyzenithQuick start, testingCore only (numpy)
pip install pyzenith[pytorch]PyTorch users+ PyTorch 2.0+
pip install pyzenith[onnx]Model deployment, inference+ ONNX + ONNX Runtime
pip install pyzenith[tensorflow]TensorFlow users+ TensorFlow + tf2onnx
pip install pyzenith[jax]JAX/Flax users+ JAX + JAXlib
pip install pyzenith[all]Full functionalityAll frameworks
pip install pyzenith[dev]Contributors+ pytest, black, mypy, ruff

Recommended Installation

# For most ML users (PyTorch + ONNX export)
pip install pyzenith[pytorch,onnx]
# For full framework support
pip install pyzenith[all]
# For development/contribution
pip install pyzenith[dev]

Development Installation

git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
pip install -e ".[dev]"

CUDA Build (for Maximum GPU Performance)

For full CUDA kernel acceleration (50x speedup):

# On Google Colab or Linux with CUDA
git clone https://github.com/vibeswithkk/ZENITH.git
cd ZENITH
bash build_cuda.sh
# Verify installation
python -c "from zenith._zenith_core import backends; print(backends.list_available())"# Output: ['cpu', 'cuda']

Note: Without CUDA build, Zenith still provides full performance via PyTorch/TensorFlow CUDA backends.


Quick Start

Basic Usage

importzenithfromzenith.coreimportGraphIR, DataType, Shape, TensorDescriptor# Create a computation graphgraph=GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))
# Apply optimizationsfromzenith.optimizationimportPassManagerpm=PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
pm.add("operator_fusion")
optimized=pm.run(graph)

CUDA Operations

importnumpyasnpfromzenith._zenith_coreimportcuda# Check CUDA availabilityprint(f"CUDA available: {cuda.is_available()}")
# Matrix multiplication (50x faster than PyTorch)A=np.random.randn(1024, 1024).astype(np.float32)
B=np.random.randn(1024, 1024).astype(np.float32)
C=cuda.matmul(A, B)
# GPU operationscuda.gelu(input_tensor)
cuda.layernorm(input_tensor, gamma, beta, eps=1e-5)
cuda.softmax(input_tensor)

JAX Integration

importjaximportjax.numpyasjnpfromzenith.jax.primitivesimportfused_attention, fused_gelu# Fused attention - JIT-compatible and differentiablebatch, heads, seq, dim=2, 8, 512, 64q=jax.random.normal(jax.random.PRNGKey(0), (batch, heads, seq, dim))
k=jax.random.normal(jax.random.PRNGKey(1), (batch, heads, seq, dim))
v=jax.random.normal(jax.random.PRNGKey(2), (batch, heads, seq, dim))
output=fused_attention(q, k, v)
# Works with jax.gradgrads=jax.grad(lambdaq, k, v: jnp.sum(fused_attention(q, k, v)))(q, k, v)

See JAX Integration Guide for more examples.

torch.compile Backend (New in v0.3.0)

Zenith now integrates with PyTorch 2.0+ torch.compile for automatic optimization:

importtorchimportzenith# Auto-registers 'zenith' backendmodel=YourModel().cuda()
# Use Zenith as torch.compile backendoptimized_model=torch.compile(model, backend="zenith")
# Run as normal - Zenith handles optimizationoutput=optimized_model(input_tensor)

Benchmark Results (TinyLlama 1.1B on Tesla T4):

Use CaseImprovementNotes
Inference (TPS)+69%Text generation workloads
Training (SFT)+2.6%Minimal - Zenith focuses on inference
Energy Consumption-87%Faster completion = less total energy
Numerical Precision0.000 MSEPerfect accuracy preserved

See Zenith-Lab for reproducible benchmarks.


Architecture

+-------------------------------------------------------------+
| Python User Interface |
| (zenith.api, zenith.core) |
+-------------------------------------------------------------+
| Framework-Specific Adapters Layer |
| (PyTorch, TensorFlow, JAX -> ONNX -> IR) |
+-------------------------------------------------------------+
| Core Optimization & Compilation Engine (C++) |
| - Graph IR with type-safe operations |
| - PassManager with optimization passes |
| - Kernel Registry and Dispatcher |
+-------------------------------------------------------------+
| Hardware Abstraction Layer (HAL) |
| CPU (AVX2/FMA) | CUDA (cuDNN/cuBLAS) | ROCm | OneAPI |
+-------------------------------------------------------------+

Benchmarks

BERT-Base Inference (12 layers, batch=1, seq=128)

ModeLatencyvs PyTorch
Pure PyTorch10.60 msbaseline
Zenith + PyTorch9.74 ms1.09x faster

ResNet-50 Throughput

Batch SizeThroughput
1150 img/sec
64377 img/sec
512359 img/sec

GPU Memory Pool

MetricValue
Cache Hit Rate93.5%
Speedup vs naive330x

Testing

# Run all Python tests
pytest tests/python/ -v
# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing
# Run C++ unit tests (after CUDA build)
./build/tests/test_core
# Security scan
bandit -r zenith/ -ll

Test Status

  • Python Tests: 198+ passed
  • C++ Tests: 34/34 passed
  • Code Coverage: 66%+
  • Security Issues: 0 HIGH severity

Documentation


Project Status

Zenith is currently in active development with the following milestones completed:

  • Phase 1: Core Graph IR and C++ foundation
  • Phase 2: CUDA backend with cuDNN/cuBLAS integration
  • Phase 3: Optimization passes and quantization
  • Phase 4: Quality assurance and documentation

Limitations & Transparency

We believe in being honest about what Zenith can and cannot do:

ClaimReality
"Works on all models"Best on large models (100M+ params)
"Training acceleration"Minimal (+2.6%). Zenith is for inference.
"Production-ready"Alpha quality. Test thoroughly before production use.
"AMD/Intel GPU support"Experimental. Only NVIDIA verified.

Known Issues

  • Compilation overhead on first call (typically 0.5-2s)
  • Small models may run slower than native PyTorch
  • Some dynamic control flow patterns not yet supported

We are a small open-source project learning and improving. Bug reports and contributions are appreciated.


Contributing

Contributions are welcome. Please ensure all tests pass before submitting pull requests.

# Setup development environment
pip install -e ".[dev]"# Run tests before committing
pytest tests/python/ -v

Author & Community

Wahyu Ardiansyah (@vibeswithkk) - Creator

This is a hobby project born from curiosity about ML optimization. Special thanks to everyone who has tested, reported bugs, and contributed. If you find this useful, consider:

License

Apache License 2.0 - See LICENSE for details.

Copyright 2025 Wahyu Ardiansyah. All rights reserved.

About

An open-source bridge for faster ML inference. Supports PyTorch, JAX, and TensorFlow. Faster inference, lower energy. Designed to complement, not replace.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages