AMEVA-Forge Documentation

Release 1.0.0 [ Live WebGPU Studio ] [ GitHub Repository ]

Installation & Setup

AMEVA-Forge supports multiple execution targets: pure Python (CPython for testing/prototyping), TypeScript/JavaScript for web apps, and in-browser Pyodide with WebGPU.

1. Python Package Installation (PyPI & Pip)

Install the official package from PyPI, or from pre-built wheel:

# Official PyPI Release (Recommended)
pip install ameva-forge

# Option B: Install directly from GitHub
pip install git+https://github.com/uno-km/ameva-forge.git#subdirectory=packages/forge-py

# Option C: Download pre-built wheel artifact
# Download: https://uno-km.github.io/ameva-forge/pkg/ameva_forge-0.1.0-py3-none-any.whl
pip install ameva_forge-0.1.0-py3-none-any.whl

# Option D: Local editable development mode
pip install -e packages/forge-py

2. NPM Package for Node / Webpack

npm install @ameva/forge

3. In-Browser Pyodide Integration

Include the TypeScript bundle and load Pyodide from CDN:

<!-- Load AMEVA-Forge WebGPU Backend -->
<script src="./dist/index.js"></script>

<!-- Load Pyodide WASM Runtime -->
<script src="https://cdn.jsdelivr.net/pyodide/v0.25.1/full/pyodide.js"></script>
<script>
  async function setup() {
    // 1. Initialize WebGPU
    await window.forge.initWebGPU();
    
    // 2. Initialize Pyodide & Install Forge Wheel
    const pyodide = await loadPyodide();
    await pyodide.loadPackage("micropip");
    const micropip = pyodide.pyimport("micropip");
    await micropip.install("https://uno-km.github.io/ameva-forge/pkg/forge-0.1.0-py3-none-any.whl");
    
    // 3. Ready to train models on GPU!
    await pyodide.runPythonAsync(`
      import forge as torch
      print("Forge WebGPU ready:", torch.tensor([1.0, 2.0], device="gpu"))
    `);
  }
  setup();
</script>

Browser Hardware Requirements