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 deep learning initiative created and governed by the AMEVA Foundation (아메바 재단).
🎯 Our Mission & Zero-Server Paradigm
The AMEVA Foundation is dedicated to the democratisation of client-side artificial intelligence and edge computing. We envision a decentralized web where deep learning training, fine-tuning, and neural inference occur directly on user devices (browsers, laptops, tablets, and smartphones)—eliminating massive cloud server costs, safeguarding user data sovereignty with zero network leakage, and providing zero-latency neural intelligence everywhere.
🌟 Core Foundation Initiatives
- 🌐 AMEVA-Forge Tensor Engine: High-performance WebGPU tensor computation & reverse-mode autograd engine.
- 🎙️ On-Device Whisper STT: Real-time acoustic FFT signal processing & speech recognition running locally in browser.
- 🤖 Decentralized LLM Transformers: Zero-install character and subword transformer models with zero cloud dependency.
- 🔒 Privacy-First AI Sovereignty: Sovereign on-device machine learning where private data never leaves client silicon.
- Foundation Portal: https://uno-km.github.io/ameva-forge/
- Official Repository: https://github.com/uno-km/ameva-forge
- Community & Governance: https://github.com/uno-km/ameva-forge/issues
- Sponsorship & Research Partnerships: https://github.com/uno-km
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}
}
Metadata
Release files for ameva-forge 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ameva_forge-1.0.1.tar.gz | 194.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ameva_forge-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 355.8 kB
Release files / ameva_forge-1.0.1.tar.gz
| Download URL | ameva_forge-1.0.1.tar.gz |
|---|---|
| Size | 194.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af6835b9366cd65a1bc822079dacddb966df481e23909726f166bf6a2eea1287
|
|
BLAKE2b-256 checksum How to use checksums |
03db658286453403fd185910a7273d2cc5ad186abed57019bded827f5db5a58e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / ameva_forge-1.0.1-py3-none-any.whl
| Download URL | ameva_forge-1.0.1-py3-none-any.whl |
|---|---|
| Size | 161.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4ed7bc02159b2912df167a6ddf32c29accbc446ff16964ff5a6124173babfc1
|
|
BLAKE2b-256 checksum How to use checksums |
49d3dcab4ab9047d17d8de32de8e46b042f822e27f865df83bb609c33c53756a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|