An Official Tier 1 Top-Level Open-Source Project of the AMEVA Foundation (AOSF)
🚀 Live WebGPU Studio Demo • 📚 Official Documentation • 📦 PyPI Package • 💬 Issue Tracker
pip install ameva-forgeEmbed the zero-server WebGPU runtime directly into your web application:
<!-- Load AMEVA-Forge WebGPU Runtime Engine -->
<script src="https://uno-km.vercel.app/lib/forge/dist/index.js"></script>Or install via NPM / GitHub Packages:
npm install @uno-km/ameva-forgeAMEVA-Forge connects a deterministic Python autograd frontend and high-level Plug & Play Model Ingestion directly to client-side WebGPU WGSL compute shaders:
+-----------------------------------------------------------------------------------+
| AMEVA-Forge Plug & Play Model Hub |
| Hugging Face GGUF Direct URL | Local File Drag & Drop | OPFS/Cache Storage |
+-----------------------------------------------------------------------------------+
| Universal Neural Runtime & Tokenizer Engine |
| Byte-Level BPE / SentencePiece * Top-K/Top-P Sampler * Inference Web Worker |
+-----------------------------------------------------------------------------------+
| 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 |
+-----------------------------------------------------------------------------------+
-
Plug & Play On-Device Model Hub (Zero Server Cost)
Mount external GGUF models (SmolLM-135M,Qwen2.5-0.5B,LLaMA-3.2-1B) directly into browser VRAM via Hugging Face CDN URL or drag & drop with zero cloud server compute costs. -
Universal Byte-Level BPE & SentencePiece Tokenizer
Built-in reversible tokenizer (BPETokenizer) extracting vocabulary and BPE rules directly from GGUF metadata for 100% loss-less text encoding and decoding. -
Web Worker Background Inference (60 FPS Non-Blocking)
Runs heavy neural decode loops and FlashAttention inside dedicated Web Workers, completely preventing browser UI freezing and OS GPU TDR timeouts. -
WebGPU Hardware-Accelerated WGSL Compute Pipeline
Custom WGSL compute shaders for fused matrix multiplication, FlashAttention, RMSNorm, SwiGLU, tensor reduction, element-wise broadcasting, convolutions, LayerNorm, and Softmax operating directly on client GPU hardware. -
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. -
Zero-Copy Buffer Recycling & Memory Token Pools
Direct GPU buffer lifecycle management with zero memory leaks, reusable staging buffers, and asynchronous queue dispatching.
import { ModelLoader } from '@uno-km/ameva-forge';
// 1. Mount external GGUF model into WebGPU VRAM directly from Hugging Face
const session = await ModelLoader.loadModel(
'https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct-GGUF/resolve/main/smollm-135m-instruct-q4_k_m.gguf',
{ onProgress: (p) => console.log(`[Loading] ${p.percentage}%: ${p.statusText}`) }
);
// 2. Stream autoregressive text generation at 60 FPS
await session.prompt('Explain WebGPU in simple terms', {
maxNewTokens: 64,
temperature: 0.7,
onToken: (chunk, progress) => {
process.stdout.write(chunk); // Real-time typewriter output
}
});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}")Apache-2.0 / MIT License © 2026 AMEVA Open-Source Foundation (AOSF). All Rights Reserved.
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.
- Open Collective (Non-Profit 501(c)(6)): https://opencollective.com/ameva-fund
- GitHub Sponsors: https://github.com/sponsors/uno-km
- Official Foundation Portal: https://uno-km.vercel.app/docs/foundation/sponsorship.html