Skip to content

Latest commit

 

History

140 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMEVA-Forge (ameva-forge)

Official Documentation PyPI version Python WebGPU Tests Open Collective GitHub Sponsors License AMEVA Foundation

High-Performance Client-Side Deep Learning Engine & WebGPU Reverse-Mode Autograd Framework

An Official Tier 1 Top-Level Open-Source Project of the AMEVA Foundation (AOSF)

🚀 Live WebGPU Studio Demo📚 Official Documentation📦 PyPI Package💬 Issue Tracker


⚡ 1-Line Installation

pip install ameva

Or run directly inside any modern web browser via WebGPU & Pyodide (Zero Installation, Zero Server Cost):

<script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script>
<script src="https://uno-km.vercel.app/lib/forge/dist/forge-py-bundle.js"></script>

🏛️ Architectural Overview

AMEVA-Forge connects a deterministic Python autograd frontend directly to direct-to-silicon WebGPU WGSL compute shaders:

+-----------------------------------------------------------------------------------+
|                            AMEVA-Forge User Space                                 |
|   forge.nn  |  forge.optim  |  forge.linalg  |  forge.fft  |  forge.distributions |
+-----------------------------------------------------------------------------------+
|                      Reverse-Mode Autograd DAG Engine                             |
|       Vector-Jacobian Products (VJP)  *  In-Place Mutation Version Locks          |
+-----------------------------------------------------------------------------------+
|                         Hardware Abstraction Layer                                |
|   CPU Backend (Vectorized C/NumPy)  <--->  WebGPU Backend (Async WGSL Kernels)    |
|   Staging Buffer Recycling Pool     <--->  Zero-Leak Allocation Token Ring        |
+-----------------------------------------------------------------------------------+

🚀 Key Capabilities & Verified Boundaries

  1. Deterministic Autograd & Topological Execution
    Strict reverse-mode automatic differentiation graph with cycle detection, multi-output tuple bindings, in-place version invalidation, and scalar-tensor memory optimization.

  2. WebGPU Hardware-Accelerated WGSL Compute Pipeline
    Custom WGSL compute shaders for fused matrix multiplication, tensor reduction, element-wise broadcasting, convolutions, LayerNorm, and Softmax operating directly on client GPU hardware.

  3. 100% Client-Side In-Browser Deep Learning
    Train neural networks directly inside browser tabs with Pyodide WebAssembly and WebGPU without server GPUs, APIs, or cloud costs.

  4. Zero-Copy Buffer Recycling & Memory Token Pools
    Direct GPU buffer lifecycle management with zero memory leaks, reusable staging buffers, and asynchronous queue dispatching.


📦 PyTorch Compatibility API Example

import ameva.forge as forge
import ameva.forge.nn as nn
import ameva.forge.optim as optim

# 1. Define Model
class TinyNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(784, 128)
        self.relu = nn.ReLU()
        self.fc2 = nn.Linear(128, 10)

    def forward(self, x):
        return self.fc2(self.relu(self.fc1(x)))

# 2. Instantiate on WebGPU device
model = TinyNet().to("webgpu")
optimizer = optim.Adam(model.parameters(), lr=0.001)
criterion = nn.CrossEntropyLoss()

# 3. Training step in browser
inputs = forge.randn(32, 784, device="webgpu", requires_grad=False)
targets = forge.randint(0, 10, (32,), device="webgpu")

optimizer.zero_grad()
outputs = model(inputs)
loss = criterion(outputs, targets)
loss.backward()
optimizer.step()

print(f"WebGPU Step Complete! Loss: {loss.item():.4f}")

📄 License

Apache-2.0 / MIT License © 2026 AMEVA Open-Source Foundation (AOSF). All Rights Reserved.


💖 Sponsorship & Community Backing

AMEVA is an independent open-source public good governed under the AMEVA Open-Source Foundation (AOSF). All sponsorship funds are 100% publicly audited and dedicated to physical ARM64 testbeds and CI/CD GPU runners.

About

⚡ Zero-Server-Cost Browser-Native WebGPU Autograd Deep Learning Engine with PyTorch compatibility, WGSL Compute Shaders, and Zero-Copy Buffer Recycling.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages