AMEVA-Forge (ameva-forge)
High-Performance Client-Side Tensor Computation Engine & Reverse-Mode Autograd Framework Powered by WebGPU.
Developed and maintained by the AMEVA Foundation (아메바 재단), AMEVA-Forge is an industrial-grade, zero-server-cost deep learning library engineered to execute high-throughput tensor operations, automated differentiation, and end-to-end neural model training natively within client runtimes (WebGPU, WASM/Pyodide, and native Python environments).
Architectural Pillars
+-----------------------------------------------------------------------------------+
| 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 |
+-----------------------------------------------------------------------------------+
- 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. - WebGPU Hardware Acceleration
Direct-to-silicon WGSL compute shaders featuring 8-dimensional non-contiguous stride dispatching, 2D workgroup partitioning ($65,535 \times 65,535$), and explicit buffer lifecycle tracking. - PyTorch 1:1 API Parity
Seamless drop-in compatibility across neural layers (nn.Module,nn.MultiheadAttention,nn.Conv2d), mathematical primitives (linalg,fft,special), and probabilistic graphical models (distributions). - Zero-Server Infrastructure (Edge & Browser)
Execute full model fine-tuning and inference directly inside the browser using Pyodide and WebGPU with zero cloud compute cost and total data privacy.
Installation
Install the official package from PyPI:
pip install ameva-forge
Or install from source with development dependencies:
git clone https://github.com/uno-km/ameva-forge.git
cd ameva-forge/packages/forge-py
pip install -e .
Quick Start
1. Basic Tensor & Automated Differentiation
import forge as fg
# Initialize tensors with gradient tracking
x = fg.tensor([[1.0, 2.0], [3.0, 4.0]], requires_grad=True)
w = fg.tensor([[0.5, -0.5], [1.0, 2.0]], requires_grad=True)
b = fg.tensor([0.1, -0.1], requires_grad=True)
# Forward pass: Linear projection + GELU activation
y = fg.matmul(x, w) + b
loss = fg.sum(fg.nn.functional.gelu(y))
# Compute Vector-Jacobian Products (Autograd backward)
loss.backward()
print("Loss Value :", loss.numpy())
print("Gradient dL/dw :\n", w.grad.numpy())
2. Character-Level Transformer (NanoGPT)
Train a complete causal autoregressive transformer directly on your local device:
import forge as fg
import forge.nn as nn
from forge.models.nanogpt import GPT, GPTConfig
# Define model configuration
config = GPTConfig(
block_size=32,
vocab_size=64,
n_layer=4,
n_head=4,
n_embd=64,
bias=False
)
model = GPT(config)
optimizer = fg.optim.AdamW(model.parameters(), lr=1e-3, weight_decay=1e-2)
criterion = nn.CrossEntropyLoss()
# Training step (Batch Size: 8, Sequence Length: 32)
input_tokens = fg.tensor([[1, 5, 12, 3]], dtype="int32")
target_tokens = fg.tensor([[5, 12, 3, 18]], dtype="int32")
optimizer.zero_grad()
logits = model(input_tokens)
loss = criterion(logits, target_tokens)
loss.backward()
optimizer.step()
3. Speech-to-Text & Acoustic Signal Processing (forge.fft + forge.nn)
Compute real Fourier Mel-spectrograms from raw acoustic waveforms:
import forge as fg
import forge.nn as nn
# 16kHz PCM audio waveform (Batch: 4, Samples: 8000)
raw_audio = fg.tensor(audio_data, dtype="float32")
# Fast Fourier Transform (Complex Spectrum)
fft_complex = fg.fft.rfft(raw_audio, n=1024, dim=-1)
# Power Spectrogram Energy
power_spec = (fft_complex.real.pow(2.0) + fft_complex.imag.pow(2.0) + 1e-6).log()
# 1D Convolutional Audio Feature Extractor
conv = nn.Conv1d(in_channels=513, out_channels=64, kernel_size=3, padding=1)
audio_features = conv(power_spec)
Comprehensive Module Directory
| Module | Core Functionality | Key Operators / Classes |
|---|---|---|
forge |
Core Tensor Engine & Factories | tensor, zeros, ones, randn, matmul, einsum, reshape, permute, where |
forge.nn |
Deep Learning Layers & Containers | Linear, Conv1d, Conv2d, MultiheadAttention, LayerNorm, RMSNorm, BatchNorm2d, Embedding, CrossEntropyLoss, MSELoss |
forge.optim |
Optimizers & Rate Schedulers | SGD, Adam, AdamW, RMSprop, CosineAnnealingLR, StepLR |
forge.linalg |
Linear Algebra Decomposition | norm, svd, qr, cholesky, inv, pinv, det, matrix_rank, solve, eigh |
forge.fft |
Discrete Fourier Transforms | rfft, irfft, fft, ifft, fft2, ifft2, rfft2, irfft2, fftfreq, fftshift |
forge.special |
Transcendental & Error Functions | erf, erfc, erfinv, gammaln, digamma, expm1, log1p, expit, logit, sinc, i0, xlogy |
forge.distributions |
Probability Distributions & KL | Normal(rsample), Uniform, Bernoulli, Categorical, kl_divergence |
forge.models |
Pre-architected Reference Models | GPT, GPTConfig, LLaMA |
In-Browser Zero-Install Execution (WebGPU + Pyodide)
AMEVA-Forge packages a single bundled JavaScript distribution (forge-py-bundle.js) that mounts into browser-native Pyodide runtimes:
<script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script>
<script src="https://uno-km.github.io/ameva-forge/dist/forge-py-bundle.js"></script>
<script>
async function runClientDeepLearning() {
let pyodide = await loadPyodide();
await window.loadAmevaForgeBundle(pyodide);
await pyodide.runPythonAsync(`
import forge as fg
x = fg.randn((1024, 1024), device="gpu")
y = fg.matmul(x, x)
print("Computed 1024x1024 on WebGPU Hardware:", y.shape)
`);
}
runClientDeepLearning();
</script>
The AMEVA Foundation (아메바 재단)
AMEVA-Forge is an open-source initiative directed by the AMEVA Foundation (아메바 재단).
Our Mission
The AMEVA Foundation is dedicated to the democratisation of client-side artificial intelligence. We envision a decentralized web where deep learning inference, fine-tuning, and scientific computation occur directly on user devices—eliminating centralized server costs, safeguarding user data sovereignty, and providing zero-latency neural capabilities everywhere.
- Foundation Portal: https://uno-km.github.io/ameva-forge/
- Official Repository: https://github.com/uno-km/ameva-forge
- Issue Tracker & Governance: https://github.com/uno-km/ameva-forge/issues
Quality Assurance & Verification
Every release of AMEVA-Forge undergoes rigorous multi-tier verification:
- 292 Unit & Stress Tests: 100% automated pass rate across CPU, GPU fallback, mathematical accuracy, and memory quota managers.
- Finite-Difference Gradcheck: Numerical gradient validation against analytical Vector-Jacobian backward formulations.
- Memory Lifecycle Audit: Zero-leak allocation token reclamation and buffer recycling verification across 10,000+ continuous execution cycles.
License & Citation
AMEVA-Forge is licensed under the MIT License.
@software{ameva_forge_2026,
author = {AMEVA Foundation},
title = {AMEVA-Forge: High-Performance WebGPU-Accelerated Tensor Computation Engine},
year = {2026},
publisher = {GitHub},
url = {https://github.com/uno-km/ameva-forge}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ameva_forge-0.1.0.tar.gz.
File metadata
- Download URL: ameva_forge-0.1.0.tar.gz
- Upload date:
- Size: 194.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4f5b3c673d847d4251f64a2ee92d65ecfc09e1e48ac8b5e99e79ffbe7a0738b
|
|
| MD5 |
735ac1598f57f8a54e38254e21e2b8e9
|
|
| BLAKE2b-256 |
2c1af326d7324fdeda5dc9454b34bd31c30a6f75e4c8296b1018fe671145a914
|
File details
Details for the file ameva_forge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ameva_forge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 161.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7b2374c3e5d7583c73f9233ab6bbc614272a1d311a9401bd019a0d08be3d48
|
|
| MD5 |
cf96916bd7e24ff220b8168dca57cc1b
|
|
| BLAKE2b-256 |
29fd306b3ea714d782d6ada61a11e173a3c5c57c572d72ed3987b710fe3979d0
|