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

@agentix-e/timesfm-web

v1.0.0

Published

TimesFM time-series forecasting for the browser — WebAssembly inference via onnxruntime-web

Readme

@agentix-e/timesfm-web

Browser inference engine for TimesFM — zero-shot forecasting via WebAssembly, WebGPU, or WebGL.

npm API Docs Benchmark Coverage

Overview

@agentix-e/timesfm-web enables TimesFM inference directly in the browser using onnxruntime-web. It supports multiple backends (WASM, WebGPU, WebGL) and loads the 885 MB ONNX model via fetch() with streaming.

Backend Support

| Backend | Browser Support | Performance | | ------- | ---------------------- | ----------- | | WebGPU | Chrome 113+, Edge 113+ | 🚀 Fastest | | WASM | All modern browsers | ✅ Default | | WebGL | Fallback | ⚠️ Slow |

Memory note: The 885 MB model must fit in browser WASM memory (~4 GB limit).

Installation

npm install @agentix-e/timesfm-web onnxruntime-web

onnxruntime-web is a peer dependency — install it alongside.

Quick Start

import { TimesFMModel, createForecastConfig, TIMESFM_25_CONFIG } from '@agentix-e/timesfm-core';
import { TimesFMWebInferenceEngine, loadModelFromUrl } from '@agentix-e/timesfm-web';

// 1. Download the model via fetch() with progress tracking
const { buffer } = await loadModelFromUrl('https://cdn.example.com/timesfm-2.5.onnx', {
  onProgress: (received, total) => console.log(`${received}/${total}`),
});

// 2. Create web engine and load model
const engine = new TimesFMWebInferenceEngine(TIMESFM_25_CONFIG);
await engine.load(buffer);

// 3. Create model with injected web engine (DI pattern)
const model = await TimesFMModel.fromPretrained({
  modelPath: '/models/timesfm-2.5.onnx',
  engine,
});

// 4. Compile and forecast
model.compile(createForecastConfig({ maxContext: 1024, maxHorizon: 256 }));
const result = await model.forecast(24, [
  new Float32Array([
    /* historical values */
  ]),
]);

console.log(result.pointForecast); // Shape: [1, 24]
console.log(result.quantileForecast); // Shape: [1, 24, 10]

await model.dispose();

API Documentation

📚 Full API reference: agentix-e.github.io/timesfm-ts/api/modules/timesfm-web.html

Key exports:

  • TimesFMWebInferenceEngine — Browser inference engine implementing IInferenceEngine (WebGPU / WASM / WebGL)
  • loadModelFromUrl — Fetch-based model loader with streaming progress callback
  • checkModelAvailability — HEAD request check for model availability
  • WebEngineLogger — Custom logger interface for browser engine diagnostics

License

Apache 2.0