npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ameva/forge

v1.0.2

Published

Universal Browser-Native WebGPU Deep Learning Runtime & Plug-and-Play On-Device Model Hub

Readme

@ameva/forge (WebGPU On-Device AI Engine)

Universal Browser-Native WebGPU Deep Learning Runtime & Plug-and-Play On-Device Model Hub.

npm version License: Apache-2.0 WebGPU Native Tests

@ameva/forge is an industrial-grade, client-side WebGPU neural execution runtime designed specifically for modern web browsers. It empowers web applications to run state-of-the-art neural networks locally on user GPUs with zero server costs, 100% data privacy, and zero-latency on-device inference.


⚡ Key Highlights for Web Developers

  1. Plug & Play GGUF Model Hub
    Load quantized models (LLaMA-3, SmolLM, Qwen2.5) directly from Hugging Face URLs or via local drag-and-drop. Automatically bypasses 32-bit WASM 2GB limits using Direct DMA buffer mapping.
  2. Built-in Byte-Level BPE & SentencePiece Tokenizer
    Full client-side tokenization engine that reconstructs vocabularies from GGUF metadata. Reversible, lossless text encoding and decoding with zero external dependencies.
  3. 60 FPS Non-Blocking Autoregressive Streaming
    Generate LLM text with real-time typewriter effects without freezing the UI thread, powered by cooperative event-loop scheduling.
  4. Web Worker Thread Isolation
    Offload heavy transformer decoding and GPU dispatches to dedicated Web Workers to ensure perfectly smooth animations and prevent OS GPU timeout (TDR) crashes.
  5. Universal Multimodal Runtimes
    Hardware-accelerated compute shaders for STT (Whisper Mel-STFT), TTS (Waveform synthesis), Vision (CLIP ViT), and Diffusion (VAE latent decoding).

📦 Installation

NPM / Yarn / PNPM

npm install @ameva/forge
# or
yarn add @ameva/forge

Browser Direct CDN (Zero-Install)

<script src="https://uno-km.vercel.app/lib/forge/dist/index.js"></script>

🚀 Quick Start (TypeScript / JavaScript)

1. Plug & Play LLM Inference from Hugging Face

import { ModelLoader, LLMTextGenerator } from '@ameva/forge';

// 1. Stream & Cache GGUF model directly from Hugging Face CDN
const loader = new ModelLoader({ cacheStorage: true });
const model = await loader.loadFromUrl(
  'https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct-GGUF/resolve/main/smollm-135m-instruct.q4_k_m.gguf',
  (progress) => console.log(`Downloading: ${(progress * 100).toFixed(1)}%`)
);

// 2. Initialize 60 FPS non-blocking streaming generator
const generator = new LLMTextGenerator(model, {
  temperature: 0.7,
  topP: 0.9,
  topK: 40,
  repetitionPenalty: 1.1
});

// 3. Generate streaming tokens
await generator.generateStream("Explain WebGPU in one sentence:", (tokenText) => {
  document.getElementById('output').textContent += tokenText;
});

2. Low-Level WebGPU Tensor Autograd

import { Tensor, initWebGPU } from '@ameva/forge';

// Initialize WebGPU adapter & device context
await initWebGPU();

// Create tensors with gradient tracking
const x = new Tensor([1.0, 2.0, 3.0, 4.0], { shape: [2, 2], requiresGrad: true });
const w = new Tensor([0.5, -0.5, 1.0, 2.0], { shape: [2, 2], requiresGrad: true });

// Forward pass through native WGSL compute shaders
const y = x.matmul(w).relu().sum();

// Reverse-mode automatic differentiation
await y.backward();

console.log('Output Value:', y.item());
console.log('Gradients of x:', await x.grad.toArray());

🏛️ Multimodal Architecture

+-----------------------------------------------------------------------------------+
|                        Browser Web Application Layer                              |
|   HTML5 Canvas  |  Web Audio API  |  DOM Typewriter UI  |  Drag-and-Drop Dropzone |
+-----------------------------------------------------------------------------------+
|                 @ameva/forge Client Neural Runtime Engine                         |
|   Byte-Level BPE Tokenizer  *  Shifted Softmax Sampler  *  Worker Isolation Bridge|
+-----------------------------------------------------------------------------------+
|                     On-Device GGUF Direct DMA Loader                              |
|       Hugging Face Chunk Streamer  *  OPFS Cache  *  Tensor Name Mapper           |
+-----------------------------------------------------------------------------------+
|                      WebGPU Native Hardware Shaders                               |
|   Tiled MatMul (WGSL)  *  FlashAttention-2  *  Mel STFT FFT  *  VAE GroupNorm     |
+-----------------------------------------------------------------------------------+

📄 License

Apache-2.0 License. Copyright (c) 2026 uno-km (AMEVA Foundation).