AMEVA-Forge Documentation

Release 2.0.0 Initializing WebGPU... [ Live WebGPU Studio ] [ GitHub Repository ]

3. WebGPU Real-time Training Demo & Interactive Decision Boundary

Live neural network training directly on your GPU via WebGPU. Watch the loss curve converge and the 2D decision boundary evolve frame-by-frame in real-time.

Device Target: WebGPU
Epoch: 0 / 0
Current Loss: --
Step Latency: 0.0 ms

1. Select Dataset Preset & Hyperparameters

2. Live 2D Decision Boundary & Loss Curve

[ Ready ]
2D Neural Decision Field
Real-time Loss Convergence

3. WebGPU Execution Log Console

System idle. Ready to train. [gpuCore.ts] WebGPU Context initialized. [Pyodide Bridge] Autograd and in-place tensor buffers registered. Click [Run Live WebGPU Training] to start.

AMEVA-Forge Python Autograd & In-Place Optimizer Loop (Running on WebGPU)

[ loss.backward() & optim.Adam ]
import forge as torch
import forge.nn as nn
import forge.optim as optim

# 1. Multi-Layer Perceptron on WebGPU
model = nn.Sequential(
    nn.Linear(2, 32),
    nn.ReLU(),
    nn.Linear(32, 16),
    nn.ReLU(),
    nn.Linear(16, 1)
).to("gpu")

opt = optim.Adam(model.parameters(), lr=0.04)

# 2. In-Browser Reverse-Mode Autograd Training Loop
for epoch in range(60):
    opt.zero_grad()
    pred = model(X_gpu)
    loss = torch.sum((pred - Y_gpu) ** 2) * 0.5
    loss.backward()  # WebGPU GPU Kernel Gradient Backpropagation!
    opt.step()       # WebGPU In-Place VRAM Parameter Update!

Technical & Mathematical Deep-Dive